/* ============================================================
   RAINIER WARRANTY REGISTRATION
   site.css
   ============================================================ */

:root {
    --page-background: #ffffff;
    --text-color: #161616;
    --muted-text: #555555;
    --input-background: #e7f2f1;
    --input-border: #d6e6e5;
    --input-focus: #789f9b;
    --required-color: #c3352e;
    --button-background: #3b3b3b;
    --button-hover: #222222;
    --button-disabled: #777777;
    --section-border: #d8d8d8;
    --error-color: #9b1c1c;
    --error-border: #c62828;
    --error-background: #fff1f1;
    --verified-background: #f1f4f4;
}


/* ============================================================
   GENERAL PAGE
   ============================================================ */

html {
    min-height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--page-background);
    color: var(--text-color);
    font-family: Arial, Helvetica, sans-serif;
}

main {
    min-height: 100vh;
}

.warranty-page {
    width: 100%;
    min-height: 100vh;
    padding-bottom: 80px;
}


/* ============================================================
   HERO IMAGE
   ============================================================ */

.warranty-hero {
    width: 100%;
    height: 275px;
    background-image: url("/images/warranty-hero.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}


/* ============================================================
   WARRANTY REGISTRATION TITLE
   ============================================================ */

.warranty-title-banner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(720px, calc(100% - 40px));
    min-height: 96px;
    margin: -38px auto 0;
    padding: 20px 30px;
    box-sizing: border-box;
    background: #000000;
    color: #ffffff;
    text-align: center;
    font-size: clamp(23px, 3vw, 34px);
    font-weight: 400;
    letter-spacing: 0.09em;
}


/* ============================================================
   MAIN CONTENT
   ============================================================ */

.registration-content {
    width: min(850px, calc(100% - 64px));
    margin: 65px auto 0;
    padding: 0 24px;
    box-sizing: border-box;
}

    .registration-content h1 {
        margin: 0 0 24px;
        font-size: 19px;
        font-weight: 700;
        line-height: 1.4;
    }

    .registration-content p {
        margin: 0 0 18px;
        font-size: 14px;
        line-height: 1.6;
    }

    .registration-content .instructions {
        margin-bottom: 34px;
    }


/* ============================================================
   ORDER LOOKUP
   ============================================================ */

.order-search-form {
    width: 100%;
    margin-top: 30px;
}

.order-search-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: stretch;
    width: 100%;
}

.order-search-button {
    min-width: 155px;
    margin-top: 0;
}


/* ============================================================
   INVALID ORDER MESSAGE
   ============================================================ */

.order-error-message {
    width: 100%;
    margin-top: 16px;
    padding: 14px 16px;
    box-sizing: border-box;
    border: 1px solid var(--error-border);
    border-left: 5px solid var(--error-border);
    background: var(--error-background);
    color: var(--error-color);
    font-size: 14px;
    line-height: 1.5;
}

    .order-error-message strong {
        display: block;
        margin-bottom: 4px;
        font-weight: 700;
    }


/* ============================================================
   VERIFIED ORDER
   ============================================================ */

.verified-order {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr);
    gap: 24px;
    width: 100%;
    margin: 36px 0 18px;
    padding: 22px 24px;
    box-sizing: border-box;
    border-left: 5px solid var(--button-background);
    background: var(--verified-background);
}

    .verified-order > div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

.verified-label {
    color: var(--muted-text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.verified-order strong {
    font-size: 15px;
    line-height: 1.4;
}

.verified-message {
    margin-bottom: 30px !important;
    font-weight: 600;
}


/* ============================================================
   WARRANTY FORM
   ============================================================ */

.warranty-form {
    width: 100%;
    margin: 0;
}


/* ============================================================
   FORM SECTIONS
   ============================================================ */

.form-section-heading {
    margin: 38px 0 22px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--section-border);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

    .form-section-heading:first-of-type {
        margin-top: 0;
    }


/* ============================================================
   FORM FIELDS
   ============================================================ */

.form-field {
    width: 100%;
    margin-bottom: 25px;
}

    .form-field label,
    .address-grid label {
        display: block;
        margin-bottom: 9px;
        font-size: 15px;
        font-weight: 400;
    }

.required {
    color: var(--required-color);
}


/* ============================================================
   NAME FIELDS
   ============================================================ */

.name-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 26px;
    width: 100%;
}


/* ============================================================
   ADDRESS FIELDS
   ============================================================ */

.address-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr) minmax(130px, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 25px;
}


