/**
 * 天气模块样式 - 旅趣国际旅行社 H5移动端
 * 靛蓝配色，与现有风格统一
 */

/* ====== 天气卡片容器 ====== */
.weather-card {
    background: linear-gradient(135deg, #1a3a5c, #2C5F8A, #1a8a6e);
    border-radius: 16px;
    padding: 20px 18px;
    margin: 12px 16px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(26, 90, 138, 0.3);
    position: relative;
    overflow: hidden;
}
.weather-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.weather-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

/* ====== 天气卡片头部 ====== */
.weather-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.weather-card-city {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.weather-card-city i {
    font-size: 13px;
    opacity: 0.8;
}
.weather-card-update {
    font-size: 11px;
    opacity: 0.6;
}

/* ====== 实时天气主体 ====== */
.weather-now {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}
.weather-now-left {
    display: flex;
    align-items: flex-start;
}
.weather-temp {
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -2px;
}
.weather-temp-unit {
    font-size: 20px;
    font-weight: 400;
    margin-left: 2px;
    margin-top: 8px;
}
.weather-now-right {
    text-align: right;
}
.weather-icon-large {
    font-size: 48px;
    margin-bottom: 4px;
}
.weather-text {
    font-size: 15px;
    opacity: 0.9;
}
.weather-feels {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 2px;
}

/* ====== 天气详情网格 ====== */
.weather-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    position: relative;
    z-index: 1;
}
.weather-detail-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 4px;
}
.weather-detail-item i {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 4px;
    display: block;
}
.weather-detail-value {
    font-size: 14px;
    font-weight: 600;
}
.weather-detail-label {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 2px;
}

