/**
 * TFSS Moon Frontend Styles
 * 
 * @package TFSS_Moon
 * @version 1.0.0
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.tfss-moon-fishing-info {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tfss-moon-fishing-info * {
    box-sizing: border-box;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.fishing-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white !important;
    padding: 20px 30px;
    border-radius: 8px 8px 0 0;
}

.fishing-header * {
    color: white !important;
}

/* Force heading colors with maximum specificity - NUCLEAR OPTION */
.tfss-moon-fishing-info .fishing-header h2.fishing-title,
.tfss-moon-fishing-info .fishing-header h2.fishing-title *,
.tfss-moon-fishing-info .fishing-header .fishing-title,
.tfss-moon-fishing-info .fishing-header .fishing-title *,
.tfss-moon-fishing-info .fishing-header .last-updated,
div.tfss-moon-fishing-info div.fishing-header h2.fishing-title,
div.tfss-moon-fishing-info div.fishing-header h2.fishing-title span,
div.tfss-moon-fishing-info div.fishing-header h2.fishing-title span.last-updated,
body .tfss-moon-fishing-info .fishing-header h2,
body .tfss-moon-fishing-info .fishing-header h2 *,
html body .tfss-moon-fishing-info .fishing-header h2,
html body .tfss-moon-fishing-info .fishing-header h2 * {
    color: #ffffff !important;
    color: white !important;
}

.fishing-title {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    color: white !important;
}

.last-updated {
    font-size: 0.6em;
    opacity: 0.8;
    font-weight: normal;
    color: white !important;
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 30px;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* ==========================================================================
   Card Styles
   ========================================================================== */

.condition-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.condition-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2c3e50;
}

.card-body {
    padding: 20px;
}

/* ==========================================================================
   Moon Phase Styles
   ========================================================================== */

.moon-visual .moon-emoji {
    font-size: 2.5em;
    display: block;
}

.moon-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 600;
    color: #555;
}

.detail-row .value {
    color: #2c3e50;
}

