﻿/**
 * 火桥（huoqiao）· 多功能沉浸式 WordPress 主题
 * 联系方式：12492501@qq.com
 * 支持正版，从我做起，你的支持是我们前行的动力！
 *
 * @package   huoqiao
 * @author    三木
 * @copyright Copyright (c) 2026-09-01 huoqiao.cn
 * @license   GPL-2.0-or-later
 * @link      https://huoqiao.cn
 * @tags      template, hooks, modular, ajax, member-center, ecommerce
 */

[hidden] { display: none !important; }

.hq-weather-modal {
    position: fixed;
    inset: 0;
    z-index: 100002;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.hq-weather-modal.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.25s ease, visibility 0s;
}

.hq-weather-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(58, 46, 40, 0.45);
    backdrop-filter: blur(var(--glass-blur-sm));
    -webkit-backdrop-filter: blur(var(--glass-blur-sm));
}

.hq-weather-modal__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.97);
    width: 780px;
    max-width: calc(100vw - 48px);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: var(--glass-filter-lg);
    -webkit-backdrop-filter: var(--glass-filter-lg);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(58, 46, 40, 0.16);
    transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.22s ease;
    overflow: visible; 
}

.hq-weather-modal.is-open .hq-weather-modal__dialog {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.hq-weather-modal__close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(58, 46, 40, 0.06);
    color: #8a7a70;
    font-size: var(--font-size-body);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    padding: 0;
}

.hq-weather-modal__close:hover {
    background: rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-primary);
    transform: rotate(90deg);
}

.hq-weather-modal__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 22px 14px;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #3a2e28;
}

.hq-weather-modal__header > i {
    color: var(--color-primary);
    font-size: var(--font-size-lg);
}

.hq-weather-modal__header-spacer {
    flex: 1;
}

.hq-weather-modal__refresh {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.14);
    color: var(--color-primary);
    font-size: var(--font-size-meta);
    cursor: pointer;
    transition: background-color 0.18s ease;
    padding: 0;
}

.hq-weather-modal__refresh:hover {
    background: rgba(var(--color-primary-rgb), 0.26);
}

.hq-weather-modal__refresh.is-spinning i {
    animation: hq-weather-spin 0.8s linear infinite;
}

@keyframes hq-weather-spin {
    to { transform: rotate(360deg); }
}

.hq-weather-modal__body {
    padding: 0 22px 22px;
}

.hq-weather-main {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 28px;
    align-items: center;
}

.hq-weather-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 46px 16px;
    text-align: center;
    color: #a09080;
}

.hq-weather-state > i {
    font-size: var(--font-size-4xl);
    color: rgba(var(--color-primary-rgb), 0.6);
}

.hq-weather-state p {
    margin: 0;
    font-size: var(--font-size-body);
    color: #8a7a70;
}

.hq-weather-retry {
    border: none;
    padding: 8px 20px;
    border-radius: 999px;
    background: #3a2e28;
    color: #fff;
    font-size: var(--font-size-meta);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.hq-weather-retry:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58, 46, 40, 0.25);
}

.hq-w-left {
    padding: 20px 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.hq-w-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.hq-w-city {
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #3a2e28;
    letter-spacing: 0.02em;
}

.hq-w-date {
    font-size:var(--font-size-body);
    color: #8a7a70;
    margin-top: 3px;
}

.hq-w-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: var(--color-primary-light);
    font-size: var(--font-size-6xl);
    flex-shrink: 0;
}

.hq-w-temp-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.hq-w-temp {
    font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
    font-size: var(--font-size-7xl);
    font-weight: 700;
    color: #3a2e28;
    line-height: 1;
    letter-spacing: -2px;
}

.hq-w-unit {
    font-size: var(--font-size-2xl);
    color: #8a7a70;
    margin-top: 6px;
}

.hq-w-weather {
    font-size: var(--font-size-lg);
    color: #5a4a40;
    margin-bottom: 3px;
}

.hq-w-range {
    font-size:var(--font-size-body);
    color: #8a7a70;
}

.hq-w-right {
    min-width: 0;
}

.hq-w-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(58, 46, 40, 0.08);
}

.hq-w-detail {
    text-align: center;
}

.hq-w-detail > i {
    display: block;
    margin: 0 auto 5px;
    font-size: var(--font-size-xl);
    color: #a09080;
}

