/**
 * POI Layer Styles for ADV Plotter
 */

/* ============================================================================
   POI Control - Match Leaflet layers control styling exactly
   ============================================================================ */
.poi-control {
    margin-bottom: 10px !important;
}

.poi-control .poi-toggle-btn {
    display: block;
    width: 36px;
    height: 36px;
    background-color: var(--panel, #141a1c);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 36px;
    text-align: center;
    text-decoration: none;
    color: var(--text, #e5e7eb);
}

.poi-control .poi-toggle-btn:hover {
    background-color: rgba(45, 138, 78, 0.3);
}

/* ============================================================================
   Sidebar
   ============================================================================ */
.poi-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.poi-sidebar.open {
    right: 0;
}

.poi-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.poi-sidebar-title {
    font-size: 18px;
    font-weight: 600;
}

.poi-sidebar-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.poi-sidebar-close:hover {
    background: rgba(255,255,255,0.1);
}

.poi-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.poi-sidebar-footer {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
}

/* ============================================================================
   Layer Toggles
   ============================================================================ */
.poi-layer-toggle {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.poi-layer-toggle:hover {
    background: #f8f9fa;
}

.poi-layer-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #3498db;
}

.poi-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

.poi-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.poi-count {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* ============================================================================
   Map Markers
   ============================================================================ */
.poi-marker {
    background: none;
    border: none;
}

.poi-marker-inner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid #fff;
    transition: transform 0.2s;
}

.poi-marker:hover .poi-marker-inner {
    transform: scale(1.2);
}

/* ============================================================================
   Popups
   ============================================================================ */
.poi-popup {
    min-width: 200px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.poi-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 2px solid #ddd;
}

.poi-popup-icon {
    font-size: 20px;
}

.poi-popup-header strong {
    font-size: 14px;
    color: #333;
}

.poi-popup-category {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.poi-popup-tags {
    font-size: 12px;
    color: #495057;
    margin-bottom: 8px;
}

.poi-popup-tag {
    margin-bottom: 4px;
}

.poi-popup-tag strong {
    text-transform: capitalize;
}

.poi-popup-footer {
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.poi-popup-footer a {
    font-size: 11px;
    color: #3498db;
    text-decoration: none;
}

.poi-popup-footer a:hover {
    text-decoration: underline;
}

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 768px) {
    .poi-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .poi-sidebar.open {
        right: 0;
    }
    
    .poi-toggle-btn {
        padding: 8px 12px;
        font-size: 20px;
    }
}

/* ============================================================================
   Leaflet Override
   ============================================================================ */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 12px;
}
