/* Jaobeit Plugin Styles - Mobile Optimized */
#jaobeit-container {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

#jaobeit-map {
    height: 100%;
    width: 100%;
}

/* Filter Bars - Mobile First */
.jaobeit-filters-top,
.jaobeit-filters-bottom {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
}

.jaobeit-filters-top {
    top: 0;
    justify-content: flex-start;
}

.jaobeit-filters-bottom {
    bottom: 0;
    justify-content: flex-start;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

/* Hide scrollbar but keep functionality */
.jaobeit-filters-top::-webkit-scrollbar,
.jaobeit-filters-bottom::-webkit-scrollbar {
    height: 3px;
}

.jaobeit-filters-top::-webkit-scrollbar-track,
.jaobeit-filters-bottom::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.jaobeit-filters-top::-webkit-scrollbar-thumb,
.jaobeit-filters-bottom::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
}



.control-btn {
    background: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    cursor: pointer;
    font-size: 22px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:active {
    transform: scale(0.95);
}

/* Radius Indicator - Mobile */
.jaobeit-radius-indicator {
    position: fixed;
    bottom: 20px;
    left: 16px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 11px;
    z-index: 100;
    display: flex;
    gap: 6px;
    font-weight: 500;
    pointer-events: none;
}

.radius-value {
    background: #1e3a2f;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: bold;
}

/* Toast - Mobile */
.jaobeit-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
    max-width: 90%;
}

.jaobeit-toast.show {
    opacity: 1;
}

/* Loading */
.jaobeit-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.3s;
}

.jaobeit-loading.hide {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #1e3a2f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Emergency Popup - Mobile Optimized */
.jaobeit-emergency-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    padding: 16px;
}

.emergency-card {
    background: white;
    border-radius: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.emergency-header {
    background: #dc2626;
    color: white;
    padding: 20px;
    text-align: center;
    position: sticky;
    top: 0;
}

.emergency-header .icon {
    font-size: 48px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.emergency-header h2 {
    font-size: 20px;
    margin: 8px 0 0;
}

.emergency-header p {
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.9;
}

.emergency-content {
    padding: 20px;
}

.emergency-name {
    font-size: 18px;
    font-weight: bold;
    color: #1e3a2f;
    margin-bottom: 12px;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.service-badge {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: #334155;
}

.emergency-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-call, .btn-directions, .btn-dismiss {
    padding: 12px;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    flex: 1;
    min-width: 100px;
}

.btn-call {
    background: #dc2626;
    color: white;
}

.btn-directions {
    background: #4285f4;
    color: white;
}

.btn-dismiss {
    background: #f1f5f9;
    color: #475569;
}

.btn-call:active, .btn-directions:active {
    transform: scale(0.98);
}

/* Tablet and Desktop Adjustments */
@media (min-width: 768px) {
    .jaobeit-filters-top,
    .jaobeit-filters-bottom {
        justify-content: center;
        padding: 12px 16px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .jaobeit-controls {
        bottom: 20px;
        right: 20px;
    }
    
    .control-btn {
        width: 48px;
        height: 48px;
    }
    
    .jaobeit-toast {
        bottom: 100px;
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .emergency-header {
        padding: 24px;
    }
    
    .emergency-header .icon {
        font-size: 56px;
    }
    
    .emergency-header h2 {
        font-size: 22px;
    }
    
    .emergency-content {
        padding: 24px;
    }
}

/* Small Mobile (under 480px) */
@media (max-width: 480px) {
    .filter-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .jaobeit-filters-top,
    .jaobeit-filters-bottom {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .control-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .jaobeit-radius-indicator {
        font-size: 10px;
        padding: 4px 10px;
        bottom: 16px;
        left: 12px;
    }
    
    .emergency-card {
        max-height: 85vh;
    }
    
    .emergency-header {
        padding: 16px;
    }
    
    .emergency-header .icon {
        font-size: 40px;
    }
    
    .emergency-header h2 {
        font-size: 18px;
    }
    
    .emergency-content {
        padding: 16px;
    }
    
    .emergency-name {
        font-size: 16px;
    }
    
    .btn-call, .btn-directions, .btn-dismiss {
        padding: 10px;
        font-size: 13px;
    }
}