.hq-w-detail .d-val {
    display: block;
    font-size: var(--font-size-body);
    font-weight: 600;
    color: #3a2e28;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hq-w-detail .d-label {
    display: block;
    font-size: var(--font-size-meta);
    color: #a09080;
    margin-top: 2px;
}

.hq-w-tips {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hq-w-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(var(--color-primary-rgb), 0.09);
    transition: background 0.2s;
}

.hq-w-tip__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.65);
    color: var(--color-primary);
    font-size: var(--font-size-body);
    flex-shrink: 0;
}

.hq-w-tip__body { min-width: 0; flex: 1; }

.hq-w-tip__title {
    font-size: var(--font-size-meta);
    color: #a09080;
    margin-bottom: 2px;
    line-height: 1.2;
}

.hq-w-tip__text {
    font-size:var(--font-size-body);
    font-weight: 600;
    color: #3a2e28;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hq-w-forecast__list {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hq-w-forecast__item {
    text-align: center;
    flex: 1;
    min-width: 0;
    padding: 4px 0;
}

.hq-w-forecast__day {
    display: block;
    font-size: var(--font-size-meta);
    color: #8a7a70;
    margin-bottom: 6px;
}

.hq-w-forecast__item.is-today .hq-w-forecast__day {
    color: var(--color-primary);
    font-weight: 700;
}

.hq-w-forecast__item > i {
    display: block;
    margin: 0 auto 6px;
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
}

.hq-w-forecast__temps {
    font-size: var(--font-size-body);
    font-weight: 600;
    color: #3a2e28;
}

.hq-w-forecast__temps i {
    font-style: normal;
    color: #a09080;
    font-weight: 400;
    margin-left: 3px;
}

[data-theme="dark"] .hq-weather-modal__dialog {
    background: rgba(46, 38, 32, 0.82);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .hq-weather-modal__header {
    color: #efe6db;
}

[data-theme="dark"] .hq-weather-modal__close {
    background: rgba(255, 255, 255, 0.08);
    color: #b8a898;
}

[data-theme="dark"] .hq-weather-modal__close:hover {
    background: rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-primary-pale);
}

[data-theme="dark"] .hq-weather-modal__refresh {
    background: rgba(var(--color-primary-rgb), 0.18);
    color: var(--color-primary-pale);
}

[data-theme="dark"] .hq-w-left {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hq-w-city {
    color: #efe6db;
}

[data-theme="dark"] .hq-w-date {
    color: #b8a898;
}

[data-theme="dark"] .hq-w-temp {
    color: #f5eee5;
}

[data-theme="dark"] .hq-w-unit {
    color: #b8a898;
}

[data-theme="dark"] .hq-w-weather {
    color: #d8cbbd;
}

[data-theme="dark"] .hq-w-range {
    color: #b8a898;
}

[data-theme="dark"] .hq-w-details {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hq-w-detail .d-val {
    color: #efe6db;
}

[data-theme="dark"] .hq-w-detail .d-label {
    color: #a89a8a;
}

[data-theme="dark"] .hq-w-tip {
    background: rgba(var(--color-primary-rgb), 0.15);
}

[data-theme="dark"] .hq-w-tip__icon {
    background: rgba(30, 41, 59, 0.6);
    color: var(--color-primary-pale);
}

[data-theme="dark"] .hq-w-tip__title {
    color: #a89a8a;
}

[data-theme="dark"] .hq-w-tip__text {
    color: #efe6db;
}

[data-theme="dark"] .hq-w-forecast__day {
    color: #b8a898;
}

[data-theme="dark"] .hq-w-forecast__temps { 
    color: #efe6db;
}

[data-theme="dark"] .hq-w-forecast__temps i {
    color: #a89a8a;
}

[data-theme="dark"] .hq-weather-state {
    color: #a89a8a;
}

[data-theme="dark"] .hq-weather-state p {
    color: #b8a898;
}

[data-theme="dark"] .hq-weather-retry {
    background: var(--color-primary-pale);
    color: #3a2e28;
}

@media (max-width: 760px) {
    .hq-weather-modal__dialog {
        top: auto;
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
        transform: translateY(20px) scale(0.98);
        border-radius: 18px;
        max-height: 82vh;
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch;
    }

    .hq-weather-modal.is-open .hq-weather-modal__dialog {
        transform: translateY(0) scale(1);
    }

    .hq-weather-main {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hq-w-temp {
        font-size: var(--font-size-7xl);
    }

    .hq-w-forecast__list {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .hq-w-forecast__item {
        flex: 0 0 auto;
        width: 52px;
    }
}
