/* ============================================================
   MarineCraft AIS Tracker — frontend styles
   Brand: navy #0b3d6e, red #b8290e, white #fff, dark text #1a1a1a
   Typography: Georgia serif (matches MarineCraft Journal house style)
   ============================================================ */

.mc-ais-wrapper {
    font-family: Georgia, "Times New Roman", serif;
    color: #1a1a1a;
    line-height: 1.55;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    box-sizing: border-box;
}

/* ---------- Header ---------- */
.mc-ais-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.mc-ais-pubmark {
    font-weight: 700;
    color: #0b3d6e;
    font-size: 18px;
    letter-spacing: 0.2px;
}
.mc-ais-divider {
    flex: 0 0 36px;
    border: none;
    border-top: 2px solid #b8290e;
    margin: 0;
}
.mc-ais-section-label {
    color: #b8290e;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

/* ---------- Intro ---------- */
.mc-ais-intro {
    margin-bottom: 18px;
}
.mc-ais-intro p {
    margin: 0 0 10px;
    font-size: 16px;
}

/* ---------- Status bar ---------- */
.mc-ais-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #0b3d6e;
    color: #fff;
    border-radius: 3px 3px 0 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    letter-spacing: 0.2px;
}
.mc-ais-spacer {
    flex: 1 1 auto;
}
.mc-ais-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d4a017;
    flex: 0 0 10px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}
.mc-ais-status-connecting {
    background: #d4a017;
    animation: mc-ais-pulse 1.4s ease-in-out infinite;
}
.mc-ais-status-connected {
    background: #6ed896;
    animation: mc-ais-pulse 2.6s ease-in-out infinite;
}
.mc-ais-status-error {
    background: #ff8a7a;
}
@keyframes mc-ais-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}
.mc-ais-status-text {
    font-weight: 500;
}
.mc-ais-total-count {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

/* ---------- Map + sidebar layout ---------- */
.mc-ais-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    border: 1px solid #d4dce8;
    border-top: none;
    border-radius: 0 0 3px 3px;
    overflow: hidden;
    background: #fff;
}
.mc-ais-map {
    height: 580px;
    width: 100%;
    background: #e8eef5;
}
.mc-ais-sidebar {
    background: #f7f9fc;
    border-left: 1px solid #d4dce8;
    padding: 16px 14px;
    overflow-y: auto;
    max-height: 580px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}
.mc-ais-sidebar-title {
    font-family: Georgia, serif;
    font-size: 15px;
    color: #0b3d6e;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #d4dce8;
    font-weight: 700;
}

/* ---------- Zone list ---------- */
.mc-ais-zone-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mc-ais-zone-row {
    padding: 8px 0;
    border-bottom: 1px dotted #e0e6ee;
}
.mc-ais-zone-row:last-child {
    border-bottom: none;
}
.mc-ais-zone-name {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}
.mc-ais-zone-count {
    color: #0b3d6e;
    font-weight: 700;
    font-size: 14px;
}
.mc-ais-zone-breakdown {
    color: #555;
    font-size: 11.5px;
    margin-top: 2px;
    line-height: 1.4;
}
.mc-ais-zone-loading {
    color: #888;
    font-style: italic;
    padding: 8px 0;
    list-style: none;
}

/* ---------- Legend ---------- */
.mc-ais-legend {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mc-ais-legend li {
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mc-ais-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
}

/* ---------- Caveats ---------- */
.mc-ais-caveats {
    margin-top: 20px;
    padding: 16px 18px;
    background: #f7f9fc;
    border-left: 3px solid #0b3d6e;
    border-radius: 2px;
}
.mc-ais-caveats h3 {
    font-family: Georgia, serif;
    color: #0b3d6e;
    font-size: 16px;
    margin: 0 0 10px;
    font-weight: 700;
}
.mc-ais-caveats p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #333;
}
.mc-ais-caveats p:last-child {
    margin-bottom: 0;
}
.mc-ais-source {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px !important;
    color: #666 !important;
    margin-top: 12px;
}
.mc-ais-source a {
    color: #0b3d6e;
}

/* ---------- Fallback message ---------- */
.mc-ais-fallback {
    padding: 20px 24px;
    background: #f7f9fc;
    border: 1px solid #d4dce8;
    border-left: 4px solid #0b3d6e;
    border-radius: 3px;
    font-family: Georgia, serif;
    color: #1a1a1a;
}
.mc-ais-fallback p {
    margin: 0;
    font-size: 15px;
}

/* ---------- Leaflet tooltip overrides — match brand ---------- */
.leaflet-tooltip {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.5;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .mc-ais-layout {
        grid-template-columns: 1fr;
    }
    .mc-ais-sidebar {
        border-left: none;
        border-top: 1px solid #d4dce8;
        max-height: none;
    }
    .mc-ais-map {
        height: 420px;
    }
    .mc-ais-status-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .mc-ais-spacer {
        display: none;
    }
    .mc-ais-total-count {
        flex-basis: 100%;
        font-size: 12px;
    }
}
