/* ============================================
   INLAND SEAS INDUSTRIAL CO.
   Great Lakes Manufacturing Database
   Brand Refresh - 2025
   ============================================ */

/* ============================================
   CSS VARIABLES - BRAND COLORS
   ============================================ */
:root {
    /* Brand colors */
    --deep-navy: #0f172a;
    --steel-navy: #1e3a5f;
    --forge-gold: #d4a84b;
    --forge-gold-light: #e4c078;
    --lake-white: #f8fafc;
    --industrial-gray: #64748b;
    --soft-cream: #fefdfb;
    
    /* Industry colors (18 total, alphabetical) */
    --industry-aerospace: #06b6d4;
    --industry-automotive: #3b82f6;
    --industry-battery: #eab308;
    --industry-chemicals: #0d9488;
    --industry-construction: #a1887f;
    --industry-defense: #dc2626;
    --industry-electronics: #8b5cf6;
    --industry-energy: #f59e0b;
    --industry-food: #16a34a;
    --industry-furniture: #d97706;
    --industry-machinery: #ea580c;
    --industry-medical: #ec4899;
    --industry-metals: #64748b;
    --industry-paper: #84cc16;
    --industry-pharma: #db2777;
    --industry-plastics: #9333ea;
    --industry-shipbuilding: #0ea5e9;
    --industry-other: #6b7280;
    
    /* Growth indicators */
    --growth-green: #22c55e;
    --decline-red: #ef4444;
    --neutral-gray: #9ca3af;
}

/* ============================================
   BASE STYLES
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--deep-navy);
    color: var(--lake-white);
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    padding: 1rem 2rem;
    background: var(--deep-navy);
    border-bottom: 2px solid var(--forge-gold);
    position: relative;
    z-index: 1000;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.brand { 
    display: flex; 
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-name {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--forge-gold);
    font-family: 'Georgia', 'Times New Roman', serif;
}

.title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--lake-white);
    line-height: 1.2;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--industrial-gray);
    margin-top: 0.1rem;
}

/* ============================================
   CONTROLS & DROPDOWNS
   ============================================ */
.controls-wrapper { 
    display: flex; 
    gap: 1.5rem; 
    align-items: center; 
    flex-wrap: wrap; 
}

.control-group { 
    display: flex; 
    flex-direction: column; 
    gap: 0.35rem; 
}

.control-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--industrial-gray);
}

/* Dropdown select styling */
.filter-select {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--steel-navy);
    background: rgba(30, 58, 95, 0.3);
    color: var(--lake-white);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4a84b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.filter-select:hover {
    background-color: rgba(30, 58, 95, 0.5);
    border-color: var(--forge-gold);
}

.filter-select:focus {
    outline: none;
    border-color: var(--forge-gold);
    box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.2);
}

.filter-select option {
    background: var(--deep-navy);
    color: var(--lake-white);
    padding: 0.5rem;
}

/* Button styling */
.controls {
    display: flex;
    gap: 0;
}

.control-btn {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid var(--steel-navy);
    background: rgba(30, 58, 95, 0.3);
    color: var(--lake-white);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.control-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.control-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.control-btn:hover { 
    background: rgba(212, 168, 75, 0.15); 
    border-color: var(--forge-gold); 
}

.control-btn.active { 
    background: var(--forge-gold); 
    border-color: var(--forge-gold); 
    color: var(--deep-navy);
    font-weight: 700;
}

/* ============================================
   MAP CONTAINER
   ============================================ */
.map-container { 
    position: relative; 
    height: calc(100vh - 130px); 
    min-height: 500px; 
}

#map { 
    height: 100%; 
    width: 100%; 
    background: var(--deep-navy); 
}

/* ============================================
   LEAFLET OVERRIDES
   ============================================ */
.leaflet-container { 
    background: var(--deep-navy); 
    font-family: inherit; 
}

.leaflet-control-zoom { 
    border: none !important; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.4) !important; 
}

