/**
 * Advanced Tides Plugin Styles
 * Modern, responsive CSS with multiple themes
 */

/* Base Styles */
.advanced-tides {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.advanced-tides:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Header */
.atp-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.atp-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.atp-icon {
    font-size: 1.6rem;
}

.atp-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.atp-source,
.atp-timezone {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Days Container */
.atp-days {
    padding: 1rem;
}

.atp-day {
    margin-bottom: 1rem;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.atp-day:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.atp-day.atp-today {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    border-left: 4px solid #667eea;
}

.atp-day-header {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.atp-date {
    font-weight: 600;
    color: #495057;
}

.atp-today-badge {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Tides Grid */
.atp-tides {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.atp-tide {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.atp-tide:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.atp-tide-icon {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.atp-tide.atp-tide-high .atp-tide-icon {
    color: #28a745;
}

.atp-tide.atp-tide-low .atp-tide-icon {
    color: #dc3545;
}

.atp-tide-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.atp-tide-type {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.atp-tide.atp-tide-high .atp-tide-type {
    color: #28a745;
}

.atp-tide.atp-tide-low .atp-tide-type {
    color: #dc3545;
}

.atp-tide-time {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.atp-tide-height {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

/* Sun Information */
.atp-sun-info {
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 1rem;
    background: #fff3cd;
    border-top: 1px solid #e1e5e9;
    font-size: 0.9rem;
}

.atp-sunrise,
.atp-sunset {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #856404;
}

.atp-sun-icon {
    font-size: 1rem;
}

/* Footer */
.atp-footer {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e1e5e9;
    text-align: center;
}

.atp-updated {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Error States */
.advanced-tides-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1rem;
    color: #721c24;
    text-align: center;
}

.atp-error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.atp-error-message {
    font-size: 0.9rem;
}

/* Widget Styles */
.advanced-tides-widget {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.atp-widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.atp-widget-icon {
    font-size: 1.2rem;
}

.atp-widget-title {
    font-size: 0.9rem;
}

.atp-widget-content {
    padding: 1rem;
}

.atp-next-tide-widget {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.atp-next-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.atp-next-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.atp-all-tides-widget {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.atp-tide-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e1e5e9;
}

.atp-widget-footer {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-top: 1px solid #e1e5e9;
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
}

/* Theme Variations */
.atp-theme-classic {
    border: 2px solid #dee2e6;
    box-shadow: none;
}

.atp-theme-classic .atp-header {
    background: #495057;
}

.atp-theme-classic .atp-tide {
    background: #fff;
    border: 1px solid #dee2e6;
}

.atp-theme-minimal {
    background: transparent;
    box-shadow: none;
    border: none;
}

.atp-theme-minimal .atp-header {
    background: transparent;
    color: #333;
    padding: 0.5rem 0;
}

.atp-theme-minimal .atp-day {
    border: none;
    background: transparent;
    margin-bottom: 0.5rem;
}

.atp-theme-minimal .atp-day-header {
    background: transparent;
    border: none;
    padding: 0.25rem 0;
}

.atp-theme-minimal .atp-tide {
    background: transparent;
    border: none;
    padding: 0.25rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .advanced-tides {
        margin: 0.5rem;
    }
    
    .atp-header {
        padding: 1rem;
    }
    
    .atp-title {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .atp-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .atp-tides {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .atp-tide {
        padding: 0.5rem;
    }
    
    .atp-tide-time {
        font-size: 1rem;
    }
    
    .atp-sun-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .atp-tides {
        grid-template-columns: 1fr 1fr;
    }
    
    .atp-tide {
        font-size: 0.9rem;
    }
    
    .atp-tide-time {
        font-size: 0.9rem;
    }
}

/* Loading States */
.atp-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.atp-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: atp-spin 1s ease-in-out infinite;
    margin-left: 0.5rem;
}

@keyframes atp-spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.advanced-tides:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.atp-tide:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .advanced-tides {
        border: 2px solid #000;
    }
    
    .atp-header {
        background: #000;
        color: #fff;
    }
    
    .atp-tide {
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .advanced-tides,
    .atp-day,
    .atp-tide {
        transition: none;
    }
    
    .atp-tide:hover {
        transform: none;
    }
} 