/* Trafic FM - Elementor Integration Styles */

/* Interactive Map Container */
.trafic-interactive-map-container {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Map Header */
.trafic-map-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.trafic-map-header .map-title h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: bold;
}

.map-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.destination-search {
    display: flex;
    gap: 5px;
}

.trafic-input {
    padding: 8px 12px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    min-width: 200px;
    outline: none;
}

.trafic-input:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Buttons */
.trafic-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.trafic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.trafic-btn-primary {
    background: #3498db;
    color: white;
}

.trafic-btn-primary:hover {
    background: #2980b9;
}

.trafic-btn-secondary {
    background: #95a5a6;
    color: white;
}

.trafic-btn-secondary:hover {
    background: #7f8c8d;
}

.trafic-btn-success {
    background: #27ae60;
    color: white;
}

.trafic-btn-success:hover {
    background: #229954;
}

.trafic-btn-warning {
    background: #f39c12;
    color: white;
}

.trafic-btn-warning:hover {
    background: #e67e22;
}

.trafic-btn-danger {
    background: #e74c3c;
    color: white;
}

.trafic-btn-danger:hover {
    background: #c0392b;
}

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

.trafic-btn-waze {
    background: #33ccff;
    color: white;
}

.trafic-btn-info {
    background: #17a2b8;
    color: white;
}

/* Incident Filters */
.trafic-incident-filters {
    background: rgba(255,255,255,0.95);
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid #ddd;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 15px;
    background: rgba(231, 76, 60, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-item:hover {
    background: rgba(231, 76, 60, 0.2);
}

.filter-item input[type="checkbox"] {
    margin: 0;
}

/* Map Wrapper */
.trafic-map-wrapper {
    display: flex;
    position: relative;
    height: calc(100% - 120px);
    min-height: 400px;
}

/* Leaflet Map */
.trafic-leaflet-map {
    flex: 1;
    min-height: 400px;
    z-index: 1;
}

/* Map Sidebar */
.trafic-map-sidebar {
    width: 350px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-left: 2px solid #e74c3c;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.trafic-map-sidebar.collapsed {
    transform: translateX(320px);
}

.sidebar-header {
    background: #e74c3c;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* Incidents List */
.incidents-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.loading-incidents {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.incident-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.incident-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #e74c3c;
}

.incident-type-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.incident-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.incident-location {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.incident-time {
    color: #999;
    font-size: 12px;
}

/* Navigation Panel */
.navigation-panel {
    background: #f8f9fa;
    border-top: 2px solid #e74c3c;
    padding: 15px 20px;
}

.navigation-panel h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1rem;
}

.route-info {
    margin-bottom: 15px;
}

.route-info p {
    margin: 5px 0;
    font-size: 14px;
}

.navigation-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.navigation-buttons .trafic-btn {
    justify-content: center;
    font-size: 13px;
    padding: 10px 15px;
}

/* Modal */
.trafic-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: #e74c3c;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Live Stats */
.trafic-live-stats {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.trafic-live-stats.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.trafic-live-stats.inline {
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #e74c3c;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Radio Player */
.trafic-radio-player {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.station-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.station-logo {
    font-size: 2rem;
}

.station-details h4 {
    margin: 0;
    font-size: 1.3rem;
}

.station-tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

.player-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #95a5a6;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: #27ae60;
}

.status-indicator.offline {
    background: #e74c3c;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.play-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.play-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.play-btn.playing {
    background: #27ae60;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.volume-slider {
    flex: 1;
    max-width: 150px;
    height: 5px;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #e74c3c;
    border-radius: 50%;
    cursor: pointer;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Emergency Contacts */
.trafic-emergency-contacts {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contacts-header {
    margin-bottom: 20px;
}

.contacts-header h4 {
    margin: 0;
    color: #e74c3c;
    font-size: 1.2rem;
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trafic-emergency-contacts.horizontal .contacts-list {
    flex-direction: row;
    flex-wrap: wrap;
}

.emergency-contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.emergency-contact-item:hover {
    background: #e9ecef;
    border-color: #e74c3c;
    transform: translateX(5px);
    color: #333;
}

.contact-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.contact-name {
    font-weight: bold;
    margin-bottom: 3px;
}

.contact-number {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1rem;
}

.contact-description {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

/* Weather Widget */
.trafic-weather-widget {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.weather-header h4 {
    margin: 0 0 15px 0;
    color: #e74c3c;
    font-size: 1.2rem;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.weather-icon {
    font-size: 3rem;
}

.temperature {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e74c3c;
    display: block;
    line-height: 1;
}

.weather-desc {
    font-size: 1rem;
    color: #666;
    margin-top: 5px;
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9rem;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: bold;
    color: #333;
}

.weather-alert {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 10px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 1.2rem;
}

.alert-text {
    color: #856404;
    font-size: 0.9rem;
}

/* Recent Incidents */
.trafic-recent-incidents {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.incidents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.incidents-header h4 {
    margin: 0;
    color: #e74c3c;
    font-size: 1.2rem;
}

.refresh-incidents {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.refresh-incidents:hover {
    color: #e74c3c;
    background: #f8f9fa;
}

.incidents-container .incident-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.incidents-container .incident-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.trafic-recent-incidents.cards .incident-item {
    flex-direction: column;
    text-align: center;
}

.incident-content {
    flex: 1;
}

.incident-actions {
    display: flex;
    gap: 5px;
}

.incident-actions button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.incident-actions button:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.no-incidents {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-incidents-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.no-incidents-text {
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trafic-map-header {
        flex-direction: column;
        text-align: center;
    }
    
    .map-controls {
        justify-content: center;
        width: 100%;
    }
    
    .trafic-input {
        min-width: 150px;
    }
    
    .trafic-incident-filters {
        justify-content: center;
    }
    
    .trafic-map-wrapper {
        flex-direction: column;
    }
    
    .trafic-map-sidebar {
        width: 100%;
        height: 300px;
        border-left: none;
        border-top: 2px solid #e74c3c;
    }
    
    .trafic-map-sidebar.collapsed {
        transform: translateY(250px);
    }
    
    .trafic-leaflet-map {
        min-height: 300px;
    }
    
    .trafic-live-stats {
        flex-direction: column;
    }
    
    .stat-item {
        justify-content: center;
        text-align: center;
    }
    
    .player-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .volume-control {
        justify-content: center;
    }
    
    .contacts-list {
        flex-direction: column !important;
    }
    
    .weather-main {
        flex-direction: column;
        text-align: center;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .trafic-interactive-map-container,
    .trafic-live-stats,
    .trafic-emergency-contacts,
    .trafic-weather-widget,
    .trafic-recent-incidents {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .trafic-map-sidebar {
        background: rgba(45, 45, 45, 0.98);
    }
    
    .incident-item,
    .stat-item,
    .emergency-contact-item {
        background: #3d3d3d;
        color: #e0e0e0;
        border-color: #555;
    }
    
    .incident-item:hover,
    .emergency-contact-item:hover {
        background: #4d4d4d;
        color: #e0e0e0;
    }
    
    .trafic-input {
        background: #3d3d3d;
        color: #e0e0e0;
        border: 1px solid #555;
    }
    
    .modal-content {
        background: #2d2d2d;
        color: #e0e0e0;
    }
}

/* Print styles */
@media print {
    .trafic-map-header,
    .trafic-incident-filters,
    .trafic-map-sidebar,
    .modal-content {
        display: none !important;
    }
    
    .trafic-leaflet-map {
        width: 100% !important;
        height: 400px !important;
    }
}