@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap");

:root {
    --pf-ink: #10212b;
    --pf-muted: #647481;
    --pf-line: #dbe7ea;
    --pf-soft: #f3faf9;
    --pf-teal: #04766d;
    --pf-coral: #ff6b4a;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid rgba(219, 231, 234, .82);
    box-shadow: 0 14px 40px rgba(16, 33, 43, .06);
    backdrop-filter: blur(18px);
    font-family: "Poppins", Arial, sans-serif;
}

body:has(.public-header) {
    display: block;
    place-items: initial;
    padding: 0;
}

body:has(.public-header) .login-container {
    margin: 32px auto 56px;
}

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

.public-header a {
    color: inherit;
    text-decoration: none;
}

.public-header .container {
    width: min(1280px, calc(100% - 32px));
    min-height: 82px;
    display: grid;
    grid-template-columns: 210px minmax(220px, 330px) minmax(0, 1fr) max-content;
    gap: 16px;
    align-items: center;
    margin-inline: auto;
}

.public-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pf-ink);
    font-weight: 800;
    white-space: nowrap;
    min-width: 0;
}

.public-header .logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 10px 16px rgba(4, 118, 109, .18));
}

.public-header .logo-text {
    max-width: 148px;
    font-size: 1rem;
    line-height: 1.2;
    white-space: normal;
    letter-spacing: 0;
}

.public-header .search-form {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(4, 118, 109, .18);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfefd 100%);
    box-shadow: 0 12px 30px rgba(16, 33, 43, .08);
}

.public-header .search-form:focus-within {
    border-color: rgba(4, 118, 109, .46);
    box-shadow: 0 0 0 4px rgba(4, 118, 109, .10), 0 16px 34px rgba(16, 33, 43, .10);
}

.public-header .form-control {
    width: 100%;
    min-width: 0;
    height: 46px;
    min-height: 46px;
    padding: 0 14px 0 17px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--pf-ink);
    font: inherit;
    line-height: 46px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-header .form-control::placeholder {
    color: #4f6470;
    opacity: 1;
}

.public-header .search-button {
    width: 52px;
    min-width: 52px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pf-teal), #11a796);
    cursor: pointer;
    font-size: 0;
}

.public-header .search-button::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.public-header .menu {
    min-width: 0;
    display: flex;
    justify-content: flex-start;
    overflow: hidden;
    padding-left: 8px;
}

.public-header .menu-list {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-header .menu-item {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

.public-header .menu-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    color: #425460;
    font-size: .84rem;
    font-weight: 700;
}

.public-header .menu-link:hover,
.public-header .menu-link.active {
    color: var(--pf-teal);
}

.public-header .menu-login-item,
.public-header .menu-actions-item {
    display: none;
}

.public-header .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    width: max-content;
    white-space: nowrap;
}

.public-header .btn {
    min-width: 68px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 13px;
    background: linear-gradient(135deg, var(--pf-teal), #12a594);
    color: #ffffff;
    font-size: .88rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(4, 118, 109, .18);
}

.public-header .btn.is-authenticated {
    max-width: 88px;
    min-width: 74px;
    overflow: hidden;
    border-color: rgba(4, 118, 109, .18);
    background: #e6f6f3;
    color: var(--pf-teal);
    text-overflow: ellipsis;
    box-shadow: none;
}

.public-header .public-logout-link {
    min-width: 52px;
    padding-inline: 12px;
    border-color: rgba(4, 118, 109, .14);
    background: #ffffff;
    color: #425460;
    box-shadow: 0 10px 22px rgba(16, 33, 43, .06);
}

.public-header .icon-badge {
    position: relative;
    width: 38px;
    min-width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(4, 118, 109, .14);
    border-radius: 12px;
    background: #ffffff;
    color: var(--pf-ink);
    font-size: 0;
    box-shadow: 0 10px 24px rgba(16, 33, 43, .06);
}

.public-header .header-actions .icon-badge:nth-child(2) {
    border-color: rgba(4, 118, 109, .28);
    background: linear-gradient(135deg, var(--pf-teal), #12a594);
    color: #ffffff;
}

.public-header .icon-badge i {
    color: currentColor;
    font-size: 16px;
    line-height: 1;
}

.public-header .icon-badge.has-count::after,
.public-header .menu-action-link.has-count::after {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--pf-coral);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.public-header .customer-notification-button[hidden] {
    display: none !important;
}

.public-header .menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    border: 1px solid rgba(4, 118, 109, .14);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f5fbfa 100%);
    color: var(--pf-ink);
    cursor: pointer;
}

