/**
 * ENNU Panel Premium Styles
 * Sophisticated header and navigation design for Provider & Practice Manager portals
 * Version: 2.0.0
 */

/* ============================================
   GLOBAL PANEL STYLES
   ============================================ */

.ennu-premium-panel {
    margin: 0 !important;
    padding: 0 !important;
}

.ennu-panel-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: visible;
}

.ennu-panel-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e5e7eb;
    overflow: visible;
}

/* CRITICAL FIX: Patient Portal Header Background - Override white background */
.patient-portal-wrapper .ennu-panel-header-wrapper,
.patient-portal .ennu-panel-header-wrapper,
body.patient-portal .ennu-panel-header-wrapper,
body.ennu-patient-portal .ennu-panel-header-wrapper {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    box-shadow: 0 2px 12px rgba(30, 64, 175, 0.1) !important;
}

.patient-portal-wrapper .ennu-panel-header,
.patient-portal .ennu-panel-header,
body.patient-portal .ennu-panel-header,
body.ennu-patient-portal .ennu-panel-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border-bottom: 1px solid #bae6fd !important;
}

/* Force header container display with maximum specificity */
body.provider-panel .ennu-panel-header .ennu-header-container,
.ennu-panel-header .ennu-header-container,
.ennu-header-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 80px !important;
    overflow: visible !important;
    max-width: 100% !important;
    padding: 0 32px !important;
}

/* Ensure flexbox layout is preserved */
body.provider-panel .ennu-header-top,
.ennu-header-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: auto !important;
    min-height: 60px !important;
}

body.provider-panel .ennu-branding,
body.provider-panel .ennu-employee-profile,
body.provider-panel .ennu-quick-actions,
.ennu-branding,
.ennu-employee-profile,
.ennu-quick-actions {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
}

/* ============================================
   TOP BAR LAYOUT
   ============================================ */

.ennu-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ennu-header-left,
.ennu-header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* ============================================
   BRANDING & LOGO
   ============================================ */

.ennu-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ennu-logo-link,
.ennu-logo-text-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.ennu-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.ennu-logo-text {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* CRITICAL FIX: Patient Portal Logo Text - Ensure visible */
.patient-portal-wrapper .ennu-logo-text,
.patient-portal .ennu-logo-text,
body.patient-portal .ennu-logo-text,
body.ennu-patient-portal .ennu-logo-text {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.ennu-portal-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #4f46e5;
    transition: all 0.3s ease;
}

.ennu-portal-badge.practice-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 100%);
    border-color: #fde68a;
    color: #d97706;
}

.ennu-portal-badge .badge-icon {
    color: #4f46e5;
}

