/**
 * Road Alerts Home Page Styles
 */

.no-alerts-message {
    text-align: center;
    color: #666;
    font-size: 16px;
    padding: 40px 20px;
}

/* Filter Buttons */
.road-alerts-filter {
    display: inline-flex;
    gap: 0;
    margin: 30px 0 20px 0;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 8px;
}

.road-alerts-filter .filter-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #4b5563;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.road-alerts-filter .filter-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.road-alerts-filter .filter-btn.active {
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #fee2e2;
    color: #d41111;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

/* Road Alerts Grid */
.road-alerts-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.road-alert-card {
    background: #f0c9c9;
    border: 1px solid #d41111;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.road-alert-card:hover {
    background: #fde7e7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 17, 17, 0.15);
}

/* Map or Icon Preview */
.road-alert-map-preview {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #d41111;
}

.road-alert-icon-preview {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #d41111;
}

.alert-icon::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Warning Triangle */
.alert-icon-triangle-exclamation::before {
    content: "\f071";
}

/* Exclamation Circle */
.alert-icon-circle-exclamation::before {
    content: "\f06a";
}

/* Construction Worker */
.alert-icon-person-digging::before {
    content: "\f85e";
}

/* Road Barrier */
.alert-icon-road-barrier::before {
    content: "\e562";
}

/* Information */
.alert-icon-circle-info::before {
    content: "\f05a";
    color: #2563eb;
}

/* Alert Bell */
.alert-icon-bell::before {
    content: "\f0f3";
    color: #f59e0b;
}

/* Road Closed / Ban */
.alert-icon-ban::before {
    content: "\f05e";
}

/* Danger */
.alert-icon-radiation::before {
    content: "\f7b9";
    color: #dc2626;
}

/* Traffic Cone */
.alert-icon-traffic-cone::before {
    content: "\f636";
    color: #f97316;
}

/* Circle X */
.alert-icon-circle-xmark::before {
    content: "\f057";
}

/* Content Area */
.road-alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.road-alert-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.road-alert-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

/* Badges */
.road-alert-badge {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-warning {
    background-color: #f59e0b;
    color: #fff;
}

.badge-info {
    background-color: #2563eb;
    color: #fff;
}

.badge-alert {
    background-color: #dc2626;
    color: #fff;
}

.badge-update {
    background-color: #16a34a;
    color: #fff;
}

.road-alert-date {
    font-size: 13px;
    color: #991b1b;
    margin: 0;
    font-weight: 600;
}

.road-alert-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #000;
    margin: 0;
}

.road-alert-view-btn {
    align-self: flex-start;
    margin-top: 4px;
    padding: 10px 20px;
    background-color: #d41111;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.road-alert-view-btn:hover {
    background-color: #b00e0e;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(212, 17, 17, 0.3);
}

/* Road Alert Modal */
.road-alert-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.road-alert-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.road-alert-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.road-alert-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.road-alert-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
    transform: rotate(90deg);
}

#road-alert-modal-body {
    padding: 50px;
}

#road-alert-modal-body .loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666;
}

#road-alert-modal-body .error {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #d41111;
}

.alert-modal-header {
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.alert-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
    padding-right: 50px;
}

.alert-modal-date {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.alert-modal-map {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.alert-modal-message h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.alert-modal-message p {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .road-alerts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .road-alert-card {
        padding: 20px;
    }

    .road-alert-modal-content {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .road-alert-modal-body {
        padding: 24px;
    }

    .alert-modal-header h2 {
        font-size: 24px;
        padding-right: 30px;
    }

    .alert-modal-map {
        height: 250px !important;
    }
}