.public-header .menu-toggle::before {
    content: "\f0c9";
    font-family: "Font Awesome 6 Free";
    font-size: 18px;
    font-weight: 900;
}

.public-header .menu-toggle[aria-expanded="true"]::before {
    content: "\f00d";
}

.public-header .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .public-header .container {
        grid-template-columns: auto 1fr auto;
    }

    .public-header .search-form {
        grid-column: 2 / 3;
        grid-row: 1;
    }

    .public-header .header-actions {
        grid-column: 3 / 4;
        grid-row: 1;
    }

    .public-header .menu {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        overflow-x: auto;
    }
}

@media (max-width: 820px) {
    .public-header .container {
        grid-template-columns: auto 1fr auto;
        min-height: auto;
        padding: 12px 0;
    }

    .public-header .menu {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-height: 0;
        display: block;
        overflow: hidden;
        padding-left: 0;
        transition: max-height .24s ease, padding-top .24s ease;
    }

    .public-header .menu.active {
        max-height: 440px;
        padding-top: 10px;
    }

    .public-header .menu-list {
        display: grid;
        gap: 8px;
        padding: 12px;
        border: 1px solid rgba(4, 118, 109, .14);
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 16px 38px rgba(16, 33, 43, .10);
    }

    .public-header .menu-link {
        width: 100%;
        justify-content: flex-start;
        min-height: 48px;
        padding: 0 14px;
        border-radius: 8px;
        font-size: 1rem;
    }

    .public-header .menu-login-item {
        display: block;
        padding-top: 10px;
        margin-top: 8px;
        border-top: 1px solid var(--pf-line);
    }

    .public-header .menu-login-link {
        justify-content: center;
        background: linear-gradient(135deg, var(--pf-teal), #12a594);
        color: #ffffff;
        box-shadow: 0 14px 30px rgba(4, 118, 109, .20);
    }

    .public-header .menu-login-link.is-authenticated {
        background: #e6f6f3;
        color: var(--pf-teal);
        box-shadow: none;
    }

    .public-header .menu-login-item .public-logout-link {
        justify-content: center;
        border: 1px solid rgba(4, 118, 109, .14);
        background: #ffffff;
        color: #425460;
        box-shadow: 0 8px 18px rgba(16, 33, 43, .05);
    }

    .public-header .menu-actions-item {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding-top: 10px;
    }

    .public-header .menu-action-link {
        position: relative;
        min-height: 46px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid rgba(4, 118, 109, .16);
        border-radius: 8px;
        background: #f7fbfa;
        color: var(--pf-ink);
        font-size: .9rem;
        font-weight: 800;
    }

    .public-header .menu-actions-item .menu-action-link:nth-child(2) {
        border-color: rgba(4, 118, 109, .30);
        background: linear-gradient(135deg, var(--pf-teal), #12a594);
        color: #ffffff;
    }

    .public-header .menu-toggle {
        display: grid;
    }

    .public-header .header-actions .btn {
        display: none;
    }
}

@media (max-width: 560px) {
    .public-header .container {
        width: min(100% - 22px, 1180px);
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .public-header .search-form {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 100%;
    }

    .public-header .menu {
        grid-row: 3;
    }

    .public-header .logo-text {
        font-size: .88rem;
    }

    .public-header .logo img {
        width: 44px;
        height: 44px;
    }

    .public-header .header-actions {
        grid-column: 2 / 3;
        gap: 8px;
    }

    .public-header .icon-badge,
    .public-header .menu-toggle {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
}
