/* Pinpoint Weather JMA Plugin Styles (Generic) */

.pwj-weather-container {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 600px; /* Limit width */
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.pwj-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    padding: 15px 20px;
    text-align: center;
}

.pwj-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}

.pwj-forecast-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px;
    list-style: none;
    margin: 0;
}

.pwj-day-card {
    flex: 1 1 120px; /* Responsive flex basis for mobile */
    margin: 5px;
    padding: 15px 10px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f0f0f0;
}

/* Layout for 7 days: Top 3, Bottom 4 on larger screens */
@media (min-width: 500px) {
    .pwj-day-card:nth-child(-n+3) {
        flex: 0 0 calc(33.333% - 10px);
        max-width: calc(33.333% - 10px);
    }
    .pwj-day-card:nth-child(n+4) {
        flex: 0 0 calc(25% - 10px);
        max-width: calc(25% - 10px);
    }
}

.pwj-day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pwj-date {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
    font-weight: bold;
}

.pwj-date .day-of-week {
    font-size: 0.8rem;
    color: #888;
    margin-left: 4px;
}

.pwj-icon {
    font-size: 2.5rem; /* Large emoji/icon */
    margin: 10px 0;
    line-height: 1;
}

.pwj-weather-text {
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 8px;
    height: 2.4em; /* Fixed height for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.pwj-temp-range {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.pwj-temp-high {
    color: #e53935;
    font-weight: bold;
}

.pwj-temp-low {
    color: #1e88e5;
    font-weight: bold;
}

.pwj-pop {
    font-size: 0.8rem;
    color: #666;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.pwj-pop-icon {
    color: #4fc3f7;
    margin-right: 2px;
}

.pwj-footer {
    padding: 10px 20px;
    text-align: right;
    font-size: 0.7rem;
    color: #999;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.pwj-error {
    padding: 20px;
    color: #d32f2f;
    text-align: center;
    background: #ffebee;
    border-radius: 8px;
    margin: 20px;
}

/* Hourly Forecast Styles */
.pwj-section-title {
    margin: 25px 0 10px;
    padding-left: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    border-left: 4px solid #1e3c72;
}

.pwj-hourly-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 15px;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.pwj-hourly-container::-webkit-scrollbar {
    height: 6px;
}

.pwj-hourly-container::-webkit-scrollbar-track {
    background: transparent;
}

.pwj-hourly-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.pwj-hourly-card {
    flex: 0 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    padding: 10px 5px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.pwj-hourly-date {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 2px;
    white-space: nowrap;
}

.pwj-hourly-time {
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 5px;
    font-weight: 500;
}

.pwj-hourly-icon {
    font-size: 1.8rem;
    margin: 5px 0;
}

.pwj-hourly-weather-text {
    font-size: 0.65rem;
    color: #555;
    margin: 0 0 5px;
    line-height: 1.2;
    height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    width: 100%;
}

.pwj-hourly-temp {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.pwj-hourly-pop {
    font-size: 0.75rem;
    color: #1e88e5;
    margin-top: 4px;
    background: #e3f2fd;
    padding: 2px 6px;
    border-radius: 10px;
}

.pwj-hourly-card.pwj-closed {
    background-color: #f2f2f2;
}

/* Hourly Legend Styles */
.pwj-hourly-legend {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 0 15px 5px;
    font-size: 0.75rem;
    color: #666;
    margin-top: -5px;
}

.pwj-legend-item {
    display: flex;
    align-items: center;
}

.pwj-legend-box {
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border-radius: 2px;
    display: inline-block;
}

.pwj-legend-open {
    background-color: #fff;
    border: 1px solid #ccc;
}

.pwj-legend-closed {
    background-color: #f2f2f2;
    border: 1px solid #ccc; /* Match border for consistency */
}
