/* Trang Cảnh báo thiên tai — bổ sung trên nền digital-services.css (ds-*) */

.dd-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px clamp(16px, 4vw, 40px);
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
}

/* Hero tổng quan */
.dd-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 26px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--hero-color, #94a3b8) 45%, transparent);
    background: color-mix(in srgb, var(--hero-color, #94a3b8) 12%, #ffffff);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.dd-hero-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.dd-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--hero-color, #94a3b8) 45%, transparent);
}

.dd-hero-label {
    font-size: 0.86rem;
    font-weight: 700;
    color: #334155;
    text-align: center;
}

.dd-hero-copy h1 {
    margin: 0 0 6px;
    font-size: 1.18rem;
    font-weight: 800;
    color: #0f172a;
}

.dd-hero-copy p {
    margin: 0 0 4px;
    color: #475569;
    font-size: 0.9rem;
}

.dd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem !important;
    color: #64748b !important;
}

.dd-count-chip {
    display: inline-flex;
    padding: 2px 9px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.72rem;
    color: #334155;
    border: 1px solid color-mix(in srgb, var(--chip-color, #94a3b8) 55%, transparent);
    background: color-mix(in srgb, var(--chip-color, #94a3b8) 16%, #ffffff);
}

.dd-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.dd-section-title i {
    color: #0f766e;
}

/* Bản tin chính thức */
.dd-alert-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.dd-alert-card {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #fecaca;
    background: #fef2f2;
}

.dd-alert-card .dd-alert-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dd-alert-card strong {
    font-size: 0.9rem;
    color: #7f1d1d;
}

.dd-alert-source {
    font-size: 0.74rem;
    font-weight: 700;
    color: #b91c1c;
}

.dd-alert-area {
    margin: 6px 0 4px;
    font-size: 0.8rem;
    color: #7f1d1d;
}

.dd-alert-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f766e;
    text-decoration: none;
}

.dd-alert-link:hover {
    text-decoration: underline;
}

/* Lưới xã theo cấp */
.dd-commune-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.dd-commune-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--risk-color, #94a3b8) 40%, transparent);
    border-left: 5px solid var(--risk-color, #94a3b8);
    background: #ffffff;
}

.dd-commune-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.95rem;
    background: var(--risk-color, #94a3b8);
}

.dd-commune-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.dd-commune-copy strong {
    font-size: 0.84rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dd-commune-copy small {
    font-size: 0.7rem;
    color: #64748b;
}

.dd-commune-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

/* Biểu đồ mưa theo giờ */
.dd-landslide-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--hero-color, #94a3b8) 45%, transparent);
    background: color-mix(in srgb, var(--hero-color, #94a3b8) 12%, #ffffff);
    margin-bottom: 12px;
}

.dd-landslide-hero strong {
    font-size: 0.92rem;
    color: #0f172a;
}

.dd-chart-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dd-station-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Nhóm trạm theo vùng (Tuyên Quang / Hà Giang núi cao) — 2026-09-11 */
.dd-station-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    align-items: center;
}

.dd-station-group-label {
    flex-basis: 100%;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.dd-station-tab {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
}

.dd-station-tab.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

.dd-chart-wrap {
    width: 100%;
    overflow-x: auto;
}

.dd-chart-wrap svg {
    display: block;
    min-width: 640px;
    width: 100%;
    height: 190px;
}

.dd-chart-note {
    margin: 0;
    font-size: 0.74rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dd-rain-scale {
    display: inline-flex;
    padding: 1px 8px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.68rem;
}

.dd-rain-1 { background: #93c5fd; }
.dd-rain-2 { background: #38bdf8; }
.dd-rain-3 { background: #2563eb; }
.dd-rain-4 { background: #1d4ed8; }

/* Card AI nhận định */
.dd-ai-card {
    padding: 16px;
    border: 1px solid #e9d5ff;
    background: linear-gradient(160deg, #faf5ff 0%, #ffffff 55%);
}

.dd-ai-text {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #334155;
    white-space: pre-wrap;
}

.dd-ai-pending {
    color: #7c3aed;
    font-weight: 600;
}

.dd-ai-meta {
    margin: 10px 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

/* Bảng ngưỡng */
.dd-rules-card {
    padding: 16px;
}

.dd-rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.dd-rules-table th,
.dd-rules-table td {
    text-align: left;
    padding: 7px 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.dd-rules-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.dd-risk-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: -1px;
}

.dd-rules-note {
    margin: 12px 0 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #475569;
}

.dd-footer {
    padding: 14px clamp(16px, 4vw, 40px) 26px;
    font-size: 0.72rem;
    line-height: 1.6;
    color: #94a3b8;
    max-width: 1180px;
    margin: 0 auto;
}

/* Advisory vùng núi cao Hà Giang — du lịch & sạt lở (2026-09-11) */
.dd-travel-advisory {
    border: 1px solid #fde68a;
    background: linear-gradient(160deg, #fffbeb 0%, #ffffff 65%);
}

.dd-travel-advisory h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 0.92rem;
    font-weight: 800;
    color: #92400e;
}

.dd-travel-advisory h3 i {
    color: #d97706;
}

.dd-travel-advisory p {
    margin: 0 0 8px;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #57534e;
}

.dd-travel-advisory p:last-child {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .dd-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dd-hero-level {
        flex-direction: row;
        min-width: 0;
    }
}
