* {
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    width: 100%;
}

body {
    font-size: 0.8125em;
    display: flex;
    flex-flow: column;
}

header {
    border-bottom: 1px solid #444;
    display: flex;
    flex-flow: row wrap;
    padding: 1em;
    flex: 0 0 100px;
    align-items: center;
}

header h1 {
    margin: 0;
}

h1 {
    margin: 0 0 0.5em 0;
    font-size: 22px;
}

.logo {
    margin-right: 24px;
}

.logo svg {
    display: block;
    height: 60px;
}

main {
    display: flex;
    flex: 1 0 auto;
}

.sidebar {
    padding: 12px;
    /* flex: 1 0 20%; */
    border-right: 1px solid #444;
}

section {
    padding: 1em;
}

section.results {
    flex: 1 1 auto;
    overflow-x: scroll;
}

.table-container {
    width: 100%;
    overflow-x: scroll;
    margin: 0 0 20px 0;
}

table#results {
    width: 100%;
}

th,
td {
    font-size: 13px;
    padding: 5px 10px;
    text-align: center;
}

table#results .no-results {
    padding: 20px;
}

table#results td:nth-child(2) {
    white-space: nowrap;
}

table#results td:nth-child(1) {
    font-weight: bold;
}

table#results td {
    vertical-align: middle;
}

th {
    text-align: left;
}
table#results th span {
    font-weight: normal;
}

.loading-container {
    background: #f0f0f0 !important;
}

.loader,
.loader:after {
    border-radius: 50%;
    width: 1em;
    height: 1em;
}
.loader {
    margin: 20px auto;
    font-size: 20px;
    position: relative;
    text-indent: -9999em;
    border-top: 4px solid rgba(0, 0, 0, 0.1);
    border-right: 4px solid rgba(0, 0, 0, 0.1);
    border-bottom: 4px solid rgba(0, 0, 0, 0.1);
    border-left: 4px solid #999;
    -webkit-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-animation: load8 1.1s infinite linear;
    animation: load8 1.1s infinite linear;
    overflow: hidden;
}
@-webkit-keyframes load8 {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
@keyframes load8 {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

form {
}

.highlight {
    padding: 12px;
    background: #eee;
    margin: 0 0 12px 0;
    border-radius: 12px;
}

.pure-u-1 > div {
    margin: 12px;
}

.search-container {
    display: flex;
    width: 100%;
    justify-content: center;
}

.search-container button {
    width: 100%;
}

.row {
    display: flex;
    flex-flow: row wrap;
}

.row > * {
    margin-right: 12px;
}
.row > *:last-child {
    margin-right: 0;
}

.show-columns {
    display: flex;
    margin: 0 0 12px 0;
    flex-flow: row wrap;
}
.tag {
    display: flex;
    font-size: 10px;
    margin-right: 4px;
    padding: 6px;
    border-radius: 2px;
    background: #f4f4f4;
}
.tag input {
    margin: 0 3px 0 0;
}

.diagram-container p {
    font-weight: bold;
    text-align: center;
}
.diagram-container div {
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: row nowrap;
}

#diagram {
    max-width: 80%;
}

select {
    /* height: auto !important; */
    height: 2.5em !important;
}

.pure-form fieldset {
    padding: 0;
}

p {
    margin: 0 0 1em 0;
}

form fieldset > div {
    margin: 0 0 10px 0;
}

@media only screen and (max-width: 767px) {
    main {
        flex-flow: column;
    }
    .sidebar {
        border: none;
    }
    input[type='text'],
    input[type='number'],
    select {
        width: 100%;
    }
}

@media only screen and (max-width: 760px),
    (min-device-width: 768px) and (max-device-width: 1024px) {
    /* Force table to not be like tables anymore */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    /* Hide table headers (but not display: none;, for accessibility) */
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
    }

    td {
        /* Behave  like a "row" */
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    td:before {
        /* Now like a table header */
        position: absolute;
        text-align: left;
        /* Top/left values mimic padding */
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
    }

    /*
	Label the data
	*/
    table#results .no-results {
        text-align: center;
    }
    table#results .no-results:before {
        content: '';
    }
    td:nth-of-type(1) {
        background-color: #e4e4e4 !important;
    }
    td:nth-of-type(1):before {
        content: 'KYB Part Number';
    }
    td:nth-of-type(2):before {
        content: 'Brand';
    }
    td:nth-of-type(3):before {
        content: 'Extended Length (mm)';
    }
    td:nth-of-type(4):before {
        content: 'Compressed Length (mm)';
    }
    td:nth-of-type(5):before {
        content: 'Outer Shell Diameter';
    }
    td:nth-of-type(6):before {
        content: 'Dust Cover Outer Diameter';
    }
    td:nth-of-type(7):before {
        content: 'UPPER MOUNT';
    }
    td:nth-of-type(8):before {
        content: 'LOWER MOUNT';
    }
}
