/* Orkla Water Level Frontend Styles */
.orkla-water-widget {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.widget-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.widget-controls label {
    font-weight: 600;
    color: #333;
}

.widget-controls select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.orkla-button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.orkla-button:hover {
    background: #1d4ed8;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.widget-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 24px;
}

.current-status {
    text-align: right;
}

.current-level {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 4px;
}

.update-time {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.widget-chart-container {
    position: relative;
    margin-bottom: 20px;
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px;
}

.widget-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

.info-item {
    text-align: center;
}

.info-item .label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.info-item .value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

/* Archive Widget Styles */
.orkla-archive-widget {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.archive-widget-header h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 24px;
}

.archive-widget-controls {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.control-row select,
.control-row input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.archive-widget-chart {
    position: relative;
    margin-bottom: 20px;
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px;
}

.archive-widget-summary {
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.summary-item {
    text-align: center;
}

.summary-item .label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.summary-item .value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Responsive Design */
@media (max-width: 768px) {
    .widget-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .current-status {
        text-align: left;
    }
    
    .control-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .widget-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .widget-info {
        grid-template-columns: 1fr;
    }
    
    .summary-row {
        grid-template-columns: 1fr;
    }
}

/* Loading state */
.orkla-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6b7280;
    font-size: 16px;
}

.orkla-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error state */
.orkla-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
}