/* ============================================================
   INVASIVE SPECIES WARNING MAP — Page Styles
   Requires: fish-tokens.css
   ============================================================ */

/* ─── Alert Zone Overlay ─── */
.alert-zone-legend {
    display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.alert-zone-legend .legend-item {
    display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--fish-text-muted);
}
.legend-dot {
    width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.15);
}
.legend-dot.confirmed { background: rgba(239, 68, 68, 0.7); }
.legend-dot.likely { background: rgba(245, 158, 11, 0.7); }
.legend-dot.possible { background: rgba(34, 197, 94, 0.5); }

/* ─── Map ─── */
#invasive-map {
    width: 100%; height: 500px; border-radius: 10px;
    border: 1px solid var(--fish-card-border, rgba(255,255,255,0.08));
}
@media (max-width: 768px) { #invasive-map { height: 350px; } }

.leaflet-popup-content-wrapper {
    background: rgba(10, 22, 40, 0.95) !important;
    color: var(--fish-text, #e0e8f0) !important;
    border: 1px solid rgba(6, 182, 212, 0.25) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip { background: rgba(10, 22, 40, 0.95) !important; }
.leaflet-popup-content { font-size: 0.85rem; line-height: 1.5; }
.leaflet-popup-content .popup-species { font-weight: 700; color: var(--fish-red, #ef4444); font-size: 0.95rem; }
.leaflet-popup-content .popup-confidence { font-size: 0.75rem; padding: 2px 8px; border-radius: 20px; display: inline-block; margin-top: 4px; }
.popup-confidence.certain { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.popup-confidence.likely { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.popup-confidence.possible { background: rgba(34, 197, 94, 0.2); color: #34d399; }

/* ─── Report Form ─── */
.report-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label {
    font-size: 0.78rem; font-weight: 600; color: var(--fish-text-muted);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.form-group select,
.form-group input,
.form-group textarea {
    background: var(--fish-bg, #0a1628); border: 1px solid var(--fish-card-border, rgba(255,255,255,0.08));
    border-radius: 8px; padding: 10px 14px; color: var(--fish-text); font-size: 0.9rem;
    transition: border-color 0.2s;
}
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none; border-color: var(--fish-accent, #06b6d4);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
.form-group textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.btn-primary {
    background: linear-gradient(135deg, var(--fish-red, #ef4444), var(--fish-red-dim, #dc2626));
    color: #fff; border: none; border-radius: 8px; padding: 12px 24px;
    font-weight: 700; font-size: 0.9rem; cursor: pointer;
    transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.04em;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: rgba(255,255,255,0.06); color: var(--fish-text);
    border: 1px solid var(--fish-card-border); border-radius: 8px;
    padding: 10px 18px; font-weight: 600; font-size: 0.85rem; cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--fish-accent); }

.location-hint {
    font-size: 0.75rem; color: var(--fish-text-dim); font-style: italic;
    margin-top: -8px;
}

/* ─── Species Database ─── */
.species-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.species-card {
    background: var(--fish-card, rgba(255,255,255,0.04));
    border: 1px solid var(--fish-card-border, rgba(255,255,255,0.08));
    border-radius: 12px; padding: 18px; transition: all 0.25s;
    cursor: pointer;
}
.species-card:hover {
    border-color: var(--fish-red, #ef4444);
    background: rgba(239, 68, 68, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.species-card .card-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.species-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: rgba(239, 68, 68, 0.12); display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.species-card .card-header h3 {
    font-size: 0.95rem; font-weight: 700; color: var(--fish-text); margin: 0;
}
.species-card .card-header .scientific {
    font-size: 0.72rem; color: var(--fish-text-dim); font-style: italic;
}
.species-card .description { font-size: 0.82rem; color: var(--fish-text-muted); margin-bottom: 10px; line-height: 1.5; }
.species-card .impact-badge {
    display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em;
}
.impact-badge.critical { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.impact-badge.high { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.impact-badge.moderate { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.species-detail-panel {
    display: none; margin-top: 14px; padding-top: 14px;
    border-top: 1px solid var(--fish-divider, rgba(255,255,255,0.06));
}
.species-card.expanded .species-detail-panel { display: block; }
.detail-section { margin-bottom: 10px; }
.detail-section h4 {
    font-size: 0.78rem; font-weight: 700; color: var(--fish-accent, #06b6d4);
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.detail-section p, .detail-section ul {
    font-size: 0.82rem; color: var(--fish-text-muted); line-height: 1.55;
}
.detail-section ul { padding-left: 16px; }
.detail-section ul li { margin-bottom: 3px; list-style: disc; }

.state-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.state-tag {
    font-size: 0.65rem; padding: 2px 7px; border-radius: 10px;
    background: rgba(239, 68, 68, 0.1); color: #f87171; font-weight: 600;
}

/* ─── Sighting Feed ─── */
.sighting-feed { display: flex; flex-direction: column; gap: 10px; max-height: 500px; overflow-y: auto; }
.sighting-item {
    display: flex; gap: 12px; padding: 12px; border-radius: 10px;
    background: var(--fish-card); border: 1px solid var(--fish-card-border);
    transition: background 0.2s;
}
.sighting-item:hover { background: var(--fish-card-hover); }
.sighting-dot {
    width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0;
}
.sighting-dot.certain { background: var(--fish-red); }
.sighting-dot.likely { background: var(--fish-gold); }
.sighting-dot.possible { background: var(--fish-green); }
.sighting-info { flex: 1; }
.sighting-species { font-weight: 700; font-size: 0.88rem; }
.sighting-location { font-size: 0.78rem; color: var(--fish-text-muted); }
.sighting-date { font-size: 0.72rem; color: var(--fish-text-dim); }

/* ─── Prevention Tips ─── */
.prevention-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px;
}
.prevention-card {
    background: rgba(16, 185, 129, 0.06); border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 10px; padding: 16px; text-align: center;
}
.prevention-card .tip-icon { font-size: 2rem; margin-bottom: 8px; }
.prevention-card h4 { font-size: 0.88rem; font-weight: 700; color: var(--fish-green-bright, #34d399); margin-bottom: 6px; }
.prevention-card p { font-size: 0.8rem; color: var(--fish-text-muted); line-height: 1.5; }

/* ─── Two Column Layout ─── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* ─── Tabs ─── */
.tab-bar { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.tab-btn {
    padding: 8px 16px; border-radius: 8px; font-size: 0.82rem; font-weight: 600;
    background: transparent; color: var(--fish-text-muted); border: 1px solid transparent;
    cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.tab-btn:hover { color: var(--fish-text); background: rgba(255,255,255,0.04); }
.tab-btn.active { background: rgba(239, 68, 68, 0.12); color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Success Toast ─── */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: rgba(16, 185, 129, 0.9); color: #fff; padding: 12px 24px;
    border-radius: 10px; font-weight: 600; font-size: 0.88rem;
    z-index: 9999; opacity: 0; transition: all 0.4s var(--fish-ease-spring, ease);
    pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ─── Custom Scrollbar ─── */
.sighting-feed::-webkit-scrollbar { width: 6px; }
.sighting-feed::-webkit-scrollbar-track { background: transparent; }
.sighting-feed::-webkit-scrollbar-thumb { background: var(--fish-bg-elevated, #112a45); border-radius: 3px; }
.sighting-feed::-webkit-scrollbar-thumb:hover { background: var(--fish-accent-dim); }
