/* ==========================================
   Professional Theme Override - Navy/Charcoal Design System
   public/css/professional-theme.css
   
   This file overrides the purple startup theme with a professional,
   authoritative navy/charcoal color scheme
   
   To activate: Include this CSS file AFTER all other CSS files
   To deactivate: Simply remove the CSS link
   ========================================== */

:root {
    /* Primary Colors - Professional but readable */
    --primary-navy: #1e40af;
    --primary-dark: #1e3a8a;

    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;

    /* Neutral Colors - Light and readable */
    --neutral-white: #FFFFFF;
    --neutral-light: #f8fafc;
    --neutral-grey: #64748b;
    --neutral-dark: #334155;
    --neutral-border: #e2e8f0;

    /* Status Colors */
    --status-high: #dc2626;
    --status-medium: #d97706;
    --status-low: #059669;
}

/* ========================================
   BODY & BACKGROUND OVERRIDES
   ======================================== */

body {
    background: var(--neutral-light) !important;
    color: var(--neutral-dark) !important;
}

/* ========================================
   SIDEBAR OVERRIDES
   ======================================== */

/* Sidebar Header - Clean light background for readability */
.sidebar-header {
    background: var(--neutral-light) !important;
    border-bottom: 1px solid var(--neutral-border) !important;
}

.sidebar-header-clean {
    background: var(--neutral-light) !important;
    border-bottom: 1px solid var(--neutral-border) !important;
    padding: 20px;
}

.sidebar-logo {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 16px;
}

.sidebar-header-clean h2 {
    color: var(--neutral-dark) !important;
}

/* Active Navigation Items */
.nav-item.active .nav-link {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    box-shadow: inset 3px 0 0 #1e3a8a !important;
    border-radius: 12px !important;
}

.nav-link:hover {
    background: #f8fafc !important;
    color: #1e3a8a !important;
    box-shadow: inset 2px 0 0 #1e3a8a !important;
}

.nav-badge {
    background: var(--primary-dark) !important;
}

/* Counter Items */
.counter-item:hover {
    border-color: var(--primary-navy) !important;
}

.counter-item.active {
    background: var(--primary-navy) !important;
    border-color: var(--primary-navy) !important;
}

/* Insight Items */
.insight-item {
    border-left-color: var(--primary-navy) !important;
}

.insight-item:hover {
    border-left-color: var(--accent-teal) !important;
}

.insight-link {
    color: var(--primary-navy) !important;
    border: 1px solid var(--neutral-light-grey) !important;
}

.insight-link:hover {
    background: var(--primary-navy) !important;
    border-color: var(--primary-navy) !important;
}

/* ========================================
   BUTTON OVERRIDES
   ======================================== */