.ennu-portal-badge.practice-badge .badge-icon {
    color: #d97706;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */

.ennu-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ennu-action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ennu-action-btn:hover {
    background: #ffffff;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* CRITICAL FIX: Patient Portal Action Buttons - Ensure visible */
.patient-portal-wrapper .ennu-action-btn,
.patient-portal .ennu-action-btn,
body.patient-portal .ennu-action-btn,
body.ennu-patient-portal .ennu-action-btn {
    color: #1e40af !important;
    border-color: #93c5fd !important;
    background: #ffffff !important;
}

.patient-portal-wrapper .ennu-action-btn:hover,
.patient-portal .ennu-action-btn:hover,
body.patient-portal .ennu-action-btn:hover,
body.ennu-patient-portal .ennu-action-btn:hover {
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    background: #ffffff !important;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* ============================================
   USER PROFILE DROPDOWN
   ============================================ */

.ennu-user-profile {
    position: relative;
}

.ennu-user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ennu-user-dropdown-trigger:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

.user-role {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.2;
}

.dropdown-arrow {
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.ennu-user-dropdown-trigger:hover .dropdown-arrow {
    transform: translateY(2px);
}

.ennu-user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.ennu-user-profile:hover .ennu-user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ennu-user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ennu-user-dropdown-menu .dropdown-item:hover {
    background: #f9fafb;
    color: #ef4444;
}

.ennu-user-dropdown-menu .dropdown-item svg {
    color: #9ca3af;
    transition: color 0.2s ease;
}

.ennu-user-dropdown-menu .dropdown-item:hover svg {
    color: #ef4444;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.ennu-header-nav {
    padding: 0;
    overflow: visible !important;
    position: relative;
    z-index: 999;
}

.ennu-main-navigation {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-start;
    overflow: visible !important;
    position: relative;
}

.ennu-nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap; /* Allow wrapping to multiple lines */
    max-width: 100%;
    overflow: visible !important;
}

.ennu-nav-item {
    position: relative;
    list-style: none;
    display: flex !important;
    align-items: center;
}

.ennu-nav-link {
    display: flex !important;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 14px 20px;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* CRITICAL FIX: Patient Portal - Override white text with dark blue */
.patient-portal-wrapper .ennu-nav-link,
.patient-portal .ennu-nav-link,
body.patient-portal .ennu-nav-link,
body.ennu-patient-portal .ennu-nav-link {
    color: #1e40af !important;
}

.ennu-nav-link:visited {
    color: #ffffff !important;
}

.ennu-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* CRITICAL FIX: Patient Portal Navigation - Override all white text states */
.patient-portal-wrapper .ennu-nav-link:visited,
.patient-portal .ennu-nav-link:visited,
body.patient-portal .ennu-nav-link:visited,
body.ennu-patient-portal .ennu-nav-link:visited {
    color: #1e40af !important;
}

.patient-portal-wrapper .ennu-nav-link:hover,
.patient-portal .ennu-nav-link:hover,
body.patient-portal .ennu-nav-link:hover,
body.ennu-patient-portal .ennu-nav-link:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
}

.ennu-nav-link.has-dropdown {
    padding-right: 16px;
}

.dropdown-icon {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.ennu-nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
    color: #ffffff;
}

/* CRITICAL FIX: Patient Portal Dropdown Icons - Override white */
.patient-portal-wrapper .dropdown-icon,
.patient-portal .dropdown-icon,
body.patient-portal .dropdown-icon,
body.ennu-patient-portal .dropdown-icon {
    color: #1e40af !important;
}

.patient-portal-wrapper .ennu-nav-item:hover .dropdown-icon,
.patient-portal .ennu-nav-item:hover .dropdown-icon,
body.patient-portal .ennu-nav-item:hover .dropdown-icon,
body.ennu-patient-portal .ennu-nav-item:hover .dropdown-icon {
    color: #3b82f6 !important;
}

.aesthetics-provider-panel-wrapper .dropdown-icon {
    color: rgba(255, 255, 255, 0.7) !important;
}

.aesthetics-provider-panel-wrapper .ennu-nav-item:hover .dropdown-icon {
    color: #ffffff !important;
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */

.ennu-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    margin: 0;
}

.ennu-nav-item:hover .ennu-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Dropdown item list styling */
.ennu-dropdown-menu .ennu-dropdown-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Ensure dropdown items are always readable */
.ennu-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-inner {
    padding: 8px;
}

.ennu-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ennu-dropdown-menu .dropdown-item:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    color: #3b82f6;
    transform: translateX(4px);
}

.ennu-dropdown-menu .dropdown-item .item-text {
    flex: 1;
}

/* ============================================
   CONTENT AREA
   ============================================ */

.ennu-panel-content {
    min-height: calc(100vh - 160px);
    background: #f9fafb;
    padding: 0;
}

.ennu-content-container {
    max-width: 100%;
    padding: 0;
    margin: 0;
    width: 100%;
}

.ennu-main-content {
    background: transparent;
}

.ennu-panel-article {
    background: transparent;
}

.ennu-panel-article .entry-content {
    padding: 0;
}

/* ============================================
   NO MENU FALLBACK
   ============================================ */

.ennu-no-menu {
    padding: 16px 24px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   PROVIDER PANEL SPECIFIC COLORS
   ============================================ */

/* Apply same navigation fixes to all panel templates */
/* Fix overflow for all navigation containers */
.provider-panel .ennu-header-nav,
.practice-manager-panel .ennu-header-nav,
.aesthetics-practice-manager-panel .ennu-header-nav,
.patient-portal .ennu-header-nav,
.provider-panel .ennu-main-navigation,
.practice-manager-panel .ennu-main-navigation,
.aesthetics-practice-manager-panel .ennu-main-navigation,
.patient-portal .ennu-main-navigation {
    overflow: visible !important;
    position: relative;
}

/* Navigation menu - wrap items for all panels */
.provider-panel-wrapper .ennu-nav-menu,
.provider-panel .ennu-nav-menu,
.practice-manager-panel-wrapper .ennu-nav-menu,
.practice-manager-panel .ennu-nav-menu,
.aesthetics-practice-manager-panel-wrapper .ennu-nav-menu,
.aesthetics-practice-manager-panel .ennu-nav-menu,
.patient-portal-wrapper .ennu-nav-menu,
.patient-portal .ennu-nav-menu {
    overflow: visible !important;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping to multiple lines */
    gap: 2px;
    row-gap: 4px;
}

/* Consistent smaller nav links for all panels */
.provider-panel .ennu-nav-link,
.practice-manager-panel .ennu-nav-link,
.aesthetics-practice-manager-panel .ennu-nav-link,
.patient-portal .ennu-nav-link {
    padding: 8px 12px !important;
    font-size: 13px !important;
}

/* Fix dropdowns for all panels */
.provider-panel .ennu-dropdown-menu,
.practice-manager-panel .ennu-dropdown-menu,
.aesthetics-practice-manager-panel .ennu-dropdown-menu,
.patient-portal .ennu-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 10000 !important; /* Consistent high z-index for all dropdowns */
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15) !important;
    padding: 8px 0 !important;
    min-width: 220px !important;
}

/* Ensure dropdowns show on hover for all panels */
.provider-panel .ennu-nav-item:hover .ennu-dropdown-menu,
.practice-manager-panel .ennu-nav-item:hover .ennu-dropdown-menu,
.aesthetics-practice-manager-panel .ennu-nav-item:hover .ennu-dropdown-menu,
.patient-portal .ennu-nav-item:hover .ennu-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

.provider-panel-wrapper .ennu-panel-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.provider-panel-wrapper .ennu-nav-link:hover {
    color: #3b82f6;
}

.provider-panel-wrapper .ennu-dropdown-menu .dropdown-item:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
}

