@import url("fonts/blinker.css");

/* Tokens taken from waeco.com: electric blue on white, near-black text, Blinker, square corners. */
:root {
    --brand: #0050FF;
    --brand-dark: #003FCC;
    --brand-soft: #0050FF1A;
    --text: #0D0D0D;
    --muted: #5B6270;
    --line: #DDE1E8;
    --surface: #F3F5F8;
    --footer-bg: #0D0D0D;
    --danger: #C62828;
    --radius: 0;
    --font: "Blinker", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--text);
    font-family: var(--font);
    font-size: 18px;
    line-height: 1.5;
}

a {
    color: var(--brand);
}

img {
    max-width: 100%;
    height: auto;
}

h1:focus {
    outline: none;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 16px;
}

main.container {
    flex: 1;
    padding-block: 32px 64px;
}

/* Header and footer */

.site-header {
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.site-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding-block: 14px;
}

.logo {
    display: flex;
}

.logo img {
    height: 30px;
    width: auto;
}

.site-name {
    color: var(--muted);
    font-weight: 600;
}

.lang-nav {
    display: flex;
    gap: 14px;
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.lang-nav a {
    color: var(--text);
    text-decoration: none;
    padding-block: 4px;
    border-bottom: 2px solid transparent;
}

.lang-nav a:hover {
    color: var(--brand);
}

.lang-nav a[aria-current] {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    margin-left: auto;
    font-size: 16px;
    font-weight: 600;
}

.admin-nav a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.admin-nav a.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.admin-nav form {
    margin: 0;
}

.site-footer {
    background: var(--footer-bg);
    color: #fff;
    padding-block: 28px;
    font-size: 15px;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.site-footer img {
    height: 26px;
    width: auto;
}

/* Typography */

.page-title {
    margin: 0 0 12px;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 32px 0 12px;
}

.lead {
    color: var(--muted);
    margin: 0 0 24px;
}

/* Wizard */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
}

.breadcrumb li + li::before {
    content: "\203A";
    margin-right: 8px;
    color: var(--muted);
}

.breadcrumb a {
    text-decoration: none;
}

.breadcrumb a[aria-current] {
    color: var(--text);
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.choice-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    padding: 24px;
    border: 2px solid var(--text);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    transition: background-color 120ms, color 120ms, border-color 120ms;
}

.choice-card:hover, .choice-card:focus-visible {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    outline: none;
}

.choice-card.help {
    border-style: dashed;
    border-color: var(--muted);
    color: var(--muted);
}

.choice-card.help:hover, .choice-card.help:focus-visible {
    border-style: solid;
    border-color: var(--brand);
    color: #fff;
}

.choice-card.oil-group {
    display: block;
    min-height: 0;
    text-align: left;
}

.choice-card.oil-group .lead {
    display: block;
    margin: 8px 0 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
}

.choice-card.oil-group:hover .lead, .choice-card.oil-group:focus-visible .lead {
    color: #fff;
}

/* Results and tables */

.result-group {
    margin-top: 32px;
}

.result-group h2 {
    margin: 0 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--brand);
}

.result-group h2 .lead {
    font-weight: 400;
    font-size: 1.1rem;
}

.table-wrap {
    overflow-x: auto;
}

.product-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    /* Fixed layout keeps the columns aligned across the manufacturer groups on a result page. */
    table-layout: fixed;
    font-size: 16px;
}

.product-table th:first-child:empty {
    width: 72px;
}

.product-table th {
    background: var(--surface);
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.product-table th, .product-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.product-table .sku {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.product-table img {
    display: block;
    object-fit: contain;
}

.notice {
    margin: 24px 0;
    padding: 14px 16px;
    background: var(--brand-soft);
    border-left: 4px solid var(--brand);
}

/* Help pages */

.photo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.photo-row img {
    max-width: min(100%, 420px);
}

.bottle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.bottle-grid article {
    padding: 20px;
    background: var(--surface);
}

.bottle-grid img {
    display: block;
    height: 180px;
    width: auto;
    margin: 0 auto 12px;
    mix-blend-mode: multiply;
}

.bottle-grid h2 {
    margin-top: 0;
}

.bottle-grid p {
    margin: 0;
}

/* Forms and buttons */

.search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.search-form label {
    font-weight: 600;
}

input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select, textarea {
    font: inherit;
    padding: 9px 12px;
    border: 1px solid var(--muted);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    max-width: 100%;
}

.search-form input[type=search] {
    flex: 1 1 220px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible {
    outline: 3px solid var(--brand-soft);
    border-color: var(--brand);
}

.btn {
    display: inline-block;
    padding: 9px 20px;
    border: 2px solid var(--brand);
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--brand);
}

.btn-danger {
    background: #fff;
    border-color: var(--danger);
    color: var(--danger);
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--brand);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px 24px;
    margin: 24px 0;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field > label {
    font-weight: 600;
}

.field .hint {
    color: var(--muted);
    font-size: 15px;
}

.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 4px 16px;
}

.validation-message, .text-danger {
    color: var(--danger);
    font-size: 15px;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid var(--danger);
}

/* Scaffolded Identity pages use a few Bootstrap class names. */

.form-floating {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    max-width: 420px;
}

.mb-3 {
    margin-bottom: 16px;
}

.w-100 {
    width: 100%;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

@media (max-width: 480px) {
    body {
        font-size: 17px;
    }

    .site-name {
        display: none;
    }

    .choice-card {
        min-height: 96px;
    }
}

/* Shared by both layouts, so it lives here rather than in scoped CSS. */

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