/* ====== 天气预警 ====== */
.weather-warning {
    margin: 12px 16px 0;
    position: relative;
    z-index: 1;
}
.weather-warning-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFF7E6;
    border-left: 3px solid #FAAD14;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.weather-warning-item.warning-orange {
    background: #FFF2E8;
    border-left-color: #FA8C16;
}
.weather-warning-item.warning-red {
    background: #FFF1F0;
    border-left-color: #FF4D4F;
}
.weather-warning-icon {
    color: #FA8C16;
    font-size: 18px;
    flex-shrink: 0;
}
.weather-warning-text {
    flex: 1;
}
.weather-warning-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.weather-warning-desc {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====== 24小时预报 ====== */
.weather-section {
    margin: 12px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}
.weather-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 14px 16px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.weather-section-title i {
    color: #2C5F8A;
    font-size: 14px;
}

.weather-hourly-scroll {
    display: flex;
    overflow-x: auto;
    padding: 8px 12px 14px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.weather-hourly-scroll::-webkit-scrollbar {
    display: none;
}
.weather-hourly-item {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    padding: 8px 4px;
    border-radius: 10px;
    background: #F0F7FF;
}
.weather-hourly-item.now {
    background: linear-gradient(135deg, #2C5F8A, #1a8a6e);
    color: #fff;
}
.weather-hourly-time {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}
.weather-hourly-item.now .weather-hourly-time {
    color: rgba(255,255,255,0.7);
}
.weather-hourly-icon {
    font-size: 20px;
    margin-bottom: 6px;
}
.weather-hourly-temp {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.weather-hourly-item.now .weather-hourly-temp {
    color: #fff;
}

/* ====== 7天预报 ====== */
.weather-daily-list {
    padding: 4px 16px 14px;
}
.weather-daily-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #F5F5F5;
}
.weather-daily-item:last-child {
    border-bottom: none;
}
.weather-daily-date {
    width: 56px;
    font-size: 13px;
    color: #333;
    flex-shrink: 0;
}
.weather-daily-date .day-label {
    font-size: 11px;
    color: #999;
}
.weather-daily-icon {
    width: 36px;
    text-align: center;
    font-size: 22px;
    flex-shrink: 0;
}
.weather-daily-text {
    width: 48px;
    font-size: 12px;
    color: #666;
    flex-shrink: 0;
    text-align: center;
}
.weather-daily-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
}
.weather-daily-bar-track {
    flex: 1;
    height: 4px;
    background: #F0F0F0;
    border-radius: 2px;
    position: relative;
}
.weather-daily-bar-fill {
    position: absolute;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #36cfc9, #1890ff);
}
.weather-daily-temps {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    width: 72px;
    justify-content: flex-end;
}
.weather-daily-high {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    width: 32px;
    text-align: right;
}
.weather-daily-low {
    font-size: 14px;
    color: #999;
    width: 32px;
    text-align: right;
}

/* ====== 空气质量 ====== */
.weather-air-section {
    margin: 12px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 16px;
}
.weather-air-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.weather-air-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}
.weather-air-title i {
    color: #2C5F8A;
}
.weather-aqi-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.weather-aqi-badge.good { background: #E8F8EF; color: #52C41A; }
.weather-aqi-badge.moderate { background: #FFF7E6; color: #FAAD14; }
.weather-aqi-badge.unhealthy-sensitive { background: #FFF2E8; color: #FA8C16; }
.weather-aqi-badge.unhealthy { background: #FFF1F0; color: #FF4D4F; }
.weather-aqi-badge.very-unhealthy { background: #F0E0FF; color: #722ED1; }
.weather-aqi-badge.hazardous { background: #E0E0E0; color: #595959; }

.weather-aqi-value {
    font-size: 36px;
    font-weight: 700;
    margin-right: 8px;
}
.weather-air-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.weather-air-item {
    text-align: center;
    background: #F8FAFC;
    border-radius: 8px;
    padding: 10px 4px;
}
.weather-air-item-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}
.weather-air-item-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* ====== 生活指数 ====== */
.weather-indices-section {
    margin: 12px 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 16px;
}
.weather-indices-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.weather-indices-title i {
    color: #2C5F8A;
}
.weather-indices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.weather-index-item {
    text-align: center;
    background: #F0F7FF;
    border-radius: 10px;
    padding: 12px 6px;
}
.weather-index-icon {
    font-size: 22px;
    margin-bottom: 6px;
}
.weather-index-name {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}
.weather-index-level {
    font-size: 13px;
    font-weight: 600;
    color: #2C5F8A;
}

/* ====== 城市搜索 ====== */
.weather-search-box {
    background: linear-gradient(135deg, #2C5F8A, #1a8a6e);
    padding: 20px 16px 24px;
    position: relative;
}
.weather-search-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.weather-search-form {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.weather-search-input-wrap {
    display: flex;
    gap: 10px;
}
.weather-search-input {
    flex: 1;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}
.weather-search-input:focus {
    border-color: #2C5F8A;
}
.weather-search-btn {
    background: linear-gradient(135deg, #2C5F8A, #1a8a6e);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.weather-search-btn:active {
    opacity: 0.85;
}

/* ====== 城市搜索结果下拉 ====== */
.weather-city-dropdown {
    margin-top: 10px;
    max-height: 220px;
    overflow-y: auto;
    border-radius: 8px;
    background: #fff;
}
.weather-city-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}
.weather-city-item:last-child {
    border-bottom: none;
}
.weather-city-item:active {
    background: #f0f7ff;
}
.weather-city-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.weather-city-adm {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}

/* ====== 数据来源标注 ====== */
.weather-source {
    text-align: center;
    padding: 16px 16px 20px;
    font-size: 11px;
    color: #bbb;
}
.weather-source a {
    color: #999;
    text-decoration: none;
}

/* ====== 加载状态 ====== */
.weather-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}
.weather-loading i {
    font-size: 32px;
    margin-bottom: 12px;
    color: #2C5F8A;
    animation: weatherSpin 1.5s linear infinite;
}
@keyframes weatherSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ====== 空状态 ====== */
.weather-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}
.weather-empty i {
    font-size: 48px;
    color: #d0d5dd;
    margin-bottom: 12px;
}
.weather-empty p {
    font-size: 14px;
}

/* ====== 目的地天气卡片（嵌入式，用于首页/产品详情） ====== */
.weather-embed-card {
    background: linear-gradient(135deg, #1a3a5c, #2C5F8A);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 8px 0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.weather-embed-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.weather-embed-left {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}
.weather-embed-icon {
    font-size: 36px;
}
.weather-embed-info {
    display: flex;
    flex-direction: column;
}
.weather-embed-city-name {
    font-size: 14px;
    font-weight: 600;
}
.weather-embed-desc {
    font-size: 12px;
    opacity: 0.7;
}
.weather-embed-right {
    text-align: right;
    z-index: 1;
}
.weather-embed-temp {
    font-size: 28px;
    font-weight: 300;
}
.weather-embed-range {
    font-size: 11px;
    opacity: 0.6;
}

/* ====== 热门城市快捷 ====== */
.weather-hot-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 12px;
    justify-content: center;
}
.weather-hot-city-tag {
    padding: 10px 0;
    width: 100%;
    background: #F0F7FF;
    border-radius: 20px;
    font-size: 13px;
    color: #2C5F8A;
    cursor: pointer;
    border: 1px solid #D6E8FA;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
    transition: background 0.2s;
}
.weather-hot-city-tag:active {
    background: #2C5F8A;
    color: #fff;
}


.weather-hot-city-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 4px 0;
    justify-items: center;
}
