/**
 * CLICKaligners Header & Navigation Bar
 * Package: CLICKALIGNERS Astra Child Theme
 */

/* ── CLICKaligners My-account & Sidebar Styles (Screenshot 2) ── */
.click-top-header-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 30px;
    width: 100%;
    box-sizing: border-box;
}

.click-top-header-container {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.click-header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
}

.click-header-logo-link svg {
    display: block;
    height: 29px;
    width: auto;
    max-height: 35px;
    transition: opacity 0.2s ease;
}

.click-header-logo-link:hover svg {
    opacity: 0.85;
}

.click-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.click-header-right--guest {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.click-header-policy-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    text-decoration: none !important;
    line-height: 1.2;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.click-header-policy-link svg {
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.click-header-policy-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
    text-decoration: none !important;
    transform: translateY(-1px);
}

.click-header-policy-link:hover svg {
    color: var(--ast-global-color-0);
    transform: scale(1.08);
}

/* Disable footer on auth / login pages */
.page-template-page-entering footer,
.page-template-page-entering .site-footer,
.page-template-page-entering #colophon,
.page-template-page-auth footer,
.page-template-page-auth .site-footer,
.page-template-page-auth #colophon,
.page-entering footer,
.page-entering .site-footer,
.page-entering #colophon,
.click-auth-page footer,
.click-auth-page .site-footer,
.click-auth-page #colophon,
body.ast-no-footer footer,
body.ast-no-footer .site-footer,
body.ast-no-footer #colophon {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

.click-patient-counter-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 12px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.click-patient-counter-badge:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.click-patient-counter-badge:hover .click-counter-value {
    color: var(--ast-global-color-0);
}

.click-bonus-counter-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #fef3c7;
    padding: 6px 14px;
    border-radius: 12px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.05);
}

.click-bonus-counter-badge:hover {
    background: #fffbeb;
    border-color: #fde68a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.12);
}

.click-counter-icon--bonus {
    color: #f59e0b;
}

.click-bonus-counter-badge:hover .click-counter-icon--bonus {
    transform: scale(1.15) rotate(6deg);
}

.click-counter-value--bonus {
    color: #b45309;
}

.click-counter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: transform 0.2s ease;
}

.click-patient-counter-badge:hover .click-counter-icon {
    transform: scale(1.08);
}

.click-counter-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.click-counter-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.click-counter-value {
    font-size: 13px;
    color: #0f172a;
    font-weight: 700;
}

/* Header Order Notifications Bell (Plugin Shortcode) */
.click-header-notifications-wrap {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.click-header-notifications-wrap .wcon-shortcode {
    position: relative;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    align-items: center;
}

.click-header-notifications-wrap .wcon-button {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    position: relative !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.click-header-notifications-wrap .wcon-button:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
}

.click-header-notifications-wrap .wcon-button i {
    font-size: 17px !important;
    line-height: 1 !important;
    color: inherit !important;
}

.click-header-notifications-wrap .wcon-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;
    border-radius: 999px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 14px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4) !important;
    font-family: inherit !important;
}

.click-header-notifications-wrap .wcon-popup {
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.18), 0 0 1px 1px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.click-header-notifications-wrap .wcon-popup-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 14px 18px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.click-header-notifications-wrap .wcon-popup-footer {
    background: #f8fafc !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 12px 18px !important;
}

.click-header-user-profile {
    display: flex;
    align-items: center;
    position: relative;
}

.click-user-profile-trigger {
    background: transparent;
    border: none;
    padding: 4px 6px;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    border-radius: 12px;
    transition: background-color 0.2s ease;
    outline: none;
    -webkit-appearance: none;
}

.click-user-profile-trigger:hover,
.click-dropdown-wrap.is-active .click-user-profile-trigger {
    background-color: #f8fafc;
}

.click-user-avatar-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}

.click-user-avatar-wrap img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.click-user-star-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #f59e0b;
    color: #ffffff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    line-height: 1;
}

.click-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.click-chevron-icon {
    color: #64748b;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.click-dropdown-wrap.is-active .click-chevron-icon {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.click-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 210px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    padding: 6px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
    z-index: 99999;
}

.click-dropdown-wrap.is-active .click-user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.click-dropdown-header {
    padding: 8px 10px 6px;
}

.click-dropdown-user-name {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.click-dropdown-user-role {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 500;
}

.click-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 0;
}

.click-dropdown-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.click-dropdown-list li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.click-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    border-radius: 9px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

.click-dropdown-item:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

.click-dropdown-item--logout {
    color: #ef4444 !important;
}

.click-dropdown-item--logout:hover {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

.click-dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Hide default Astra header completely */
#masthead.site-header,
.main-header-bar-wrap {
    display: none !important;
}

/* Header Responsive Tweaks */
@media (max-width: 768px) {
    .click-patient-counter-badge,
    .click-bonus-counter-badge {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .click-top-header-bar {
        padding: 10px 16px;
    }

    .click-header-logo-link svg {
        height: 24px;
        max-height: 26px;
    }

    .click-header-right {
        gap: 10px;
    }
}

@media (max-width: 460px) {
    .click-user-name {
        display: none;
    }
}

/* Notifications popup on mobile: anchor to the header bar, not to the bell,
   so it spans the screen width instead of sliding off the left edge */
@media (max-width: 768px) {
    .click-top-header-bar {
        position: relative;
    }

    .click-header-notifications-wrap,
    .click-header-notifications-wrap .wcon-shortcode {
        position: static !important;
    }

    .click-header-notifications-wrap .wcon-popup {
        left: 12px !important;
        right: 12px !important;
        top: calc(100% + 8px) !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}
