/* eBird Integration Styles */
/* Version: 1.0.0 */

/* ===== eBird Popup Styles ===== */
.ebird-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 300px;
}

.ebird-popup h3 {
    margin: 0 0 5px 0;
    color: #2c5f2d;
    font-size: 16px;
}

.ebird-popup hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid #ddd;
}

.ebird-popup p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.ebird-popup p strong {
    color: #2c5f2d;
}

/* Notable Badge */
.notable-badge {
    background-color: #ff4444;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    font-weight: bold;
    font-size: 12px;
    margin: 5px 0;
}

/* eBird Link Button */
.ebird-link {
    display: inline-block;
    background-color: #2c5f2d;
    color: white !important;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.ebird-link:hover {
    background-color: #1e4620;
    text-decoration: none;
}

/* ===== Hotspot Popup Styles ===== */
.hotspot-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 300px;
}

.hotspot-popup h3 {
    margin: 0 0 10px 0;
    color: #9b59b6;
    font-size: 16px;
}

.hotspot-popup p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

/* ===== eBird Filter Controls ===== */
.ebird-controls {
    position: absolute;
    top: 80px;
    right: 10px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 220px;
}

.ebird-controls h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #2c5f2d;
    font-weight: bold;
    border-bottom: 2px solid #2c5f2d;
    padding-bottom: 5px;
}

.ebird-controls label {
    display: flex;
    align-items: center;
    margin: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: color 0.2s ease;
}

.ebird-controls label:hover {
    color: #2c5f2d;
}

.ebird-controls input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Indent sub-options */
.ebird-controls label.sub-option {
    margin-left: 24px;
    font-size: 13px;
    color: #666;
}

/* ===== Loading Indicator ===== */
#ebird-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(44, 95, 45, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 10000;
    font-size: 14px;
    font-weight: bold;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#ebird-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ebird-spinner 0.8s linear infinite;
}

@keyframes ebird-spinner {
    to { transform: rotate(360deg); }
}

/* ===== Marker Icon Styles ===== */
.ebird-marker-icon,
.hotspot-marker-icon {
    background: transparent !important;
    border: none !important;
}

.ebird-marker {
    position: relative;
}

.ebird-marker::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #27ae60;
}

.ebird-marker.notable::before {
    border-top-color: #cc0000;
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
    .ebird-controls {
        top: 10px;
        right: 10px;
        left: auto;
        max-width: 200px;
        padding: 12px;
    }

    .ebird-controls h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .ebird-controls label {
        font-size: 13px;
        margin: 6px 0;
    }

    .ebird-popup,
    .hotspot-popup {
        max-width: 250px;
    }

    .ebird-popup h3,
    .hotspot-popup h3 {
        font-size: 14px;
    }

    .ebird-popup p,
    .hotspot-popup p {
        font-size: 12px;
    }
}

/* ===== Leaflet Popup Overrides ===== */
.leaflet-popup-content-wrapper .ebird-popup,
.leaflet-popup-content-wrapper .hotspot-popup {
    margin: 0;
}

.leaflet-popup-content {
    margin: 13px 15px;
}

/* ===== eBird Attribution (required by terms) ===== */
.ebird-attribution {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    color: #666;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ebird-attribution a {
    color: #2c5f2d;
    text-decoration: none;
    font-weight: bold;
}

.ebird-attribution a:hover {
    text-decoration: underline;
}

/* ===== Toggle Switch Styling (optional upgrade) ===== */
.ebird-controls .toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 8px;
}

.ebird-controls .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ebird-controls .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

.ebird-controls .toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.ebird-controls input:checked + .toggle-slider {
    background-color: #2c5f2d;
}

.ebird-controls input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ===== Stats Counter (optional future feature) ===== */
.ebird-stats {
    background: #f8f9fa;
    border-left: 4px solid #2c5f2d;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 13px;
}

.ebird-stats strong {
    color: #2c5f2d;
}
