
/* =========================================
   SPRINGFIELD PHARMACY | TWO-LAYER HEADER
   ========================================= */

.springfield-header {
    --sp-green: #236E3B;
    --sp-purple: #23155E;
    --sp-black: #171717;
    --sp-border: #E2EAE4;

    position: relative;
    z-index: 100;
    width: 100%;
    background: #FFFFFF;
    color: var(--sp-black);
    font-family: Inter, Arial, sans-serif;
}

.springfield-header *,
.springfield-header *::before,
.springfield-header *::after {
    box-sizing: border-box;
}

.springfield-header__container {
    width: min(1440px, calc(100% - 60px));
    margin-inline: auto;
}

.springfield-header button,
.springfield-header input {
    font: inherit;
}

.springfield-header a {
    text-decoration: none;
}

.springfield-header a:focus-visible,
.springfield-header button:focus-visible,
.springfield-header input:focus-visible {
    outline: 3px solid #59B532;
    outline-offset: 3px;
}

/* TOP BAR */

.springfield-header__top {
    width: 100%;
    background: var(--sp-purple);
    color: #FFFFFF;
}

.springfield-header__top.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 3px 12px rgba(0,0,0,.12);
}

body.admin-bar .springfield-header__top.is-sticky {
    top: 32px;
}

.springfield-header__top-placeholder {
    display: none;
    height: 0;
}

.springfield-header__top-placeholder.is-active {
    display: block;
}

.springfield-header__top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 42px;
    gap: 20px;
}

.springfield-header__social {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.springfield-header__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #FFFFFF;
}

.springfield-header__social a:hover {
    color: #BCE7A9;
}

.springfield-header__social svg {
    width: 18px;
    height: 18px;
    display: block;
}

.springfield-header__top-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 24px;
}

.springfield-header__top-info span,
.springfield-header__top-info a {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.springfield-header__top-info a:hover {
    color: #BCE7A9;
}

/* MAIN HEADER */

.springfield-header__main {
    background: #FFFFFF;
    border-bottom: 1px solid var(--sp-border);
}

.springfield-header__main-inner {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 32px);
    min-height: 94px;
    padding-block: 14px;
}

/* LOGO */

.springfield-header__logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: 195px;
    max-width: 100%;
    color: var(--sp-purple);
    font-weight: 800;
}

.springfield-header__logo img {
    display: block;
    width: 100%;
    max-height: 70px;
    height: auto;
    object-fit: contain;
}

/* DESKTOP MENU */

.springfield-header__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    gap: clamp(10px, 1.35vw, 22px);
}

.springfield-header__nav a {
    color: var(--sp-black);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    transition: color .2s ease;
}

.springfield-header__nav a:hover {
    color: var(--sp-green);
}

/* HEADER ACTIONS */

.springfield-header__actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 14px;
    margin-left: auto;
}

.springfield-header__search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--sp-black);
    cursor: pointer;
}

.springfield-header__search-toggle:hover,
.springfield-header__search-toggle[aria-expanded="true"] {
    background: #F3F8F1;
    color: var(--sp-green);
}

.springfield-header__search-toggle svg {
    display: block;
    width: 22px;
    height: 22px;
}

.springfield-header a.springfield-header__prescription,
.springfield-header a.springfield-header__mobile-prescription {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 17px;
    border-radius: 7px;
    background: var(--sp-green);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.springfield-header a.springfield-header__prescription:hover,
.springfield-header a.springfield-header__mobile-prescription:hover {
    background: var(--sp-purple);
    color: #FFFFFF;
}

/* COLLAPSIBLE SEARCH */

.springfield-header__search-panel {
    padding: 14px 0 18px;
    background: #F3F8F1;
    border-top: 1px solid var(--sp-border);
}

.springfield-header__search-panel[hidden],
.springfield-header__mobile-nav[hidden] {
    display: none !important;
}

.springfield-header__search {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    background: #FFFFFF;
    border: 1px solid #D5E1D7;
    border-radius: 8px;
    overflow: hidden;
}

.springfield-header__search input[type="search"] {
    flex: 1;
    min-width: 0;
    width: auto;
    height: 48px;
    margin: 0;
    padding: 12px 16px;
    border: 0;
    border-radius: 0;
    background: #FFFFFF;
    box-shadow: none;
    color: var(--sp-black);
    font-size: 14px;
    font-weight: 600;
}

.springfield-header__search input::placeholder {
    color: #616161;
    opacity: 1;
    font-weight: 500;
}

.springfield-header__search button {
    flex-shrink: 0;
    padding: 0 24px;
    border: 0;
    border-radius: 0;
    background: var(--sp-green);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.springfield-header__search button:hover {
    background: var(--sp-purple);
    color: #FFFFFF;
}

.springfield-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* MOBILE MENU BUTTON */

.springfield-header__toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--sp-border);
    border-radius: 8px;
    background: #FFFFFF;
    cursor: pointer;
}

.springfield-header__toggle span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: var(--sp-black);
}

/* TABLET AND MOBILE NAVIGATION */

@media (max-width: 1250px) {
    .springfield-header__nav {
        display: none;
    }

    .springfield-header a.springfield-header__prescription {
        display: none;
    }

    .springfield-header__toggle {
        display: flex;
    }

    .springfield-header__main-inner {
        min-height: 78px;
    }

    .springfield-header__mobile-nav:not([hidden]) {
        display: flex;
        flex-direction: column;
        padding: 10px max(20px, calc((100% - 1440px) / 2))
                 22px;
        border-top: 1px solid var(--sp-border);
        background: #F3F8F1;
        max-height: 75vh;
        overflow-y: auto;
    }

    .springfield-header__mobile-nav > a {
        display: block;
        padding: 14px 8px;
        border-bottom: 1px solid #DCE6DD;
        color: var(--sp-black);
        font-size: 14px;
        font-weight: 700;
        line-height: 1.4;
    }

    .springfield-header__mobile-nav > a:hover {
        color: var(--sp-green);
    }

    .springfield-header
    .springfield-header__mobile-prescription {
        align-self: flex-start;
        margin-top: 16px;
        border-bottom: 0;
        color: #FFFFFF;
    }
}

