:root {
    --therapy-ink: #243532;
    --therapy-muted: #6a7b76;
    --therapy-paper: #f4f7f2;
    --therapy-white: #ffffff;
    --therapy-sage: #dce9df;
    --therapy-teal: #2f6f68;
    --therapy-teal-dark: #24544f;
    --therapy-coral: #c66c58;
    --therapy-line: #dce7df;
}

.flash-messages {
    position: fixed;
    top: 1rem;
    right: 3rem;
    z-index: 2000;
    display: flex;
    width: min(380px, calc(100vw - 6rem));
    flex-direction: column;
    gap: .75rem;
    pointer-events: none;
}

.flash-messages .message-box {
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--therapy-line);
    border-left: 4px solid var(--therapy-teal);
    border-radius: 8px;
    background: var(--therapy-ink);
    color: var(--therapy-white);
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.flash-messages .message-box.success { border-left-color: #5f8f63; }
.flash-messages .message-box.error { border-left-color: var(--therapy-coral); }
.flash-messages .message-box.warning { border-left-color: #b88945; }
.flash-messages .message-box.info { border-left-color: var(--therapy-teal); }

.flash-messages .message-content {
    flex: 1;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.flash-messages .message-close {
    flex: 0 0 auto;
    border: 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--therapy-muted);
    color: var(--therapy-white);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.flash-messages .message-close:hover {
    background: var(--therapy-line);
}

@media (max-width: 600px) {
    .flash-messages {
        top: .75rem;
        right: .75rem;
        width: calc(100vw - 1.5rem);
    }
}

.sticky-header .logo-btn {
    flex-shrink: 0;
}

.sticky-header .header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    flex-shrink: 0;
}

.sticky-header .header-spacer{
    flex: 1 1 auto;
    min-width: 12px;
}

.sticky-header .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

/* Logo Button Base Styles */
.logo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.logo-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.logo-btn a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-content {
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}


.btn-icon {
    background: transparent;
    border: none;
    color: #a1a1a1;
    min-width: 48px;
    min-height: 46px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s ease;
    font-size: 16px;
    padding: 8px 10px;
    overflow: visible;
}

.btn-icon a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: inherit;
    text-decoration: none;
    width: auto;
    height: auto;
}

.btn-icon:hover,
.btn-icon:focus {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.2));
    color: #fff;
    box-shadow: 0 0 14px rgba(236, 72, 153, 0.45);
    transform: translateY(-1px);
    outline: none;
}

.btn-icon:hover a,
.btn-icon:focus a {
    color: #fff;
}

.btn-icon:hover i,
.btn-icon:focus i {
    color: #fff;
    text-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}

.btn-text {
    font-size: 12px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: visible;
    max-width: none;
}


body.therapist-theme {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--therapy-paper);
    color: var(--therapy-ink);
}

/* Navigation */
.navbar {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    background: linear-gradient(to bottom, #111111, #18181b);
    border-bottom: 1px solid #27272a;
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.emergency-notice {
    width: 100%;
    flex: 1 0 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 6px;
    padding-top: 0;
    color: var(--therapy-coral);
    background: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-align: center;
}

@media (max-width: 768px) {
    .emergency-notice {
        width: calc(100% + 32px);
        padding-right: 0;
        padding-left: 0;
        font-size: 12px;
    }
}


body.therapist-theme .nav-logo {
    color: var(--therapy-teal);
    padding: 8px 12px;
}

body.therapist-theme .nav-logo span {
    font-family: Georgia, serif;
    font-size: 22px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    padding: 8px 12px;
}

.nav-links {
    display: flex;
    flex: 0 1 auto;
    flex-direction: row;
    margin-left: auto;
    margin-right: auto;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #a1a1a1;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.messages-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d35346;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.nav-links a:hover {
    color: #fff;
}


.nav-buttons {
    display: flex;
    flex: 0 0 auto;
    margin-left: 0;
    gap: 12px;
    align-items: center;
    white-space: nowrap;
}

.nav-buttons .btn {
    padding: 8px 14px;
    font-size: 12px;
}

.btn-secondary {
    display: inline-block;
}

.nav-buttons .btn-primary {
    display: inline-block;
}

.nav-buttons .btn-secondary {
    margin-right: 0;
}


.nav-buttons .btn-primary:hover,
.nav-buttons .btn-secondary:hover {
    background: var(--therapy-teal);
    color: var(--therapy-white);
}

body.therapist-theme .page-content {
    display: block;
}

body.therapist-theme > .hero,
body.therapist-theme > .services,
body.therapist-theme > .features,
body.therapist-theme > section:not(.page-content),
body.therapist-theme > .footer {
    display: none;
}

body.therapist-theme .support-ticket-button,
body.therapist-theme #supportTicketBtn {
    border: 1px solid var(--therapy-line);
    background: var(--therapy-teal);
    box-shadow: 0 10px 24px rgba(47, 111, 104, .24);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.profile-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border: 2px solid transparent;
    background-clip: padding-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.profile-photo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #06b6d4);
    border-radius: 50%;
    z-index: -1;
}

.profile-photo:hover {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(236, 72, 153, 0.5), 0 0 32px rgba(139, 92, 246, 0.3);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile Dropdown Styles */
.profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, rgba(17, 17, 19, 0.98), rgba(24, 24, 27, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
    z-index: 1000;
    min-width: 240px;
    padding: 10px 0 8px;
    margin-top: 10px;
}

.profile-dropdown.active {
    display: block;
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 6px;
}

.profile-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(236, 72, 153, 0.45);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(139, 92, 246, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-dropdown-avatar-fallback {
    font-size: 12px;
    font-weight: 700;
    color: #f5f5f5;
}

.profile-dropdown-user {
    min-width: 0;
    flex: 1;
}

.profile-dropdown-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.profile-dropdown-name {
    display: inline-block;
    color: #f5f5f5;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(251, 191, 36, 0.08));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.profile-rating-badge i {
    font-size: 8px;
}

.profile-dropdown-meta {
    display: flex;
    align-items: center;
    color: #d4d4d8;
    font-size: 10.5px;
    margin-top: 4px;
    line-height: 1.3;
    opacity: 0.9;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
}

.profile-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    padding-left: 24px;
}

.profile-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 16px;
}

.profile-info h1 {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #fff !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.profile-info p {
    font-size: 10px !important;
    color: #a1a1a1 !important;
    margin: 2px 0 0 0 !important;
}

@media (max-width: 720px) {
    .profile-section {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        order: 2;
        min-width: 0;
    }

    .profile-photo {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .profile-info {
        display: block;
        min-width: 0;
    }

    .profile-info h1 {
        font-size: 10px !important;
        white-space: nowrap;
    }

    .profile-info p {
        font-size: 9px !important;
        white-space: nowrap;
    }

    #countryFlagContainer {
        display: none;
    }

    .navbar {
        min-height: 60px;
        padding: 12px 16px;
    }

    .nav-content {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 12px;
        align-items: center;
        width: 100%;
    }

    .nav-content > a:first-child {
        flex: 1 1 auto;
        min-width: 0;
    }

    .nav-links,
    .nav-buttons {
        display: flex;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        flex-direction: row;
        gap: 8px 12px;
        align-items: center;
    }

    .nav-links a {
        white-space: nowrap;
        font-size: 12px;
    }

    .nav-buttons {
        order: 3;
        gap: 8px;
    }

    body.therapist-theme .nav-content {
        width: 100%;
    }

    body.therapist-theme .nav-links::-webkit-scrollbar {
        display: none;
    }
}