/* Primary Buttons */
.btn-primary,
.button-primary,
.filter-btn--primary {
    background: var(--primary-navy) !important;
    border: 1px solid var(--primary-navy) !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.button-primary:hover,
.filter-btn--primary:hover {
    background: var(--primary-charcoal) !important;
    border-color: var(--primary-charcoal) !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

/* Ghost Buttons */
.filter-btn,
.button-small,
.filter-control-btn {
    background: transparent !important;
    border: 1px solid var(--neutral-light-grey) !important;
    color: var(--primary-navy) !important;
    box-shadow: none !important;
}

.filter-btn:hover,
.button-small:hover,
.filter-control-btn:hover {
    background: var(--neutral-white) !important;
    border-color: var(--primary-navy) !important;
    box-shadow: none !important;
}

.filter-btn.active {
    background: var(--primary-navy) !important;
    color: white !important;
    border-color: var(--primary-navy) !important;
}

/* ========================================
   CARD & CONTAINER OVERRIDES
   ======================================== */

/* Remove shadows, add borders to all cards */
.card,
.sector-card,
.insight-item,
.counter-item,
.modal-content,
.header,
.filters,
.main-content {
    box-shadow: none !important;
    border: 1px solid var(--neutral-light-grey) !important;
}

/* Update hover states */
.sector-card:hover,
.update-item:hover {
    box-shadow: none !important;
    border-color: var(--primary-navy) !important;
    transform: translateY(-2px) !important;
}

/* ========================================
   TYPOGRAPHY & LINK OVERRIDES
   ======================================== */

/* Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--neutral-dark-grey) !important;
}

/* Links */
a {
    color: var(--primary-navy) !important;
}

a:hover {
    color: var(--primary-charcoal) !important;
}

/* Title gradients */
.title,
.brand-title {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-charcoal) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ========================================
   FOCUS STATES OVERRIDE
   ======================================== */

button:focus,
.btn:focus,
.filter-btn:focus,
.authority-btn:focus,
.sector-btn:focus,
.nav-link:focus,
input:focus,
.search-box:focus {
    outline: 2px solid var(--primary-navy) !important;
    outline-offset: 2px !important;
}

/* ========================================
   STATUS & BADGE OVERRIDES
   ======================================== */

/* Impact badges */
.impact-significant {
    background: #FEF2F2 !important;
    color: var(--status-high) !important;
}

.impact-moderate {
    background: #FFFBEB !important;
    color: var(--status-medium) !important;
}

.impact-informational {
    background: #F0F9FF !important;
    color: var(--primary-navy) !important;
}

/* Urgency badges */
.urgency-high,
.urgency-badge.high,
.urgency-badge.critical {
    background: #FEF2F2 !important;
    color: var(--status-high) !important;
}

.urgency-medium,
.urgency-badge.medium {
    background: #FFFBEB !important;
    color: var(--status-medium) !important;
}

.urgency-low,
.urgency-badge.low {
    background: #F0FDF4 !important;
    color: var(--status-low) !important;
}

/* ========================================
   SPECIFIC COMPONENT OVERRIDES
   ======================================== */

/* Search box */
.search-box:focus,
.filter-input:focus {
    border-color: var(--primary-navy) !important;
    box-shadow: 0 0 0 3px rgba(10, 35, 66, 0.1) !important;
}

/* Filter components */
.filter-option-checkmark {
    border-color: var(--neutral-light-grey) !important;
}

input[type="checkbox"]:checked + .filter-option-checkmark,
input[type="radio"]:checked + .filter-option-checkmark {
    background-color: var(--primary-navy) !important;
    border-color: var(--primary-navy) !important;
}

/* Active filters */
.active-filter-tag {
    background: var(--accent-teal) !important;
    color: white !important;
}

/* Navigation dropdown */
.nav-dropdown {
    border: 1px solid var(--neutral-light-grey) !important;
    box-shadow: none !important;
}

/* ========================================
   ANIMATIONS & TRANSITIONS
   ======================================== */

/* Ensure smooth transitions */
* {
    transition-property: background-color, border-color, color, transform !important;
    transition-duration: 0.2s !important;
    transition-timing-function: ease !important;
}

/* ========================================
   UTILITY OVERRIDES
   ======================================== */

/* Remove any remaining shadows */
.shadow,
.shadow-sm,
.shadow-md,
.shadow-lg,
.shadow-xl {
    box-shadow: none !important;
}

/* Authority specific colors */
.authority-fca {
    --authority-color: var(--primary-navy) !important;
}

.authority-boe {
    --authority-color: var(--primary-charcoal) !important;
}

.authority-pra {
    --authority-color: var(--accent-teal) !important;
}

/* Counter number colors */
.counter-number.high-impact {
    color: var(--status-high) !important;
}

.counter-number.today {
    color: var(--status-low) !important;
}

.counter-number.this-week {
    color: var(--primary-navy) !important;
}

/* ========================================
   MODAL & OVERLAY OVERRIDES
   ======================================== */

.modal-backdrop {
    background: rgba(37, 42, 49, 0.5) !important;
}

.modal-close:hover {
    background: #F3F4F6 !important;
    color: var(--primary-navy) !important;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Ensure mobile menu maintains professional look */
    .sidebar.mobile-open {
        border-right: 1px solid var(--neutral-light-grey) !important;
        box-shadow: none !important;
    }
}

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

/* ========================================
   MAIN CONTENT OVERRIDES - Ensure Readability
   ======================================== */

.main-content {
    background: var(--neutral-white) !important;
}

.feature-card, .recent-updates, .ai-highlights {
    background: var(--neutral-white) !important;
    border: 1px solid var(--neutral-border) !important;
}

.feature-title, .section-title {
    color: var(--neutral-dark) !important;
}

/* Cards and panels */
.card, .panel, .stats-card {
    background: var(--neutral-white) !important;
    border: 1px solid var(--neutral-border) !important;
}

.update-card {
    background: var(--neutral-white) !important;
    border: 1px solid var(--neutral-border) !important;
    color: var(--neutral-dark) !important;
}

/* Text Contrast Fixes */
.hero-subtitle, .subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}

/* Sidebar Navigation Text - Ensure Visibility */
.nav-text {
    color: #4b5563 !important;
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 0.875rem !important;
}

.nav-link:hover .nav-text {
    color: #1f2937 !important;
}

.nav-item.active .nav-link .nav-text {
    color: var(--primary-navy) !important;
}

/* Force sidebar link display */
.nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 24px !important;
    white-space: nowrap !important;
}

/* Ensure sidebar has proper width */
.sidebar {
    min-width: 280px !important;
    width: 280px !important;
}

/* Navigation list styling */
.nav-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-item {
    margin-bottom: 4px !important;
}

/* ========================================
   UPDATE CARD ACTION BUTTONS
   ======================================== */

.update-card__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: transparent;
    border: 1px solid var(--neutral-border);
    border-radius: 4px;
    color: var(--neutral-grey);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0;
}

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

.action-btn:hover {
    background: var(--neutral-light);
    color: var(--primary-navy);
    border-color: var(--primary-navy);
}

.action-btn:active {
    transform: scale(0.95);
}

.bookmark-btn:hover {
    color: #d97706;
    border-color: #d97706;
}

.share-btn:hover {
    color: #059669;
    border-color: #059669;
}

.details-btn:hover {
    color: var(--primary-navy);
    border-color: var(--primary-navy);
}

.quick-note-btn:hover {
    color: #7c3aed;
    border-color: #7c3aed;
}

.update-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--neutral-border);
}

@media print {
    body {
        background: white !important;
    }

    .card,
    .update-card {
        border: 1px solid var(--neutral-border) !important;
    }
}
