/* 天気予報プラグインのスタイル */

/* ===========================
   共通スタイル
=========================== */
.weather-forecast-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

.widget .weather-forecast-container,
.sidebar .weather-forecast-container {
    padding: 5px 0;
    max-width: 100%;
}

/* ===========================
   地域選択部分
=========================== */
.weather-location-selector {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.weather-location-selector h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.location-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weather-select {
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    background: white;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

.weather-select:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

.weather-select:focus {
    outline: none;
    border-color: #4CAF50;
}

.weather-button {
    padding: 8px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.3s;
}

.weather-button:hover {
    background: #45a049;
}

/* ===========================
   ローディング
=========================== */
.weather-loading {
    text-align: center;
    padding: 20px 10px;
    font-size: 13px;
    color: #666;
}

/* ===========================
   天気表示エリア
=========================== */
.weather-display {
    animation: weatherFadeIn 0.5s;
}

@keyframes weatherFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===========================
   今日の天気（コンパクト版）
=========================== */
.current-weather {
    margin-bottom: 12px;
}

.current-weather h3 {
    color: #333;
    font-size: 13px;
    font-weight: bold;
    margin: 0 0 8px 0;
    border-left: 3px solid #4CAF50;
    padding-left: 7px;
}

.current-weather-card {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.weather-icon img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.weather-info {
    flex: 1;
    padding-left: 10px;
    min-width: 0;
}

.weather-temp {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.1;
}

.weather-description {
    font-size: 12px;
    margin: 3px 0 6px;
    opacity: 0.9;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 6px;
    font-size: 11px;
    opacity: 0.85;
}

.weather-details div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===========================
   週間天気予報（縦リスト）
=========================== */
.weekly-forecast h3 {
    color: #333;
    font-size: 13px;
    font-weight: bold;
    margin: 0 0 8px 0;
    border-left: 3px solid #4CAF50;
    padding-left: 7px;
}

.weekly-forecast-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.forecast-day {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 8px;
    gap: 6px;
}

.forecast-day:hover {
    border-color: #4CAF50;
    background: #f9fff9;
}

.forecast-date {
    font-size: 11px;
    font-weight: bold;
    color: #444;
    min-width: 45px;
    flex-shrink: 0;
}

.forecast-icon img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.forecast-middle {
    flex: 1;
    min-width: 0;
}

.forecast-description {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forecast-temp {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.forecast-pop {
    font-size: 11px;
    color: #2196F3;
    flex-shrink: 0;
    min-width: 40px;
    text-align: right;
}

/* ===========================
   メインカラム（広い幅）用
=========================== */
@media (min-width: 480px) {
    .entry-content .weather-forecast-container,
    .post-content .weather-forecast-container,
    .page-content .weather-forecast-container {
        padding: 20px;
    }

    .entry-content .weather-location-selector,
    .post-content .weather-location-selector,
    .page-content .weather-location-selector {
        padding: 20px;
        margin-bottom: 20px;
    }

    .entry-content .weather-location-selector h3,
    .post-content .weather-location-selector h3,
    .page-content .weather-location-selector h3 {
        font-size: 16px;
    }

    .entry-content .location-form,
    .post-content .location-form,
    .page-content .location-form {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .entry-content .weather-select,
    .post-content .weather-select,
    .page-content .weather-select {
        width: auto;
        min-width: 180px;
        font-size: 15px;
        padding: 9px 14px;
    }

    .entry-content .weather-button,
    .post-content .weather-button,
    .page-content .weather-button {
        width: auto;
        font-size: 15px;
        padding: 9px 18px;
    }

    .entry-content .current-weather-card,
    .post-content .current-weather-card,
    .page-content .current-weather-card {
        padding: 20px 25px;
    }

    .entry-content .weather-icon img,
    .post-content .weather-icon img,
    .page-content .weather-icon img {
        width: 90px;
        height: 90px;
    }

    .entry-content .weather-temp,
    .post-content .weather-temp,
    .page-content .weather-temp {
        font-size: 42px;
    }

    .entry-content .weather-description,
    .post-content .weather-description,
    .page-content .weather-description {
        font-size: 16px;
    }

    .entry-content .weather-details,
    .post-content .weather-details,
    .page-content .weather-details {
        font-size: 13px;
        gap: 5px 10px;
    }

    .entry-content .current-weather h3,
    .post-content .current-weather h3,
    .page-content .current-weather h3,
    .entry-content .weekly-forecast h3,
    .post-content .weekly-forecast h3,
    .page-content .weekly-forecast h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .entry-content .weekly-forecast-list,
    .post-content .weekly-forecast-list,
    .page-content .weekly-forecast-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 10px;
    }

    .entry-content .forecast-day,
    .post-content .forecast-day,
    .page-content .forecast-day {
        flex-direction: column;
        align-items: center;
        padding: 12px 8px;
        gap: 4px;
        text-align: center;
    }

    .entry-content .forecast-date,
    .post-content .forecast-date,
    .page-content .forecast-date {
        font-size: 13px;
        min-width: unset;
    }

    .entry-content .forecast-icon img,
    .post-content .forecast-icon img,
    .page-content .forecast-icon img {
        width: 48px;
        height: 48px;
    }

    .entry-content .forecast-description,
    .post-content .forecast-description,
    .page-content .forecast-description {
        font-size: 12px;
        white-space: normal;
    }

    .entry-content .forecast-temp,
    .post-content .forecast-temp,
    .page-content .forecast-temp {
        font-size: 14px;
    }

    .entry-content .forecast-middle,
    .post-content .forecast-middle,
    .page-content .forecast-middle {
        display: contents;
    }

    .entry-content .forecast-pop,
    .post-content .forecast-pop,
    .page-content .forecast-pop {
        font-size: 11px;
        text-align: center;
        min-width: unset;
    }
}

/* ===========================
   地域名見出し
=========================== */
.weather-location-heading {
    margin-bottom: 10px;
}

#weather-location-title {
    font-size: 15px;
    font-weight: bold;
    color: #444;
    margin: 0 0 10px 0;
    padding: 8px 12px;
    background: #eef6ee;
    border-radius: 6px;
    border-left: 4px solid #4CAF50;
}

/* メインカラムでは少し大きく */
.entry-content #weather-location-title,
.post-content #weather-location-title,
.page-content #weather-location-title {
    font-size: 18px;
    padding: 10px 15px;
    margin-bottom: 15px;
}