/* ============================================
   PRACTICE MANAGER SPECIFIC COLORS
   ============================================ */

.practice-manager-panel-wrapper .ennu-panel-header {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.practice-manager-panel-wrapper .ennu-portal-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-color: #fbbf24;
    color: #d97706;
}

.practice-manager-panel-wrapper .ennu-nav-link:hover {
    color: #d97706;
}

.practice-manager-panel-wrapper .ennu-dropdown-menu .dropdown-item:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    color: #d97706;
}

.practice-manager-panel-wrapper .ennu-action-btn:hover {
    border-color: #d97706;
    color: #d97706;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
}

/* ============================================
   AESTHETICS PRACTICE MANAGER SPECIFIC COLORS
   ============================================ */

.aesthetics-practice-manager-panel-wrapper {
    background: linear-gradient(135deg, #f3e8ff 0%, #fef3c7 50%, #ecfdf5 100%);
}

.aesthetics-practice-manager-panel-wrapper .ennu-panel-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.aesthetics-practice-manager-panel-wrapper .ennu-portal-badge {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-color: #c084fc;
    color: #7c3aed;
}

.aesthetics-practice-manager-panel-wrapper .ennu-portal-badge .badge-icon {
    color: #a855f7;
}

.aesthetics-practice-manager-panel-wrapper .ennu-nav-link:hover {
    color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.aesthetics-practice-manager-panel-wrapper .ennu-dropdown-menu .dropdown-item:hover {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7c3aed;
}

.aesthetics-practice-manager-panel-wrapper .ennu-action-btn:hover {
    border-color: #a855f7;
    color: #a855f7;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}

.aesthetics-practice-manager-panel-wrapper .ennu-user-dropdown-menu .dropdown-item:hover {
    color: #a855f7;
}

.aesthetics-practice-manager-panel-wrapper .ennu-user-dropdown-menu .dropdown-item:hover svg {
    color: #a855f7;
}

/* ============================================
   AESTHETICS PROVIDER SPECIFIC COLORS
   ============================================ */

.aesthetics-provider-panel-wrapper {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 50%, #fef3c7 100%);
}

/* Simplified navigation fix for aesthetics provider panel */
/* Allow all containers to overflow properly */
.aesthetics-provider-panel-wrapper .ennu-header-nav,
.aesthetics-provider-panel .ennu-header-nav,
.aesthetics-provider-panel-wrapper .ennu-main-navigation,
.aesthetics-provider-panel .ennu-main-navigation {
    overflow: visible !important;
    position: relative;
}

/* Navigation menu - wrap items and reduce size for better fit */
.aesthetics-provider-panel-wrapper .ennu-nav-menu,
.aesthetics-provider-panel .ennu-nav-menu {
    overflow: visible !important;
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to second line */
    gap: 2px;
    row-gap: 4px;
    max-width: 100%;
}

/* Make nav items smaller to fit more */
.aesthetics-provider-panel-wrapper .ennu-nav-item,
.aesthetics-provider-panel .ennu-nav-item {
    position: relative;
}

/* Smaller navigation links */
.aesthetics-provider-panel-wrapper .ennu-nav-link,
.aesthetics-provider-panel .ennu-nav-link {
    padding: 8px 12px !important; /* Reduced padding */
    font-size: 13px !important; /* Smaller font */
}

/* Dropdown menus - standard positioning */
.aesthetics-provider-panel-wrapper .ennu-dropdown-menu,
.aesthetics-provider-panel .ennu-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 10000 !important; /* Ensure dropdowns are above everything */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* Show dropdown on hover */
.aesthetics-provider-panel-wrapper .ennu-nav-item:hover .ennu-dropdown-menu,
.aesthetics-provider-panel .ennu-nav-item:hover .ennu-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

/* Dropdown menu styling */
.aesthetics-provider-panel-wrapper .ennu-dropdown-menu,
.aesthetics-provider-panel .ennu-dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15) !important;
    padding: 8px 0 !important;
    min-width: 220px !important;
}

.aesthetics-provider-panel-wrapper .ennu-panel-header {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #2d3748 100%);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.aesthetics-provider-panel-wrapper .ennu-portal-badge {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-color: #d1d5db;
    color: #374151;
}

.aesthetics-provider-panel-wrapper .ennu-portal-badge .badge-icon {
    color: #6b7280;
}

.aesthetics-provider-panel-wrapper .ennu-nav-link {
    color: #ffffff !important;
}

.aesthetics-provider-panel-wrapper .ennu-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.aesthetics-provider-panel-wrapper .ennu-dropdown-menu .dropdown-item:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
}