/* SMALL TABLETS */

@media (max-width: 782px) {
    body.admin-bar .springfield-header__top.is-sticky {
        top: 46px;
    }
}

/* PHONES */

@media (max-width: 600px) {
    .springfield-header__container {
        width: calc(100% - 28px);
    }

    .springfield-header__top-inner {
        min-height: 40px;
        gap: 8px;
    }

    .springfield-header__location {
        display: none;
    }

    .springfield-header__social {
        gap: 5px;
    }

    .springfield-header__social a {
        width: 30px;
        height: 30px;
    }

    .springfield-header__social svg {
        width: 17px;
        height: 17px;
    }

    .springfield-header__top-info {
        flex-wrap: nowrap;
    }

    .springfield-header__top-info a {
        font-size: 11px;
        white-space: nowrap;
    }

    .springfield-header__main-inner {
        min-height: 72px;
        gap: 10px;
        padding-block: 10px;
    }

    .springfield-header__logo {
        width: 155px;
        min-width: 0;
    }

    .springfield-header__logo img {
        max-height: 55px;
    }

    .springfield-header__actions {
        gap: 4px;
    }

    .springfield-header__search-toggle,
    .springfield-header__toggle {
        width: 42px;
        height: 42px;
    }

    .springfield-header__search {
        max-width: 100%;
    }

    .springfield-header__search input[type="search"] {
        height: 44px;
        padding: 10px 12px;
        font-size: 13px;
    }

    .springfield-header__search button {
        padding: 0 13px;
        font-size: 12px;
    }

    .springfield-header__mobile-nav:not([hidden]) {
        padding-inline: 14px;
    }
}

@media (max-width: 360px) {
    .springfield-header__logo {
        width: 130px;
    }

    .springfield-header__actions {
        gap: 2px;
    }

    .springfield-header__search-toggle,
    .springfield-header__toggle {
        width: 40px;
        height: 40px;
    }

    .springfield-header__search button {
        padding-inline: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .springfield-header__nav a {
        transition: none;
    }
}


/* ==========================================
   TOP BAR OPENING HOURS
   ========================================== */

.springfield-header__top-info {
    gap: 10px 22px;
}

.springfield-header__hours {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15px;
}

.springfield-header__hours strong {
    font-weight: 800;
}

.springfield-header__phone {
    white-space: nowrap;
}

/* Tablets */

@media (max-width: 1024px) {
    .springfield-header__top-inner {
        flex-wrap: wrap;
        justify-content: center;
        padding-block: 6px;
    }

    .springfield-header__top-info {
        justify-content: center;
        text-align: center;
    }
}

/* Mobile */

@media (max-width: 600px) {
    .springfield-header__top-inner {
        flex-direction: column;
        gap: 4px;
        padding-block: 7px;
    }

    .springfield-header__social {
        justify-content: center;
    }

    .springfield-header__top-info {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        width: 100%;
    }

    .springfield-header__hours {
        max-width: 100%;
        font-size: 10px;
        line-height: 1.6;
        text-align: center;
    }

    .springfield-header__phone {
        font-size: 11px;
        font-weight: 700;
    }
}


/* Disable sticky top bar on tablets and phones */

@media (max-width: 1024px) {

    .springfield-header .springfield-header__top,
    .springfield-header .springfield-header__top.is-sticky {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        box-shadow: none !important;
    }

    .springfield-header__top-placeholder,
    .springfield-header__top-placeholder.is-active {
        display: none !important;
        height: 0 !important;
    }

}


/* ==========================================
   TOP BAR: DESKTOP ONLY
   ========================================== */

/* Desktop: display the top bar */
@media (min-width: 1025px) {
    .springfield-header__top {
        display: block;
    }
}

/* Tablet and mobile: hide the top bar */
@media (max-width: 1024px) {
    .springfield-header__top,
    .springfield-header__top.is-sticky {
        display: none !important;
    }

    /* Remove any space reserved for the sticky bar */
    .springfield-header__top-placeholder,
    .springfield-header__top-placeholder.is-active {
        display: none !important;
        height: 0 !important;
    }
}




/* ==========================================
   SPRINGFIELD - GLOBAL PAGE BACKGROUND
   ========================================== */

html,
body {
    background-color: #FFFFFF !important;
}

/* Blocksy's main page wrapper */
#main-container,
.site-main,
.ct-container-full,
.ct-container {
    background-color: #FFFFFF;
}



/* ==========================================
   SPRINGFIELD HEADER - UPPERCASE NAVIGATION
   ========================================== */

/* Desktop navigation links */

.springfield-header .springfield-header__nav a {
    text-transform: uppercase !important;
    letter-spacing: 0.3px;
}

/* Mobile navigation links */

.springfield-header
.springfield-header__mobile-nav > a:not(.springfield-header__mobile-prescription) {
    text-transform: uppercase !important;
    letter-spacing: 0.3px;
}

/* Keep Prescription Requests button in title case */

.springfield-header a.springfield-header__prescription,
.springfield-header a.springfield-header__mobile-prescription {
    text-transform: none !important;
    letter-spacing: normal;
}