.leaflet-control-zoom a {
    background: var(--steel-navy) !important;
    color: var(--lake-white) !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 14px !important;
    transition: background 0.2s ease !important;
}

.leaflet-control-zoom a:hover { 
    background: var(--forge-gold) !important; 
    color: var(--deep-navy) !important;
}

.leaflet-control-attribution {
    background: rgba(15, 23, 42, 0.9) !important;
    color: var(--industrial-gray) !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
}

.leaflet-control-attribution a { 
    color: var(--forge-gold) !important; 
}

/* ============================================
   INFO PANEL
   ============================================ */
.info-panel {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 380px;
    max-height: calc(100% - 3rem);
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid var(--steel-navy);
    border-top: 3px solid var(--forge-gold);
    border-radius: 4px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#info-content { padding: 1.25rem; }

.info-placeholder {
    color: var(--industrial-gray);
    font-size: 0.9rem;
    text-align: center;
    padding: 2.5rem 1rem;
}

.facility-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1.3;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--lake-white);
}

.facility-location {
    font-size: 0.8rem;
    color: var(--industrial-gray);
    margin-bottom: 0.75rem;
}

.facility-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.facility-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
}

/* Industry badges - all 18 */
.facility-badge.aerospace { background: rgba(6, 182, 212, 0.15); color: var(--industry-aerospace); border: 1px solid rgba(6, 182, 212, 0.3); }
.facility-badge.automotive { background: rgba(59, 130, 246, 0.15); color: var(--industry-automotive); border: 1px solid rgba(59, 130, 246, 0.3); }
.facility-badge.battery { background: rgba(234, 179, 8, 0.15); color: var(--industry-battery); border: 1px solid rgba(234, 179, 8, 0.3); }
.facility-badge.chemicals { background: rgba(13, 148, 136, 0.15); color: var(--industry-chemicals); border: 1px solid rgba(13, 148, 136, 0.3); }
.facility-badge.construction-materials { background: rgba(161, 136, 127, 0.15); color: var(--industry-construction); border: 1px solid rgba(161, 136, 127, 0.3); }
.facility-badge.defense { background: rgba(220, 38, 38, 0.15); color: var(--industry-defense); border: 1px solid rgba(220, 38, 38, 0.3); }
.facility-badge.electronics { background: rgba(139, 92, 246, 0.15); color: var(--industry-electronics); border: 1px solid rgba(139, 92, 246, 0.3); }
.facility-badge.energy { background: rgba(245, 158, 11, 0.15); color: var(--industry-energy); border: 1px solid rgba(245, 158, 11, 0.3); }
.facility-badge.food { background: rgba(22, 163, 74, 0.15); color: var(--industry-food); border: 1px solid rgba(22, 163, 74, 0.3); }
.facility-badge.furniture { background: rgba(217, 119, 6, 0.15); color: var(--industry-furniture); border: 1px solid rgba(217, 119, 6, 0.3); }
.facility-badge.machinery { background: rgba(234, 88, 12, 0.15); color: var(--industry-machinery); border: 1px solid rgba(234, 88, 12, 0.3); }
.facility-badge.medical { background: rgba(236, 72, 153, 0.15); color: var(--industry-medical); border: 1px solid rgba(236, 72, 153, 0.3); }
.facility-badge.metals { background: rgba(100, 116, 139, 0.15); color: var(--industry-metals); border: 1px solid rgba(100, 116, 139, 0.3); }
.facility-badge.paper { background: rgba(132, 204, 22, 0.15); color: var(--industry-paper); border: 1px solid rgba(132, 204, 22, 0.3); }
.facility-badge.pharma { background: rgba(219, 39, 119, 0.15); color: var(--industry-pharma); border: 1px solid rgba(219, 39, 119, 0.3); }
.facility-badge.plastics { background: rgba(147, 51, 234, 0.15); color: var(--industry-plastics); border: 1px solid rgba(147, 51, 234, 0.3); }
.facility-badge.shipbuilding { background: rgba(14, 165, 233, 0.15); color: var(--industry-shipbuilding); border: 1px solid rgba(14, 165, 233, 0.3); }
.facility-badge.other { background: rgba(107, 114, 128, 0.15); color: var(--industry-other); border: 1px solid rgba(107, 114, 128, 0.3); }