.aesthetics-provider-panel-wrapper .ennu-action-btn:hover {
    border-color: #6b7280;
    color: #6b7280;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.15);
}

.aesthetics-provider-panel-wrapper .ennu-user-dropdown-menu .dropdown-item:hover {
    color: #6b7280;
}

.aesthetics-provider-panel-wrapper .ennu-user-dropdown-menu .dropdown-item:hover svg {
    color: #6b7280;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .ennu-header-container {
        padding: 0 24px;
    }

    .ennu-nav-link {
        padding: 12px 16px;
        font-size: 13px;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 992px) {
    .ennu-header-container {
        padding: 0 16px;
    }

    .ennu-header-top {
        flex-wrap: wrap;
        gap: 16px;
    }

    .ennu-quick-actions {
        gap: 4px;
    }

    .ennu-action-btn {
        width: 36px;
        height: 36px;
    }

    .ennu-nav-menu {
        flex-wrap: wrap;
    }
}

/* Desktop Navigation (default - show desktop, hide mobile) */
.ennu-mobile-nav-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.ennu-mobile-nav-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.ennu-mobile-nav,
.ennu-mobile-nav-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .ennu-header-container {
        padding: 0 12px;
    }

    .ennu-portal-badge .badge-text {
        display: none;
    }

    .ennu-logo {
        height: 32px;
    }

    /* Hide desktop navigation on mobile */
    .ennu-nav-menu {
        display: none;
    }

    .ennu-header-nav {
        display: none;
    }

    /* Show mobile navigation toggle on mobile */
    .ennu-mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-left: 12px;
    }

    .ennu-mobile-nav-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }

    .ennu-mobile-nav-toggle svg {
        width: 20px;
        height: 20px;
        color: #ffffff;
        transition: transform 0.3s ease;
    }

    .ennu-mobile-nav-toggle.active svg {
        transform: rotate(90deg);
    }

    /* Mobile Navigation Overlay */
    .ennu-mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .ennu-mobile-nav-overlay.active {
        display: block !important;
        opacity: 1;
        visibility: visible;
        position: fixed !important;
        left: auto !important;
    }

    /* Mobile Navigation Panel */
    .ennu-mobile-nav {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100%;
        background: #ffffff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10000;
        overflow-y: auto;
    }

    .ennu-mobile-nav.active {
        display: block !important;
        right: 0;
        position: fixed !important;
        left: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .ennu-mobile-nav-header {
        padding: 20px;
        border-bottom: 1px solid #f3f4f6;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #f8fafc;
    }

    .ennu-mobile-nav-title {
        font-size: 18px;
        font-weight: 600;
        color: #1f2937;
        margin: 0;
    }

    .ennu-mobile-nav-close {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        border-radius: 6px;
        transition: background-color 0.2s ease;
        color: #6b7280;
    }

    .ennu-mobile-nav-close:hover {
        background: #f3f4f6;
        color: #374151;
    }

    .ennu-mobile-nav-close svg {
        width: 20px;
        height: 20px;
    }

    .ennu-mobile-nav-content {
        padding: 16px 0;
    }

    .ennu-mobile-nav .ennu-nav-menu {
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0;
    }

    .ennu-mobile-nav .ennu-nav-item {
        border-bottom: 1px solid #f3f4f6;
        margin: 0;
    }

    .ennu-mobile-nav .ennu-nav-link {
        padding: 16px 20px;
        width: 100%;
        justify-content: space-between;
        font-size: 16px;
        border-radius: 0;
        color: #374151;
        text-decoration: none;
    }

    .ennu-mobile-nav .ennu-nav-link:hover {
        background: #f8fafc;
        color: #1f2937;
    }

    .ennu-mobile-nav .ennu-nav-link.has-dropdown {
        padding-right: 16px;
    }

    .ennu-mobile-nav .ennu-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: #f8fafc;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        margin: 0;
        padding: 0;
    }

    .ennu-mobile-nav .ennu-nav-item.expanded .ennu-dropdown-menu {
        max-height: 1000px;
        padding: 8px 0;
    }

    .ennu-mobile-nav .ennu-dropdown-menu .dropdown-item {
        padding: 12px 40px;
        border-bottom: 1px solid #e5e7eb;
        color: #6b7280;
    }

    .ennu-mobile-nav .ennu-dropdown-menu .dropdown-item:hover {
        background: #f3f4f6;
        color: #374151;
    }

    .ennu-content-container {
        padding: 0;
        margin: 0;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ennu-dropdown-menu,
.ennu-user-dropdown-menu {
    animation: slideDown 0.3s ease;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.ennu-nav-link:focus,
.ennu-action-btn:focus,
.ennu-user-dropdown-trigger:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.dropdown-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .ennu-panel-header-wrapper {
        display: none;
    }

    .ennu-panel-content {
        padding: 0;
        background: white;
    }
}

/* ============================================
   EMPLOYEE PROFILE SECTION
   ============================================ */

.ennu-employee-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 320px;
}

