/**
 * Windguru Widget Styles
 * Version: 1.3.0
 * 
 * @package Windguru_Widget
 */

/* Container styling */
.windguru-widget-container {
    margin: 1em 0;
    max-width: 100%;
    overflow-x: auto;
}

/* Iframe wrapper */
.windguru-iframe-wrapper {
    position: relative;
    width: 100%;
}

.windguru-iframe-wrapper iframe {
    border: none;
    display: block;
    max-width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .windguru-widget-container {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .windguru-iframe-wrapper iframe {
        min-height: 300px;
    }
}

/* Error styling (only visible to editors) */
.windguru-widget-error {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .windguru-widget-error {
        background: #3d1515;
        border-color: #8b0000;
        color: #ff9999;
    }
}

/* Wave Forecast Styles */
.wave-forecast-container {
    margin: 1em 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wave-forecast-title {
    margin: 0 0 0.5em 0;
    font-size: 1.1em;
    color: #333;
}

.wave-forecast-loading {
    padding: 1em;
    text-align: center;
    color: #666;
    background: #f5f5f5;
    border-radius: 4px;
}

.wave-forecast-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.wave-forecast-table th,
.wave-forecast-table td {
    padding: 0.5em 0.75em;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.wave-forecast-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.wave-forecast-table tbody tr:hover {
    background: #f5f8ff;
}

/* Wave height color coding */
.wave-low {
    color: #2e7d32;
    font-weight: 600;
}

.wave-medium {
    color: #f57c00;
    font-weight: 600;
}

.wave-high {
    color: #c62828;
    font-weight: 600;
}

.wave-forecast-credit {
    margin: 0.5em 0 0;
    color: #999;
    font-size: 0.8em;
}

/* Responsive wave table */
@media (max-width: 600px) {
    .wave-forecast-table {
        font-size: 0.8em;
    }
    
    .wave-forecast-table th,
    .wave-forecast-table td {
        padding: 0.4em 0.5em;
    }
}
