/**
 * WeatherLink Harbour Display - Frontend Styles
 */

/* Widget Base Styles */
.wlh-widget {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.wlh-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.wlh-widget-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.wlh-update-time {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Current Weather Widget */
.wlh-current-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.wlh-current-main {
    text-align: center;
    padding: 20px;
}

.wlh-temp-display {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
}

.wlh-temp-value {
    font-size: 4rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.wlh-temp-unit {
    font-size: 2rem;
    color: #7f8c8d;
    margin-top: 10px;
}

.wlh-feels-like {
    margin-top: 15px;
    font-size: 1rem;
    color: #7f8c8d;
}

.wlh-current-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wlh-detail-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s;
}

.wlh-detail-item:hover {
    background: #e9ecef;
}

.wlh-detail-icon {
    font-size: 1.5rem;
    text-align: center;
}

.wlh-detail-label {
    font-size: 0.95rem;
    color: #7f8c8d;
    font-weight: 500;
}

.wlh-detail-value {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
}

.wlh-gust {
    display: block;
    font-size: 0.85rem;
    color: #e74c3c;
    font-weight: 500;
    margin-top: 3px;
}

/* Wind Widget */
.wlh-wind-widget {
    text-align: center;
}

.wlh-wind-compass {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.wlh-compass-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid #3498db;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.wlh-wind-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    margin-left: -30px;
    margin-top: -30px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.5s ease;
}

.wlh-compass-labels {
    position: absolute;
    width: 100%;
    height: 100%;
}

.wlh-compass-n,
.wlh-compass-e,
.wlh-compass-s,
.wlh-compass-w {
    position: absolute;
    font-weight: 700;
    font-size: 1.2rem;
    color: #ffffff;
}

.wlh-compass-n { top: 10px; left: 50%; transform: translateX(-50%); }
.wlh-compass-e { right: 15px; top: 50%; transform: translateY(-50%); }
.wlh-compass-s { bottom: 10px; left: 50%; transform: translateX(-50%); }
.wlh-compass-w { left: 15px; top: 50%; transform: translateY(-50%); }

.wlh-wind-data {
    margin-top: 20px;
}

.wlh-wind-direction {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.wlh-wind-speed {
    font-size: 2.5rem;
    color: #3498db;
    font-weight: 700;
}

.wlh-speed-unit {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-left: 5px;
}

.wlh-wind-gusts {
    margin-top: 10px;
    font-size: 1rem;
    color: #e74c3c;
    font-weight: 500;
}

/* Temperature Widget */
.wlh-temperature-widget {
    text-align: center;
}

.wlh-temp-gauge {
    padding: 20px;
}

.wlh-temp-main {
    margin-bottom: 30px;
}

.wlh-temp-large {
    font-size: 5rem;
    font-weight: 700;
    color: #e74c3c;
}

.wlh-temp-unit-large {
    font-size: 2.5rem;
    color: #7f8c8d;
    vertical-align: super;
}

.wlh-temp-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.wlh-temp-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.wlh-temp-label {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.wlh-temp-value {
    display: block;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

/* Pressure Widget */
.wlh-pressure-display {
    text-align: center;
    padding: 30px;
}

.wlh-pressure-value {
    font-size: 3rem;
    color: #9b59b6;
    font-weight: 700;
}

.wlh-pressure-unit {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-left: 10px;
}

/* Humidity Widget */
.wlh-humidity-display {
    text-align: center;
    padding: 30px;
}

.wlh-humidity-value {
    font-size: 3.5rem;
    color: #3498db;
    font-weight: 700;
    margin-bottom: 20px;
}

.wlh-humidity-unit {
    font-size: 1.5rem;
    color: #7f8c8d;
    margin-left: 5px;
}

.wlh-humidity-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.wlh-humidity-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Tide Widget - Plain Modern Style */
.wlh-tide-plain {
    background: #ffffff;
    border: 1px solid #e0e0e0;
}

.wlh-tide-plain .wlh-widget-header {
    border-bottom-color: #e0e0e0;
}

.wlh-tide-plain .wlh-widget-header h3,
.wlh-tide-date {
    color: #2c3e50;
}

.wlh-tide-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.wlh-tide-nav-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.wlh-tide-nav-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.wlh-tide-date-picker {
    flex: 1;
    text-align: center;
}

.wlh-tide-current-date {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 16px;
}

.wlh-tide-date-input {
    width: 100%;
    max-width: 200px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wlh-tide-display-plain {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wlh-tide-plain .wlh-tide-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.wlh-tide-plain .wlh-tide-high {
    border-left: 4px solid #4caf50;
}

.wlh-tide-plain .wlh-tide-low {
    border-left: 4px solid #2196f3;
}

.wlh-tide-plain .wlh-tide-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.wlh-tide-plain .wlh-tide-time {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.wlh-tide-plain .wlh-tide-height {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.wlh-tide-plain .wlh-tide-height-alt {
    font-size: 1rem;
    color: #7f8c8d;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .wlh-tide-display-plain {
        grid-template-columns: 1fr;
    }
    
    .wlh-tide-nav {
        flex-direction: column;
    }
    
    .wlh-tide-nav-btn {
        width: 100%;
    }
}

/* Tide Graph */
.wlh-tide-graph {
    background: #ffffff;
}

.wlh-chart-container {
    position: relative;
    padding: 20px;
}

/* Member Only Message */
.wlh-member-only {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    text-align: center;
}

.wlh-member-only a {
    color: #856404;
    font-weight: 600;
    text-decoration: underline;
}

/* Error Messages */
.wlh-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wlh-current-grid {
        grid-template-columns: 1fr;
    }
    
    .wlh-tide-display {
        grid-template-columns: 1fr;
    }
    
    .wlh-temp-value {
        font-size: 3rem;
    }
    
    .wlh-wind-speed {
        font-size: 2rem;
    }
    
    .wlh-compass-circle {
        width: 150px;
        height: 150px;
    }
    
    .wlh-temp-secondary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wlh-widget {
        padding: 15px;
    }
    
    .wlh-widget-header h3 {
        font-size: 1.2rem;
    }
    
    .wlh-temp-value {
        font-size: 2.5rem;
    }
    
    .wlh-detail-item {
        grid-template-columns: 30px 1fr;
        gap: 8px;
    }
    
    .wlh-detail-value {
        grid-column: 2;
        text-align: left;
        margin-top: 5px;
    }
}

/* ========================================
   AMAZING WEATHER WIDGETS - NEW DESIGN
   ======================================== */

/* Current Weather Grid */
.wlh-weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.wlh-weather-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wlh-weather-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.wlh-weather-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.wlh-weather-content {
    flex: 1;
}

.wlh-weather-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wlh-weather-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.wlh-weather-sub {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

.wlh-last-updated {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Specific card colors */
.wlh-temp-card { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.wlh-humidity-card { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.wlh-pressure-card { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.wlh-wind-card { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.wlh-rain-card { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.wlh-solar-card { background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%); }

.wlh-progress-bar {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    height: 8px;
    margin-top: 8px;
    overflow: hidden;
}

.wlh-progress-fill {
    background: white;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

/* Temperature Widget Large */
.wlh-temp-widget-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.wlh-temp-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.wlh-temp-icon {
    font-size: 4rem;
}

.wlh-temp-main {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.wlh-temp-value {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
}

.wlh-temp-unit {
    font-size: 2rem;
    opacity: 0.8;
}

.wlh-temp-feels-like {
    background: rgba(255,255,255,0.2);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 1.1rem;
}

.wlh-temp-details {
    margin-top: 15px;
    opacity: 0.9;
}

/* Wind Widget Large */
.wlh-wind-widget-large {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.wlh-wind-display {
    display: flex;
    gap: 30px;
    align-items: center;
}

.wlh-wind-compass {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.wlh-compass-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 50%;
    margin-left: -2px;
    transform-origin: bottom center;
    transition: transform 0.3s;
}

.wlh-arrow {
    font-size: 2rem;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.wlh-compass-labels {
    position: absolute;
    width: 100%;
    height: 100%;
}

.wlh-compass-labels span {
    position: absolute;
    font-weight: 700;
    font-size: 1.2rem;
}

.wlh-compass-n { top: 5px; left: 50%; transform: translateX(-50%); }
.wlh-compass-e { right: 8px; top: 50%; transform: translateY(-50%); }
.wlh-compass-s { bottom: 5px; left: 50%; transform: translateX(-50%); }
.wlh-compass-w { left: 8px; top: 50%; transform: translateY(-50%); }

.wlh-wind-stats {
    flex: 1;
}

.wlh-wind-speed {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.wlh-wind-icon {
    font-size: 3rem;
}

.wlh-wind-value {
    font-size: 3.5rem;
    font-weight: 700;
}

.wlh-wind-unit {
    font-size: 1.2rem;
    opacity: 0.8;
}

.wlh-wind-direction {
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 8px;
}

.wlh-wind-dir-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.wlh-wind-dir-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 5px;
}

/* Pressure Widget Large */
.wlh-pressure-widget-large {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.wlh-pressure-display {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.wlh-pressure-icon {
    font-size: 3rem;
}

.wlh-pressure-main {
    flex: 1;
}

.wlh-pressure-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.wlh-pressure-value {
    font-size: 3.5rem;
    font-weight: 700;
}

.wlh-pressure-unit {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-top: 5px;
}

.wlh-pressure-scale {
    position: relative;
    height: 30px;
    background: rgba(255,255,255,0.3);
    border-radius: 15px;
    margin-top: 15px;
}

.wlh-pressure-marker {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 40px;
    background: white;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: left 0.3s;
}

.wlh-pressure-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Humidity Widget Large */
.wlh-humidity-widget-large {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.wlh-humidity-display {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.wlh-humidity-icon {
    font-size: 3rem;
}

.wlh-humidity-main {
    flex: 1;
}

.wlh-humidity-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.wlh-humidity-value {
    font-size: 3.5rem;
    font-weight: 700;
}

.wlh-humidity-unit {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-top: 5px;
}

.wlh-humidity-bar {
    background: rgba(255,255,255,0.3);
    border-radius: 20px;
    height: 40px;
    overflow: hidden;
    position: relative;
}

.wlh-humidity-fill {
    background: white;
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
}

.wlh-humidity-text {
    font-weight: 700;
    color: #4facfe;
}

.wlh-humidity-comfort {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .wlh-weather-grid {
        grid-template-columns: 1fr;
    }
    
    .wlh-wind-display {
        flex-direction: column;
    }
    
    .wlh-temp-display {
        flex-direction: column;
    }
    
    .wlh-temp-value {
        font-size: 4rem;
    }
    
    .wlh-pressure-display {
        flex-direction: column;
        text-align: center;
    }
    
    .wlh-humidity-display {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================
   TIDE DISPLAY STYLES
   ========================================== */

.wlh-tide-widget {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin: 20px 0;
}

.wlh-tide-widget .wlh-widget-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wlh-tide-widget .wlh-widget-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Navigation */
.wlh-tide-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.wlh-tide-nav-btn {
    background: #f3f4f6;
    color: #374151;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.wlh-tide-nav-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.wlh-tide-date-picker {
    flex: 1;
    text-align: center;
}

.wlh-tide-current-date {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.wlh-tide-date-input {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Tide Display */
.wlh-tide-display-plain {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wlh-tide-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.wlh-tide-high {
    border-left: 4px solid #10b981;
}

.wlh-tide-low {
    border-left: 4px solid #3b82f6;
}

.wlh-tide-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.wlh-tide-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 10px;
}

.wlh-tide-height {
    font-size: 1.125rem;
    color: #374151;
    font-weight: 500;
}

.wlh-tide-height-alt {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Member only message */
.wlh-member-only {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #92400e;
}

.wlh-member-only a {
    color: #f59e0b;
    font-weight: 600;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .wlh-tide-display-plain {
        grid-template-columns: 1fr;
    }
    
    .wlh-tide-nav {
        flex-direction: column;
    }
    
    .wlh-tide-date-picker {
        order: -1;
        width: 100%;
    }
}

/* ==========================================
   CONTAINER ALIGNMENT FIX
   ========================================== */

/* Ensure weather and tide widgets respect theme container width */
.wlh-weather-simple,
.wlh-tide-simple,
.wlh-tide-graph-widget {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* For themes with specific container classes */
.container .wlh-weather-simple,
.container .wlh-tide-simple,
.container .wlh-tide-graph-widget,
.entry-content .wlh-weather-simple,
.entry-content .wlh-tide-simple,
.entry-content .wlh-tide-graph-widget {
    max-width: 100%;
}

@media (max-width: 1240px) {
    .wlh-weather-simple,
    .wlh-tide-simple,
    .wlh-tide-graph-widget {
        margin-left: 20px;
        margin-right: 20px;
    }
}