.employee-avatar-section {
    flex-shrink: 0;
}

.employee-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.employee-details {
    flex: 1;
    min-width: 0;
}

.employee-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-title {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 6px;
    font-weight: 500;
}

.employee-contact {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #495057;
}

.contact-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.contact-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ============================================
   AESTHETICS BADGE STYLING
   ============================================ */

.aesthetics-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.aesthetics-badge .badge-icon {
    color: #ffd700;
}

/* ============================================
   ENHANCED MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 1200px) {
    .ennu-header-container {
        padding: 0 24px;
    }

    .ennu-employee-profile {
        max-width: 280px;
    }

    .contact-text {
        max-width: 150px;
    }
}

@media (max-width: 992px) {
    .ennu-header-container {
        padding: 0 20px;
    }

    .ennu-header-top {
        padding: 12px 0;
        gap: 16px;
    }

    .ennu-employee-profile {
        max-width: 240px;
        padding: 6px 12px;
    }

    .employee-avatar {
        width: 40px;
        height: 40px;
    }

    .employee-name {
        font-size: 14px;
    }

    .employee-title {
        font-size: 11px;
    }

    .employee-contact {
        font-size: 10px;
    }

    .contact-text {
        max-width: 120px;
    }

    .ennu-quick-actions {
        gap: 8px;
    }

    .ennu-action-btn {
        width: 36px;
        height: 36px;
        padding: 8px;
    }

    .ennu-action-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    /* Mobile-first navigation */
    .ennu-header-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }

    .mobile-menu-toggle:hover {
        background: #f8f9fa;
    }

    .mobile-menu-toggle svg {
        width: 20px;
        height: 20px;
        color: #6c757d;
    }

    /* Stack header elements vertically on mobile */
    .ennu-header-top {
        flex-direction: column;
        gap: 12px;
        padding: 16px 0;
    }

    .ennu-header-left,
    .ennu-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .ennu-branding {
        order: 1;
    }

    .ennu-employee-profile {
        order: 2;
        max-width: none;
        justify-content: center;
        margin: 0 auto;
    }

    .ennu-quick-actions {
        order: 3;
        justify-content: center;
        gap: 12px;
    }

    .ennu-user-profile {
        order: 4;
    }

    /* Mobile navigation overlay */
    .ennu-mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .ennu-mobile-nav-overlay.active {
        display: block !important;
        opacity: 1;
        visibility: visible;
        position: fixed !important;
        left: auto !important;
    }

    .ennu-mobile-nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100%;
        background: white;
        box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        z-index: 10000;
        overflow-y: auto;
    }

    .ennu-mobile-nav.active {
        display: block !important;
        right: 0;
        position: fixed !important;
        left: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .ennu-mobile-nav-header {
        padding: 20px;
        border-bottom: 1px solid #e9ecef;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ennu-mobile-nav-close {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        border-radius: 50%;
        transition: background-color 0.2s ease;
    }

    .ennu-mobile-nav-close:hover {
        background: #f8f9fa;
    }

    .ennu-mobile-nav-content {
        padding: 20px 0;
    }

    .ennu-mobile-nav .ennu-nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .ennu-mobile-nav .ennu-nav-item {
        border-bottom: 1px solid #f8f9fa;
    }

    .ennu-mobile-nav .ennu-nav-link {
        padding: 16px 20px;
        width: 100%;
        justify-content: space-between;
        font-size: 16px;
    }

    .ennu-mobile-nav .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
    }

    .ennu-mobile-nav .dropdown-item {
        padding: 12px 40px;
        border-bottom: 1px solid #e9ecef;
    }
}

