
/* Dynamic Customer Branding CSS - Only for Customer Areas */
/* System Admin Areas ALWAYS use default Phoenix OCR colors */
:root {
    --customer-primary: #dc3545;
    --customer-secondary: #f89a5b;
    --phoenix-default-primary: #dc3545;
    --phoenix-default-secondary: #f89a5b;
}

/* FORCE Phoenix OCR colors for ALL admin areas and system admin users - highest specificity */
.admin-area *,
body.admin-area *,
body.system-admin-user *,
[class*="admin-"] *,
*[class*="admin-"],
body:has(.admin-header) * {
    --primary-color: var(--phoenix-default-primary) !important;
    --secondary-color: var(--phoenix-default-secondary) !important;
}

/* Specific admin elements that must use Phoenix colors */
.admin-header,
.admin-card,
.admin-container *,
.admin-profile-container *,
*[class*="admin-system-"] *,
*[href*="admin"] *,
*[id*="admin"] * {
    --primary-color: var(--phoenix-default-primary) !important;
    --secondary-color: var(--phoenix-default-secondary) !important;
}

/* Force Phoenix colors on admin headers */
.admin-header,
.admin-area .admin-header,
body.admin-area .admin-header,
body.system-admin-user .admin-header,
body:has(.admin-header) .admin-header {
    background: linear-gradient(135deg, var(--phoenix-default-primary), var(--phoenix-default-secondary)) !important;
}

/* Only apply customer branding when NOT in admin areas AND not system admin users */
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .customer-header,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .profile-header,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .edit-profile-header {
    background: linear-gradient(135deg, var(--customer-primary), var(--customer-secondary)) !important;
}

/* Customer area buttons only - exclude admin areas and system admin users */
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .customer-btn-primary {
    background: linear-gradient(135deg, var(--customer-primary), var(--customer-secondary)) !important;
    border: none !important;
}

body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .customer-btn-primary:hover {
    background: linear-gradient(135deg, var(--customer-primary), var(--customer-secondary)) !important;
    transform: translateY(-2px);
    filter: brightness(0.9);
}

/* Customer area form elements - exclude admin areas and system admin users */
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .customer-form-section {
    border-left-color: var(--customer-primary) !important;
}

body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .customer-form-section h5 {
    color: var(--customer-primary) !important;
}

body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .customer-form-control:focus {
    border-color: var(--customer-primary) !important;
    box-shadow: 0 0 0 0.2rem #dc354540 !important;
}

/* Customer area badges - exclude admin areas and system admin users */
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .customer-badge {
    background: linear-gradient(135deg, var(--customer-primary), var(--customer-secondary)) !important;
}

/* Customer area sidebar styling - exclude admin areas and system admin users */
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .nav-link.active,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .nav-link:hover,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .sidebar .nav-link.active,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .sidebar .nav-link:hover,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .list-group-item.active,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .list-group-item:hover {
    background: linear-gradient(135deg, var(--customer-primary), var(--customer-secondary)) !important;
    color: white !important;
    border-color: var(--customer-primary) !important;
}

/* Customer navigation items - exclude admin areas and system admin users */
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .nav-pills .nav-link.active,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .nav-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--customer-primary), var(--customer-secondary)) !important;
    border-color: var(--customer-primary) !important;
}

/* Customer dropdown items - exclude admin areas and system admin users */
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .dropdown-item:hover,
body:not(.admin-area):not(.system-admin-user):not(:has(.admin-header)) .dropdown-item.active {
    background-color: var(--customer-primary) !important;
    color: white !important;
}

/* Customer logo in headers */
.customer-logo-header {
    flex-shrink: 0;
}

.customer-header-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    border: 2px solid #dee2e6;
    background: white;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

