/* TempleDetail AQI / PM2.5 7-day history */
.ccas-air-history {
    margin: 28px 0;
    font-family: 'Athiti', 'Sarabun', sans-serif;
}

.ccas-air-history-card {
    border: 1px solid #dce9e4;
    border-radius: 26px;
    background:
        radial-gradient(circle at 8% 8%, rgba(31,143,107,.10), transparent 28%),
        radial-gradient(circle at 92% 10%, rgba(37,99,235,.10), transparent 25%),
        linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
    box-shadow: 0 18px 48px rgba(23,58,52,.10);
    overflow: hidden;
}

.ccas-air-history-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 22px 24px 12px;
    border-bottom: 1px solid #e3efe9;
}

.ccas-air-history-kicker {
    color: #1f8f6b;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ccas-air-history-title {
    margin: 0;
    color: #12362f;
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.2;
    font-weight: 900;
}

.ccas-air-history-sub {
    margin: 6px 0 0;
    color: #607871;
    font-size: 14px;
    font-weight: 800;
}

.ccas-air-history-badge {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #173a34;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.ccas-air-history-body {
    padding: 18px 24px 24px;
}

.ccas-air-history-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.ccas-air-history-stat {
    border: 1px solid #e0ebe6;
    border-radius: 18px;
    background: #ffffff;
    padding: 13px 14px;
    box-shadow: 0 8px 20px rgba(23,58,52,.06);
}

.ccas-air-history-stat span {
    display: block;
    color: #667d77;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 4px;
}

.ccas-air-history-stat strong {
    color: #12362f;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.05;
}

.ccas-air-history-stat small {
    margin-left: 3px;
    color: #6f857f;
    font-size: 11px;
    font-weight: 900;
}

.ccas-air-history-chart {
    position: relative;
    height: 360px;
    border: 1px solid #dce9e4;
    border-radius: 22px;
    background:
        radial-gradient(circle at 10% 10%, rgba(37,99,235,.06), transparent 28%),
        radial-gradient(circle at 90% 12%, rgba(249,115,22,.07), transparent 28%),
        #ffffff;
    padding: 14px;
    margin-bottom: 16px;
}

.ccas-air-history-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.ccas-air-history-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0ebe6;
    border-radius: 18px;
    background: #ffffff;
}

.ccas-air-history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.ccas-air-history-table th,
.ccas-air-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef4f1;
    text-align: left;
    font-size: 13px;
}

.ccas-air-history-table th {
    background: #f2f8f5;
    color: #173a34;
    font-weight: 900;
}

.ccas-air-history-table td {
    color: #3d5550;
    font-weight: 700;
}

.ccas-air-history-empty {
    padding: 22px;
    text-align: center;
    color: #607871;
    font-weight: 900;
    background: #f8fcfa;
    border: 1px dashed #cfdfd8;
    border-radius: 18px;
}

@media (max-width: 991px) {
    .ccas-air-history-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ccas-air-history-head {
        flex-direction: column;
    }

    .ccas-air-history-chart {
        height: 300px;
    }
}

@media (max-width: 575px) {
    .ccas-air-history-head,
    .ccas-air-history-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ccas-air-history-summary {
        grid-template-columns: 1fr;
    }

    .ccas-air-history-chart {
        height: 260px;
    }
}