@media (max-width: 576px) {
    .ennu-header-container {
        padding: 0 16px;
    }

    .ennu-employee-profile {
        padding: 8px 12px;
        gap: 8px;
    }

    .employee-avatar {
        width: 36px;
        height: 36px;
    }

    .employee-name {
        font-size: 13px;
    }

    .employee-title {
        font-size: 10px;
    }

    .employee-contact {
        font-size: 9px;
    }

    .contact-text {
        max-width: 100px;
    }

    .ennu-mobile-nav {
        width: 260px;
    }

    .ennu-mobile-nav-header,
    .ennu-mobile-nav-content {
        padding: 16px;
    }

    .ennu-mobile-nav .ennu-nav-link,
    .ennu-mobile-nav .dropdown-item {
        padding: 14px 16px;
        font-size: 15px;
    }

    .ennu-mobile-nav .dropdown-item {
        padding-left: 32px;
    }
}

/* ============================================
   PATIENT PORTAL STYLES
   ============================================ */

/* Patient Portal Header - Fix white on white text */
.patient-portal-wrapper .ennu-panel-header-wrapper,
.patient-portal .ennu-panel-header-wrapper {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border-bottom: 1px solid #bae6fd;
}

.patient-portal-wrapper .ennu-panel-header,
.patient-portal .ennu-panel-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border-bottom: 1px solid #bae6fd;
}