/* Facility type badges */
.facility-badge.type-hq { background: rgba(212, 168, 75, 0.15); color: var(--forge-gold); border: 1px solid rgba(212, 168, 75, 0.4); }
.facility-badge.type-rd { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.facility-badge.type-refining { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.info-section {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(30, 58, 95, 0.6);
}

.info-section:last-child { border-bottom: none; }

.info-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--industrial-gray);
    margin-bottom: 0.3rem;
}

.info-value { 
    font-size: 0.95rem; 
    line-height: 1.5; 
}

.info-link { 
    color: var(--forge-gold); 
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-link:hover { 
    color: var(--forge-gold-light);
    text-decoration: underline; 
}

.info-row {
    display: flex;
    gap: 1.5rem;
}

.info-row > div {
    flex: 1;
}

.growth-indicator { font-weight: 600; }
.growth-indicator.positive { color: var(--growth-green); }
.growth-indicator.negative { color: var(--decline-red); }
.growth-indicator.neutral { color: var(--neutral-gray); }

.hiring-badge {
    color: var(--growth-green);
    font-size: 0.8rem;
    font-weight: 600;
}

.confidence-note {
    font-size: 0.7rem;
    color: var(--industrial-gray);
    font-style: italic;
    margin-top: 0.5rem;
}

/* ============================================
   STATS SUMMARY
   ============================================ */
.stats-summary {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--steel-navy);
    border-left: 3px solid var(--forge-gold);
    border-radius: 4px;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    color: var(--industrial-gray);
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.stats-summary span { 
    color: var(--forge-gold);
    font-weight: 600;
}

/* ============================================
   LEGEND (if needed)
   ============================================ */
.legend {
    position: absolute;
    bottom: 1.5rem;
    right: 1rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--steel-navy);
    border-radius: 4px;
    padding: 1rem;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.legend-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--forge-gold);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--steel-navy);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.75rem;
    color: var(--lake-white);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--deep-navy);
    border-top: 1px solid var(--steel-navy);
    padding: 1.25rem 2rem;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    width: 36px;
    height: 36px;
}

.footer-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.footer-company {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--forge-gold);
    font-family: 'Georgia', 'Times New Roman', serif;
}

.copyright {
    color: var(--industrial-gray);
    font-size: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--lake-white);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--forge-gold);
}

.tagline {
    color: var(--industrial-gray);
    font-size: 0.8rem;
    font-style: italic;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .header {
        padding: 1rem 1.25rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .brand-logo {
        width: 52px;
        height: 52px;
    }
    
    .title {
        font-size: 1.2rem;
    }
    
    .controls-wrapper {
        width: 100%;
    }
    
    .control-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .info-panel {
        width: calc(100% - 3rem);
        max-width: 380px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-brand {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 0.75rem 1rem;
    }
    
    .brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .brand-logo {
        width: 48px;
        height: 48px;
    }
    
    .title {
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    .map-container {
        height: calc(100vh - 180px);
    }
    
    .info-panel {
        left: 0.75rem;
        bottom: 0.75rem;
        width: calc(100% - 1.5rem);
    }
    
    .stats-summary {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.7rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
.info-panel::-webkit-scrollbar {
    width: 6px;
}

.info-panel::-webkit-scrollbar-track {
    background: var(--deep-navy);
}

.info-panel::-webkit-scrollbar-thumb {
    background: var(--steel-navy);
    border-radius: 3px;
}

.info-panel::-webkit-scrollbar-thumb:hover {
    background: var(--forge-gold);
}
