/* Weather.css - 天氣功能整合樣式 */
/* 合併自 WeatherUse.css 和 Weather36h.css */

/* ===== 天氣搜尋頁面樣式 ===== */
/* 繼承 DogeHome.css 的基礎樣式，只定義新增的樣式 */

/* ===== 搜尋卡片 ===== */
.weather-search-card {
    background-color: var(--warm-bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 16px var(--warm-shadow);
    margin-bottom: 2rem;
}

/* ===== 搜尋表單群組 ===== */
.search-group {
    margin-bottom: 1.5rem;
}

.search-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--warm-text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

    .search-label i {
        color: var(--warm-accent);
    }

/* ===== 選擇器樣式 ===== */
.search-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--warm-border);
    border-radius: 8px;
    background-color: var(--warm-bg-primary);
    color: var(--warm-text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%23D4A574' d='M6 9L2 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

    .search-select:focus {
        outline: none;
        border-color: var(--warm-accent);
    }

/* ===== Radio 和 Checkbox 群組 ===== */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 2px solid var(--warm-border);
    border-radius: 8px;
    background-color: var(--warm-bg-primary);
    transition: all 0.2s ease;
}

    .radio-option:hover,
    .checkbox-option:hover {
        border-color: var(--warm-accent);
        background-color: rgba(212, 165, 116, 0.1);
    }

    .radio-option input,
    .checkbox-option input {
        margin-right: 0.5rem;
        accent-color: var(--warm-accent);
    }

    .radio-option:has(input:checked),
    .checkbox-option:has(input:checked) {
        border-color: var(--warm-accent);
        background-color: rgba(212, 165, 116, 0.15);
    }

/* ===== 查詢按鈕區域 ===== */
.search-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--warm-border);
}

.btn-search,
.btn-reset {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-search {
    background-color: var(--warm-accent);
    color: white;
}

    .btn-search:hover {
        background-color: var(--warm-accent-hover);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
    }

.btn-reset {
    background-color: transparent;
    color: var(--warm-text-secondary);
    border: 2px solid var(--warm-border);
}

    .btn-reset:hover {
        border-color: var(--warm-accent);
        color: var(--warm-accent);
    }

/* ===== 查詢結果區域 ===== */
.weather-results {
    animation: fadeInUp 0.3s ease;
}

.results-title {
    font-size: 1.5rem;
    color: var(--warm-text-primary);
    margin-bottom: 1rem;
}

.result-card {
    background-color: var(--warm-bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--warm-shadow);
}

.result-header {
    background-color: var(--warm-accent);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.result-body {
    padding: 1.5rem;
}

    .result-body p {
        margin-bottom: 0.75rem;
        color: var(--warm-text-primary);
    }

.weather-demo {
    text-align: center;
    padding: 2rem;
    background-color: var(--warm-bg-primary);
    border-radius: 8px;
    margin-top: 1rem;
}

.display_none {
    display: none;
}

/* ===== 36小時天氣預報卡片樣式 ===== */
.weather-card {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border-radius: 15px;
    padding: 25px;
    color: white;
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.3);
    margin: 20px 0;
    animation: fadeInUp 0.6s ease-out;
}

.weather-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 20px;
}

.location-name {
    font-size: 1.5em;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.time-period {
    font-size: 0.9em;
    opacity: 0.9;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.weather-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

    .weather-item:hover {
        transform: translateY(-3px);
        background: rgba(255, 255, 255, 0.2);
    }

.weather-icon {
    font-size: 2em;
    margin-right: 15px;
    opacity: 0.9;
}

.weather-details h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-value {
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
}

.pop-value {
    color: #ffeaa7;
}

.temp-min {
    color: #81ecec;
}

.temp-max {
    color: #fab1a0;
}

.ci-value {
    color: #fd79a8;
}

.weather-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.data-source {
    opacity: 0.7;
    font-size: 0.8em;
}

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.no-data-icon {
    font-size: 3em;
    color: #ffc107;
    margin-bottom: 15px;
}

.no-data-message h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.no-data-message p {
    margin: 0;
    opacity: 0.8;
}

/* 注意：fadeInUp 動畫定義在 DogeHome.css 中 */

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
    /* 搜尋頁面響應式 */
    .weather-search-card {
        padding: 1.5rem;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
    }

    .radio-option,
    .checkbox-option {
        width: 100%;
    }

    .search-actions {
        flex-direction: column;
    }

    .btn-search,
    .btn-reset {
        width: 100%;
        justify-content: center;
    }

    /* 天氣卡片響應式 */
    .weather-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .weather-card {
        padding: 20px;
        margin: 15px 0;
    }

    .weather-item {
        padding: 15px;
    }

    .weather-icon {
        font-size: 1.5em;
        margin-right: 12px;
    }
}