/* Patient Portal Header Text Colors - Fix white on white */
.patient-portal-wrapper .ennu-logo-text,
.patient-portal .ennu-logo-text {
    color: #1e40af !important;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.patient-portal-wrapper .ennu-header-top,
.patient-portal .ennu-header-top {
    border-bottom: 1px solid #bae6fd;
}

/* Patient Portal Navigation Links - Fix white text */
.patient-portal-wrapper .ennu-nav-link,
.patient-portal .ennu-nav-link,
body.patient-portal .ennu-nav-link,
body.ennu-patient-portal .ennu-nav-link,
.patient-portal-wrapper .ennu-nav-menu .ennu-nav-link,
.patient-portal .ennu-nav-menu .ennu-nav-link {
    color: #1e40af !important;
    font-weight: 500;
}

.patient-portal-wrapper .ennu-nav-link:hover,
.patient-portal .ennu-nav-link:hover {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

.patient-portal-wrapper .ennu-nav-link:active,
.patient-portal .ennu-nav-link:active,
.patient-portal-wrapper .ennu-nav-link.current-menu-item,
.patient-portal .ennu-nav-link.current-menu-item {
    color: #1e3a8a !important;
    background: rgba(30, 58, 138, 0.15) !important;
}

/* Patient Portal Action Buttons */
.patient-portal-wrapper .ennu-action-btn,
.patient-portal .ennu-action-btn {
    color: #1e40af !important;
    border-color: #93c5fd;
}

.patient-portal-wrapper .ennu-action-btn:hover,
.patient-portal .ennu-action-btn:hover {
    color: #3b82f6 !important;
    background: #ffffff !important;
    border-color: #3b82f6 !important;
}

/* Patient Portal Menu Text */
.patient-portal-wrapper .ennu-nav-menu,
.patient-portal .ennu-nav-menu {
    color: #1e40af !important;
}

.patient-portal-wrapper .ennu-nav-menu a,
.patient-portal .ennu-nav-menu a {
    color: #1e40af !important;
}

.patient-portal-wrapper .ennu-nav-menu a:hover,
.patient-portal .ennu-nav-menu a:hover {
    color: #3b82f6 !important;
}

/* Patient Portal No Menu Message */
.patient-portal-wrapper .ennu-no-menu,
.patient-portal .ennu-no-menu {
    color: #1e40af !important;
}

.patient-portal-wrapper .ennu-no-menu span,
.patient-portal .ennu-no-menu span {
    color: #1e40af !important;
}

/* Patient Portal Dropdown Menus - Ensure dark text */
.patient-portal-wrapper .ennu-dropdown-menu,
.patient-portal .ennu-dropdown-menu {
    background: #ffffff !important;
}

.patient-portal-wrapper .ennu-dropdown-menu .dropdown-item,
.patient-portal .ennu-dropdown-menu .dropdown-item {
    color: #1e40af !important;
}

.patient-portal-wrapper .ennu-dropdown-menu .dropdown-item:hover,
.patient-portal .ennu-dropdown-menu .dropdown-item:hover {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Patient Portal Dropdown Icon */
.patient-portal-wrapper .dropdown-icon,
.patient-portal .dropdown-icon {
    color: #1e40af !important;
}

.patient-portal-wrapper .ennu-nav-item:hover .dropdown-icon,
.patient-portal .ennu-nav-item:hover .dropdown-icon {
    color: #3b82f6 !important;
}

/* Patient Portal Header Right Section */
.patient-portal-wrapper .ennu-header-right,
.patient-portal .ennu-header-right {
    color: #1e40af !important;
}

.patient-portal .ennu-branding {
    margin-bottom: 8px;
}

.patient-portal .ennu-portal-badge.patient-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.patient-portal .ennu-portal-badge.patient-badge .badge-icon {
    color: #ffffff;
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .ennu-employee-profile,
    .ennu-action-btn,
    .mobile-menu-toggle,
    .ennu-mobile-nav-overlay,
    .ennu-mobile-nav,
    .ennu-mobile-nav-close {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ennu-employee-profile {
        border: 2px solid #000000;
        background: #ffffff;
    }

    .ennu-panel-header {
        border-bottom: 2px solid #000000;
    }

    .ennu-header-top {
        border-bottom: 2px solid #000000;
    }
}
/* Multi-level dropdown menu styles */
/* Sub-dropdown containers */
.ennu-sub-dropdown {
    position: relative;
}

.ennu-sub-dropdown .sub-dropdown-inner {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Show sub-dropdown on hover */
.ennu-dropdown-menu:hover .ennu-sub-dropdown .sub-dropdown-inner,
.ennu-dropdown-menu .dropdown-item:hover .ennu-sub-dropdown .sub-dropdown-inner {
    display: block;
}

/* Sub-dropdown items */
.sub-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #1a365d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.sub-dropdown-item:last-child {
    border-bottom: none;
}

.sub-dropdown-item:hover {
    background: rgba(26, 54, 93, 0.1);
    color: #1e40af;
    transform: translateX(4px);
}

.sub-dropdown-item .sub-item-text {
    display: block;
    font-weight: 500;
}

/* Sub-dropdown icon */
.sub-dropdown-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.dropdown-item:hover .sub-dropdown-icon {
    opacity: 1;
}

/* Mobile sub-dropdown styles */
@media (max-width: 768px) {
    .ennu-sub-dropdown .sub-dropdown-inner {
        position: static;
        display: none;
        background: rgba(255, 255, 255, 0.9);
        margin-top: 8px;
        border-radius: 6px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .ennu-mobile-nav .ennu-dropdown-menu:hover .ennu-sub-dropdown .sub-dropdown-inner,
    .ennu-mobile-nav .ennu-dropdown-menu .dropdown-item:hover .ennu-sub-dropdown .sub-dropdown-inner {
        display: block;
    }
    
    .sub-dropdown-item {
        padding: 10px 20px;
        font-size: 13px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* ============================================
   AMELIA IFRAME CUSTOMIZATION
   ============================================ */

/* Hide Amelia logo and branding in iframes */
iframe[src*="wpamelia"] .am-logo,
iframe[src*="wpamelia"] .am-header-logo,
iframe[src*="wpamelia"] [class*="logo"],
iframe[src*="wpamelia"] [class*="branding"],
iframe[src*="wpamelia"] .am-header-branding,
iframe[src*="wpamelia"] .wp-block-image,
iframe[src*="wpamelia"] .site-logo {
    display: none !important;
}

/* Hide Amelia powered by text */
iframe[src*="wpamelia"] [class*="powered"],
iframe[src*="wpamelia"] [class*="footer-credit"],
iframe[src*="wpamelia"] .am-footer-text {
    display: none !important;
}

/* CSS injection approach - hide via admin page styles */
#ennu-calendar-iframe,
#ennu-amelia-dashboard-iframe,
#ennu-amelia-appointments-iframe {
    /* Inject CSS to hide Amelia branding */
}

/* Alternative: Use CSS to target elements within iframes loaded from same origin */
.ennu-calendar-iframe-wrapper,
.ennu-dashboard-iframe-wrapper,
.ennu-appointments-iframe-wrapper {
    /* Wrapper classes for iframe hiding if needed */
}
