/* Forecast Widget Styles */

.forecast-widget-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
}

.forecast-header {
    text-align: center;
    margin-bottom: 30px;
}

.forecast-header h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

.forecast-header p {
    font-size: 1.1em;
    color: #666;
}

.forecast-about-toggle {
    display: inline-block;
    margin-top: 10px;
    color: #4CAF50;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.forecast-about-toggle:hover {
    color: #388E3C;
    text-decoration: underline;
}

.forecast-about-content {
    text-align: left;
    margin-top: 15px;
    padding: 20px;
    margin: 10px 0;
    background: aliceblue;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
    line-height: 1.6;
    color: #555;
    font-size: 0.95em;
}

.forecast-about-content p {
    margin: 0 0 12px;
    color: #555;
}

.forecast-about-content p:last-child {
    margin-bottom: 0;
}

.forecast-about-logos {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.forecast-about-logos img {
    height: 80px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.forecast-about-logos img:hover {
    opacity: 1;
}

.forecast-loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.forecast-instructions {
    background: #f8f9fa;
    border-left: 4px solid #4CAF50;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.forecast-instructions h3 {
    margin-top: 0;
    color: #333;
}

.forecast-instructions ol {
    margin: 10px 0;
    padding-left: 25px;
}

.forecast-instructions li {
    margin: 8px 0;
    color: #555;
}

.forecast-chart-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.forecast-chart-container h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
}

#forecast-chart {
    height: 400px !important;
    width: 100% !important;
}

.forecast-context-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-context {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.btn-context:hover {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.btn-context.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.btn-context i {
    margin-right: 5px;
}

.forecast-context-panels {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 100%;
}

.context-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    overflow: hidden;
    min-width: 0;
}

.context-panel h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.context-panel p {
    margin: 10px 0;
    color: #555;
    line-height: 1.6;
}

.forecast-prediction {
    background: white;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.forecast-prediction h3 {
    margin-top: 0;
    color: #333;
}

.forecast-prediction label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-size: 1.1em;
}

.prediction-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    margin-bottom: 20px;
}

.prediction-slider:hover {
    opacity: 1;
}

.prediction-slider::-webkit-slider-thumb {
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.prediction-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.prediction-reason {
    margin: 20px 0;
}

.prediction-reason label {
    font-size: 1em;
    margin-bottom: 5px;
}

.prediction-reason select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.btn-submit,
.btn-play-again {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-submit {
    background: #4CAF50;
    color: white;
}

.btn-submit:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-play-again {
    background: #2196F3;
    color: white;
}

.btn-play-again:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.forecast-feedback {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.forecast-feedback h3 {
    margin-top: 0;
    font-size: 1.8em;
    color: #333;
}

.feedback-category {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.feedback-category.excellent {
    background: #d4edda;
    border: 2px solid #28a745;
}

.feedback-category.good {
    background: #cfe2ff;
    border: 2px solid #0d6efd;
}

.feedback-category.average {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.feedback-category.poor {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.feedback-message {
    font-size: 1.3em;
    font-weight: bold;
    margin: 0;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.results-table th,
.results-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.results-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.results-table tr.highlight {
    background: #fff3cd;
    font-weight: bold;
}

.results-table tr.highlight td {
    border-top: 2px solid #ffc107;
    border-bottom: 2px solid #ffc107;
}

.edit-link-container {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.edit-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

.edit-link:hover {
    color: #4CAF50;
}

.edit-link i {
    margin-right: 5px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .forecast-widget-container {
        padding: 10px;
    }

    .forecast-header h2 {
        font-size: 1.5em;
    }

    .forecast-chart-container {
        padding: 15px;
    }

    #forecast-chart {
        height: 300px !important;
    }

    .forecast-context-buttons {
        flex-direction: column;
    }

    .btn-context {
        width: 100%;
    }

    .forecast-context-panels {
        grid-template-columns: 1fr;
    }

    .results-table th,
    .results-table td {
        padding: 10px;
        font-size: 0.9em;
    }
}
