/**
 * K-Tech Weather Forecast Plugin Styles
 * Layout chuẩn Figma / Flatsome
 */

.ktech-weather-wrapper {
    width: 100%;
    box-sizing: border-box;
    margin: 20px 0;
    font-family: inherit;
}

/* 1. Header Khối Thời Tiết */
.ktech-weather-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-sizing: border-box;
    gap: 16px;
    flex-wrap: wrap;
}

.ktech-weather-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ktech-weather-header-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 12px rgba(0, 36, 124, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ktech-weather-header-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.ktech-weather-header-text {
    display: flex;
    flex-direction: column;
}

.ktech-weather-header-text .ktech-weather-title {
    font-size: 24px;
    font-weight: 700;
    color: #00247C;
    line-height: 1.25;
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

.ktech-weather-header-text .ktech-weather-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #64748B;
    margin: 0;
    line-height: 1.4;
}

.ktech-weather-header-right {
    display: flex;
    align-items: center;
}

.ktech-weather-header-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: #00247C;
}

.ktech-weather-header-date svg {
    display: block;
    width: 18px;
    height: 18px;
    color: #00247C;
}

/* 2. Grid 2 Card Địa Điểm */
.ktech-weather-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* 3. Chi Tiết Card */
.ktech-weather-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    box-shadow: 0 10px 30px rgba(0, 36, 124, 0.06);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ktech-weather-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 36, 124, 0.1);
}

/* Nửa trên: Banner Realtime */
.ktech-weather-card-banner {
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
}

.ktech-weather-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 37, 126, 0.72) 0%, rgba(3, 37, 126, 0.42) 55%, rgba(3, 37, 126, 0.9) 100%);
    z-index: 1;
}

.ktech-weather-location-badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.ktech-weather-location-badge svg {
    display: block;
    width: 17px;
    height: 17px;
    color: #ffffff;
}

.ktech-weather-current-box {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
}

.ktech-weather-icon-group {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.ktech-weather-icon-group .main-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ktech-weather-icon-group .main-icon .ktech-weather-icon-svg {
    width: 52px;
    height: 52px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.ktech-weather-icon-group .thermometer-icon {
    display: flex;
    align-items: center;
    padding-bottom: 4px;
}

.ktech-weather-icon-group .thermometer-icon svg {
    display: block;
    width: 14px;
    height: 28px;
}

.ktech-weather-temp-info {
    display: flex;
    flex-direction: column;
}

.ktech-weather-temp-info .temp-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1;
}

.ktech-weather-temp-info .temp-number {
    font-size: 54px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -1.5px;
    line-height: 0.95;
    font-feature-settings: "tnum";
}

.ktech-weather-temp-info .temp-range {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    padding-top: 4px;
    line-height: 1.25;
}

.ktech-weather-temp-info .temp-status {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 6px;
    line-height: 1.3;
}

/* Nửa dưới: Bảng Dự Báo 7 Ngày */
.ktech-weather-forecast-section {
    padding: 22px 20px 24px 20px;
    background: #ffffff;
    box-sizing: border-box;
}

.ktech-weather-forecast-section .ktech-forecast-title {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.ktech-forecast-columns {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    box-sizing: border-box;
    text-align: center;
}

.ktech-forecast-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: 0 2px;
}

.ktech-forecast-col .col-weekday {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
    line-height: 1.2;
}

.ktech-forecast-col .col-date {
    font-size: 11.5px;
    font-weight: 500;
    color: #94A3B8;
    margin-bottom: 6px;
    line-height: 1.2;
}

.ktech-forecast-col .col-temp {
    font-size: 12px;
    margin-bottom: 6px;
    white-space: nowrap;
    line-height: 1.2;
}

.ktech-forecast-col .col-temp .max-temp {
    font-weight: 700;
    color: #0F172A;
}

.ktech-forecast-col .col-temp .temp-slash {
    color: #CBD5E1;
    margin: 0 1px;
}

.ktech-forecast-col .col-temp .min-temp {
    font-weight: 500;
    color: #64748B;
}

.ktech-forecast-col .col-status {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748B;
    line-height: 1.3;
}

/* Responsive */
@media only screen and (max-width: 992px) {
    .ktech-weather-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media only screen and (max-width: 600px) {
    .ktech-weather-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ktech-weather-header-right {
        width: 100%;
        padding-top: 6px;
        border-top: 1px solid #E2E8F0;
    }

    .ktech-weather-card-banner {
        height: 220px;
        padding: 18px;
    }

    .ktech-weather-temp-info .temp-number {
        font-size: 44px;
    }

    .ktech-weather-forecast-section {
        padding: 18px 14px 20px 14px;
    }

    .ktech-forecast-columns {
        overflow-x: auto;
        padding-bottom: 6px;
        display: flex;
        justify-content: space-between;
    }

    .ktech-forecast-col {
        min-width: 54px;
        flex-shrink: 0;
    }
}