.fishing-quality {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.quality-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.quality-score .score {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
}

.quality-score .score-label {
    font-size: 1.2em;
    color: #666;
}

.quality-rating {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.quality-description {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

/* Score Colors */
.score-excellent .score,
.rating-excellent .quality-rating,
.rating-excellent .rating-text {
    color: #27ae60;
}

.score-good .score,
.rating-good .quality-rating,
.rating-good .rating-text {
    color: #3498db;
}

.score-fair .score,
.rating-fair .quality-rating,
.rating-fair .rating-text {
    color: #f39c12;
}

.score-poor .score,
.rating-poor .quality-rating,
.rating-poor .rating-text {
    color: #e74c3c;
}

/* ==========================================================================
   Weather Styles
   ========================================================================== */

.weather-error {
    text-align: center;
    padding: 30px;
    color: #666;
}

.weather-primary {
    text-align: center;
    margin-bottom: 20px;
}

.temperature {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 10px;
}

.temp-value {
    font-size: 3em;
    font-weight: bold;
    color: #2c3e50;
}

.temp-unit {
    font-size: 1.5em;
    color: #666;
}

.feels-like {
    display: block;
    color: #666;
    margin-top: 5px;
}

.condition-text {
    font-size: 1.1em;
    color: #555;
}

.weather-secondary {
    margin-bottom: 20px;
}

.weather-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.weather-item:last-child {
    border-bottom: none;
}

.weather-label {
    font-weight: 600;
    color: #555;
}

.weather-value {
    color: #2c3e50;
}

.trend {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.trend-rising {
    background: #d4edda;
    color: #155724;
}

.trend-falling {
    background: #f8d7da;
    color: #721c24;
}

.trend-stable {
    background: #e2e3e5;
    color: #383d41;
}

.fishing-impact h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #2c3e50;
}

.impact-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.impact-score .score {
    font-size: 2em;
    font-weight: bold;
}

.impact-description {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Overall Rating Styles
   ========================================================================== */

.overall-rating {
    text-align: center;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.rating-excellent {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.rating-good {
    background: #cce7ff;
    border: 1px solid #99d6ff;
}

.rating-fair {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.rating-poor {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.rating-text {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.confidence-level,
.basic-score {
    font-size: 0.9em;
    opacity: 0.8;
}

.ai-summary {
    margin-top: 15px;
}

.ai-summary p {
    margin: 0;
    font-style: italic;
    color: #555;
}

/* ==========================================================================
   Section Styles
   ========================================================================== */

.fishing-section {
    border-top: 1px solid #e0e0e0;
    padding: 30px;
}

.section-title {
    margin: 0 0 20px 0;
    font-size: 1.4em;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.info-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
}

.info-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #2c3e50;
}

/* ==========================================================================
   Best Times Styles
   ========================================================================== */

.times-card h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.times-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.time-item:hover {
    background: #f0f0f0;
}

.time-item .time {
    font-weight: bold;
    color: #2c3e50;
}

.time-item .duration,
.time-item .reason {
    font-size: 0.9em;
    color: #666;
}

.quality-excellent {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
}

.quality-good {
    background: #cce7ff !important;
    border-color: #99d6ff !important;
}

.type-major {
    border-left: 4px solid #e74c3c;
}

.type-minor {
    border-left: 4px solid #f39c12;
}

.ai-recommended {
    border-left: 4px solid #9b59b6;
}

/* ==========================================================================
   Locations & Techniques Styles
   ========================================================================== */

.locations-list,
.techniques-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.location-item,
.technique-item {
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.location-name,
.technique-name {
    font-weight: bold;
    color: #2c3e50;
}

.coordinates {
    font-size: 0.8em;
    color: #666;
    font-family: monospace;
}

.location-reason,
.technique-description {
    margin: 0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
}

/* ==========================================================================
   Gear Styles
   ========================================================================== */

.gear-category h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
}

.gear-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gear-item {
    font-size: 0.9em;
    line-height: 1.5;
}

.gear-item strong {
    color: #2c3e50;
}

.gear-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gear-tag {
    background: #e9ecef;
    color: #495057;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

/* ==========================================================================
   Species & Tips Styles
   ========================================================================== */

.species-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.species-tag {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    position: relative;
    padding: 12px 0 12px 30px;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.5;
}

.tips-list li:last-child {
    border-bottom: none;
}

.tips-list li::before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 12px;
}

/* ==========================================================================
   Analysis Styles
   ========================================================================== */

.analysis-content {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 25px;
}

.analysis-text {
    font-size: 1em;
    line-height: 1.7;
    color: #444;
}

.analysis-text p {
    margin-bottom: 15px;
}

.analysis-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.fishing-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
}

.data-sources,
.refresh-info {
    margin-bottom: 8px;
}

.data-sources:last-child,
.refresh-info:last-child {
    margin-bottom: 0;
}

.fishing-footer small {
    color: #666;
    font-size: 0.8em;
    line-height: 1.5;
}

/* ==========================================================================
   Widget Styles
   ========================================================================== */

.tfss-moon-widget {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.tfss-moon-widget-compact {
    padding: 15px;
}

.tfss-moon-widget-detailed {
    padding: 0;
}

/* Compact Widget */
.tfss-moon-compact {
    text-align: center;
}

.moon-phase-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.moon-phase-display .moon-emoji {
    font-size: 2em;
}

.moon-info {
    text-align: left;
}

.phase-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 2px;
}

.illumination {
    font-size: 0.9em;
    color: #666;
}

.fishing-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-excellent .status-dot {
    background: #27ae60;
}

.status-good .status-dot {
    background: #3498db;
}

.status-fair .status-dot {
    background: #f39c12;
}

.status-poor .status-dot {
    background: #e74c3c;
}

.status-excellent {
    background: #d4edda;
    color: #155724;
}

.status-good {
    background: #cce7ff;
    color: #004085;
}

.status-fair {
    background: #fff3cd;
    color: #856404;
}

.status-poor {
    background: #f8d7da;
    color: #721c24;
}

.status-text {
    font-weight: 600;
    text-transform: capitalize;
}

.status-score {
    font-weight: bold;
}

.weather-summary {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9em;
}

.weather-summary .temp,
.weather-summary .pressure {
    font-weight: 600;
    color: #2c3e50;
}

.widget-link,
.widget-actions {
    text-align: center;
}

.tfss-moon-link,
.tfss-moon-button {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.tfss-moon-link:hover,
.tfss-moon-button:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

/* Detailed Widget */
.tfss-moon-detailed .moon-section,
.tfss-moon-detailed .fishing-section,
.tfss-moon-detailed .weather-section,
.tfss-moon-detailed .best-time-section,
.tfss-moon-detailed .widget-actions {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.tfss-moon-detailed .widget-actions {
    border-bottom: none;
}

.tfss-moon-detailed h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #2c3e50;
}

.moon-display {
    display: flex;
    align-items: center;
    gap: 20px;
}

.moon-visual {
    flex-shrink: 0;
}

.moon-details {
    flex-grow: 1;
}

.moon-details .phase-name {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.moon-details .illumination,
.moon-details .moon-age {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 3px;
}

.weather-details .weather-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.weather-details .label {
    font-weight: 600;
    color: #555;
}

.weather-details .value {
    color: #2c3e50;
}

.next-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.next-time .time {
    font-weight: bold;
    color: #2c3e50;
}

.next-time .type {
    font-size: 0.9em;
    color: #666;
}

/* ==========================================================================
   Theme Variations
   ========================================================================== */

/* Dark Theme */
.theme-dark {
    background: #2c3e50;
    color: #ecf0f1;
    border-color: #34495e;
}

.theme-dark .fishing-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.theme-dark .condition-card,
.theme-dark .info-card {
    background: #34495e;
    border-color: #4a6741;
    color: #ecf0f1;
}

.theme-dark .card-header {
    background: #2c3e50;
    border-color: #4a6741;
}

.theme-dark .fishing-section {
    border-color: #4a6741;
}

.theme-dark .section-title {
    color: #ecf0f1;
    border-color: #3498db;
}

.theme-dark .detail-row,
.theme-dark .weather-item,
.theme-dark .time-item {
    border-color: #4a6741;
}

.theme-dark .fishing-quality,
.theme-dark .weather-summary,
.theme-dark .analysis-content {
    background: #2c3e50;
}

.theme-dark .fishing-footer {
    background: #2c3e50;
    border-color: #4a6741;
}

/* Light Theme */
.theme-light {
    background: #fafbfc;
    color: #333;
}

.theme-light .fishing-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-light .condition-card,
.theme-light .info-card {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .fishing-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .last-updated {
        font-size: 0.7em;
    }
    
    .conditions-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .section-grid,
    .times-grid,
    .gear-grid {
        grid-template-columns: 1fr;
    }
    
    .fishing-section {
        padding: 20px;
    }
    
    .moon-phase-display {
        flex-direction: column;
        text-align: center;
    }
    
    .moon-info {
        text-align: center;
    }
    
    .location-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .fishing-status {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .weather-summary {
        flex-direction: column;
        gap: 8px;
    }
    
    .next-time {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .fishing-header {
        padding: 15px 20px;
    }
    
    .conditions-grid {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .fishing-section {
        padding: 15px;
    }
    
    .temp-value {
        font-size: 2.5em;
    }
    
    .quality-score .score {
        font-size: 2em;
    }
}

/* ==========================================================================
   Loading Messages
   ========================================================================== */

.loading-message {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.loading-message p {
    margin: 0 0 10px 0;
}

.loading-message p:last-child {
    margin-bottom: 0;
}

.loading-message strong {
    color: #495057;
}