﻿/**
 * Advanced Fishing Forecast Widget CSS
 * Modern, responsive styling for the fishing forecast widget
 */

/* Reset and Base Styles */
.ffw-container * {
    box-sizing: border-box;
}

.ffw-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.ffw-container:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Header Styles */
.ffw-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.ffw-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ffw-location-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ffw-location-name {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.ffw-change-location-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.ffw-change-location-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Location Finder Styles */
.ffw-location-finder {
    padding: 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ffw-search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.ffw-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.ffw-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ffw-search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ffw-search-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.ffw-search-btn:active {
    transform: translateY(0);
}

.ffw-search-results {
    margin-bottom: 24px;
}

.ffw-location-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffw-location-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.ffw-location-type {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.ffw-location-details {
    flex: 1;
}

.ffw-location-name {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.ffw-location-type-text {
    font-size: 14px;
    color: #718096;
    text-transform: capitalize;
}

.ffw-no-results {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 20px;
}

.ffw-popular-locations h4 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.ffw-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.ffw-popular-location {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffw-popular-location:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* Loading Styles */
.ffw-loading {
    padding: 48px 24px;
    text-align: center;
    color: #718096;
}

.ffw-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Content Styles */
.ffw-content {
    padding: 24px;
}

.ffw-content h4 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ffw-content h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Current Conditions */
.ffw-current-conditions {
    margin-bottom: 32px;
}

.ffw-conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.ffw-condition-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.ffw-condition-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.ffw-condition-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.ffw-condition-details {
    flex: 1;
}

.ffw-condition-label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 4px;
}

.ffw-condition-value {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

/* Species Predictions */
.ffw-species-predictions {
    margin-bottom: 32px;
}

.ffw-species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.ffw-species-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ffw-species-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #48bb78, #38a169, #2f855a);
}

.ffw-species-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ffw-species-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ffw-species-name {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.ffw-species-score {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.ffw-score-number {
    font-size: 24px;
    font-weight: 800;
    color: #48bb78;
}

.ffw-score-label {
    font-size: 14px;
    color: #718096;
}

.ffw-species-details {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.ffw-species-confidence {
    background: #48bb78;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ffw-species-habitat {
    color: #718096;
    font-size: 14px;
    font-style: italic;
}

.ffw-species-recommendations {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.ffw-bait-section,
.ffw-techniques-section {
    margin-bottom: 8px;
    font-size: 14px;
    color: #4a5568;
}

.ffw-bait-section:last-child,
.ffw-techniques-section:last-child {
    margin-bottom: 0;
}

/* Fishing Conditions */
.ffw-fishing-conditions {
    margin-bottom: 32px;
}

.ffw-conditions-summary {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.ffw-overall-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.ffw-rating-label {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.ffw-rating-value {
    font-size: 24px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ffw-rating-excellent {
    background: #48bb78;
    color: white;
}

.ffw-rating-good {
    background: #38b2ac;
    color: white;
}

.ffw-rating-fair {
    background: #ed8936;
    color: white;
}

.ffw-rating-poor {
    background: #e53e3e;
    color: white;
}

.ffw-conditions-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.ffw-condition-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ffw-detail-label {
    font-size: 14px;
    color: #718096;
}

.ffw-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

/* Recommendations */
.ffw-recommendations {
    margin-bottom: 32px;
}

.ffw-recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ffw-recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 12px;
    border-left: 4px solid #48bb78;
}

.ffw-recommendation-icon {
    font-size: 20px;
    margin-top: 2px;
}

.ffw-recommendation-text {
    flex: 1;
    color: #2f855a;
    font-weight: 500;
    line-height: 1.5;
}

/* Actions */
.ffw-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.ffw-refresh-btn,
.ffw-share-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.ffw-refresh-btn {
    background: #667eea;
    color: white;
}

.ffw-refresh-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.ffw-share-btn {
    background: #48bb78;
    color: white;
}

.ffw-share-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

/* Error Styles */
.ffw-error {
    padding: 48px 24px;
    text-align: center;
    color: #e53e3e;
}

.ffw-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ffw-error-message {
    font-size: 16px;
    margin-bottom: 20px;
    color: #2d3748;
}

.ffw-retry-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffw-retry-btn:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* Notification Styles */
.ffw-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #48bb78;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ffw-container {
        border-radius: 12px;
        margin: 0 8px;
    }
    
    .ffw-header {
        padding: 20px 16px;
    }
    
    .ffw-title {
        font-size: 20px;
    }
    
    .ffw-location-finder,
    .ffw-content {
        padding: 20px 16px;
    }
    
    .ffw-search-container {
        flex-direction: column;
    }
    
    .ffw-conditions-grid {
        grid-template-columns: 1fr;
    }
    
    .ffw-species-grid {
        grid-template-columns: 1fr;
    }
    
    .ffw-popular-grid {
        grid-template-columns: 1fr;
    }
    
    .ffw-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .ffw-refresh-btn,
    .ffw-share-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .ffw-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .ffw-header {
        padding: 16px 12px;
    }
    
    .ffw-title {
        font-size: 18px;
    }
    
    .ffw-location-finder,
    .ffw-content {
        padding: 16px 12px;
    }
    
    .ffw-condition-item {
        padding: 16px;
    }
    
    .ffw-species-item {
        padding: 16px;
    }
    
    .ffw-conditions-summary {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .ffw-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .ffw-change-location-btn,
    .ffw-search-container,
    .ffw-actions {
        display: none;
    }
    
    .ffw-header {
        background: #f8fafc !important;
        color: #2d3748 !important;
    }
}

/* Accessibility Improvements */
.ffw-container:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.ffw-change-location-btn:focus,
.ffw-search-btn:focus,
.ffw-refresh-btn:focus,
.ffw-share-btn:focus,
.ffw-retry-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ffw-container {
        border: 2px solid #000;
    }
    
    .ffw-header {
        background: #000 !important;
        color: #fff !important;
    }
    
    .ffw-condition-item,
    .ffw-species-item {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ffw-container,
    .ffw-change-location-btn,
    .ffw-search-btn,
    .ffw-refresh-btn,
    .ffw-share-btn,
    .ffw-retry-btn,
    .ffw-location-item,
    .ffw-popular-location,
    .ffw-condition-item,
    .ffw-species-item {
        transition: none;
    }
    
    .ffw-spinner {
        animation: none;
    }
    
    .ffw-notification {
        animation: none;
    }
}