/* ============================================================
   INPUT CONTROLS
   ============================================================ */

.warranty-control {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    box-sizing: border-box;
    border: 1px solid var(--input-border);
    border-radius: 0;
    background: var(--input-background);
    color: var(--text-color);
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .warranty-control:hover {
        border-color: #b8cecc;
    }

    .warranty-control:focus {
        border-color: var(--input-focus);
        outline: none;
        box-shadow: 0 0 0 2px rgba(120, 159, 155, 0.20);
    }

    .warranty-control::placeholder {
        color: #747474;
        opacity: 1;
    }


/* ============================================================
   FIELD CAPTIONS
   ============================================================ */

.field-caption {
    display: block;
    margin-top: 7px;
    color: var(--muted-text);
    font-size: 11px;
}


/* ============================================================
   VALIDATION
   ============================================================ */

.validation-summary {
    width: 100%;
    margin: 0 0 24px;
    padding: 0;
    color: var(--error-color);
    font-size: 13px;
    line-height: 1.5;
}

    .validation-summary:empty {
        display: none;
    }

    .validation-summary ul {
        margin: 0;
        padding: 14px 18px 14px 36px;
        border: 1px solid var(--error-border);
        border-left: 5px solid var(--error-border);
        background: var(--error-background);
    }

    .validation-summary li {
        margin: 3px 0;
    }

.validation-message {
    display: block;
    margin-top: 6px;
    color: var(--error-color);
    font-size: 12px;
    line-height: 1.4;
}

    .validation-message:empty {
        display: none;
    }

.input-validation-error {
    border-color: var(--error-border);
    background: #fff7f7;
}

    .input-validation-error:focus {
        border-color: var(--error-border);
        box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.15);
    }


/* ============================================================
   BUTTONS
   ============================================================ */

.submit-button {
    min-width: 130px;
    min-height: 46px;
    margin-top: 8px;
    padding: 12px 28px;
    border: 0;
    border-radius: 0;
    background: var(--button-background);
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

    .submit-button:hover {
        background: var(--button-hover);
    }

    .submit-button:focus {
        outline: 2px solid #000000;
        outline-offset: 2px;
    }

    .submit-button:disabled {
        background: var(--button-disabled);
        cursor: wait;
        opacity: 0.8;
    }


/* Make the order verification button line up with input */

.order-search-grid .submit-button {
    margin-top: 0;
    height: 50px;
}


/* ============================================================
   LINKS
   ============================================================ */

a {
    color: inherit;
}

    a:focus {
        outline: 2px solid #000000;
        outline-offset: 2px;
    }


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 900px) {

    .registration-content {
        width: min(760px, calc(100% - 48px));
        padding: 0 18px;
    }

    .address-grid {
        grid-template-columns: 1fr 1fr;
    }

        .address-grid > div:first-child {
            grid-column: 1 / -1;
        }
}


/* ============================================================
   SMALL TABLET / LARGE PHONE
   ============================================================ */

@media (max-width: 700px) {

    .warranty-hero {
        height: 225px;
    }

    .warranty-title-banner {
        min-height: 80px;
        margin-top: -30px;
        font-size: 22px;
    }

    .registration-content {
        width: calc(100% - 36px);
        margin-top: 48px;
        padding: 0 12px;
    }

    .address-grid {
        grid-template-columns: 1fr;
    }

        .address-grid > div:first-child {
            grid-column: auto;
        }

    .verified-order {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 560px) {

    .warranty-page {
        padding-bottom: 45px;
    }

    .warranty-hero {
        height: 180px;
    }

    .warranty-title-banner {
        width: calc(100% - 28px);
        min-height: 72px;
        padding: 16px;
        font-size: 19px;
        letter-spacing: 0.06em;
    }

    .registration-content {
        width: calc(100% - 24px);
        padding: 0 6px;
    }

    .name-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .order-search-grid {
        grid-template-columns: 1fr;
    }

    .order-search-button {
        width: 100%;
    }

    .order-search-grid .submit-button {
        height: auto;
        min-height: 48px;
    }

    .verified-order {
        padding: 18px;
    }

    .submit-button {
        width: 100%;
    }
}


/* ============================================================
   VERY SMALL SCREENS
   ============================================================ */

@media (max-width: 380px) {

    .registration-content {
        width: calc(100% - 16px);
        padding: 0 4px;
    }

    .warranty-title-banner {
        width: calc(100% - 20px);
        font-size: 17px;
    }

    .warranty-control {
        font-size: 16px;
    }
}
