/**
 * MausamAlert Weather - Responsive Stylesheet
 * File: /css/mausamalert-weather.css
 * Production-ready. Core Web Vitals Optimized.
 */

html {
    scroll-behavior: smooth;
}

.ma-weather-container,
.ma-weather-container * {
    box-sizing: border-box;
}

.ma-weather-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text);
    /* border-radius: 16px; */
    padding: 24px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); */
    max-width: 100%;
    margin: 20px auto;
    overflow-x: hidden;
    /* border: 1px solid var(--border); */
}

/* Breadcrumbs style */
.ma-weather-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    font-size: 13px;
}

.ma-weather-breadcrumb li {
    display: flex;
    align-items: center;
}

.ma-weather-breadcrumb li:not(:last-child)::after {
    content: "➔";
    margin: 0 8px;
    color: var(--dim);
    font-size: 10px;
}

.ma-weather-breadcrumb a {
    color: var(--blue);
    text-decoration: none;
}

.ma-weather-breadcrumb a:hover {
    text-decoration: underline;
}

/* Nav Tabs */
.ma-weather-tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.ma-tab-link {
    display: inline-block;
    padding: 10px 18px;
    background: var(--bg3);
    border-radius: 30px;
    color: var(--dimmer);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ma-tab-link:hover {
    background: var(--border);
}

.ma-tab-link.is-active {
    background: var(--blue);
    color: var(--bg);
}

/* Hero Section with weather specific theme gradients */
.ma-weather-hero {
    scroll-margin-top: 60px;
    border-radius: 12px;
    padding: 32px;
    color: var(--bg);
    margin-bottom: 30px;
    transition: background 0.5s ease;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue2) 100%);
}

.ma-weather-hero.ma-clear {
    background: linear-gradient(135deg, var(--amber) 0%, var(--orange) 100%);
}

.ma-weather-hero.ma-cloudy {
    background: linear-gradient(135deg, var(--muted) 0%, var(--dimmer) 100%);
}

.ma-weather-hero.ma-rain,
.ma-weather-hero.ma-showers {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue2) 100%);
}

.ma-weather-hero.ma-storm {
    background: linear-gradient(135deg, var(--blue2) 0%, #5b21b6 100%);
}

.ma-weather-hero.ma-fog {
    background: linear-gradient(135deg, var(--dim) 0%, var(--muted) 100%);
}

.ma-live-tag {
    background: var(--red);
    color: var(--bg);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.ma-weather-h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: var(--amber);
    line-height: 1.2;
}

.ma-weather-subtitle {
    font-size: 15px;
    opacity: 0.9;
    margin: 0 0 24px 0;
}

/* Dashboard Grid */
.ma-hero-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}

@media (min-width: 768px) {
    .ma-hero-dashboard {
        grid-template-columns: auto 1fr;
    }
}

.ma-main-temp-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ma-temp-display {
    font-size: 64px;
    font-weight: 800;
    display: flex;
    align-items: flex-start;
}

.ma-temp-unit {
    font-size: 28px;
    margin-top: 10px;
}

.ma-status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.ma-feels-like {
    font-size: 14px;
    margin: 6px 0 0 0;
    opacity: 0.9;
}

/* Bento Metrics */
.ma-bento-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .ma-bento-metrics {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ma-metric-item {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ma-metric-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ma-metric-value {
    font-size: 20px;
    font-weight: 700;
}

.ma-sun-tracker {
    display: flex;
    gap: 20px;
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 16px;
}

.ma-sun-node {
    font-size: 13px;
    opacity: 0.9;
}

.ma-sun-time {
    font-weight: 600;
    margin-left: 6px;
}

/* Standard Sections */
.ma-weather-section {
    scroll-margin-top: 60px;
    margin-top: 36px;
}

.ma-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

/* Hourly Slider (Scroll container) */
.ma-hourly-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
}

.ma-hourly-item {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    min-width: 100px;
    text-align: center;
    flex-shrink: 0;
}

.ma-hour-lbl {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}

.ma-hour-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    margin: 4px 0;
}

.ma-hour-badge.ma-clear {
    background: var(--amber);
}

.ma-hour-badge.ma-cloudy {
    background: var(--dim);
}

.ma-hour-badge.ma-rain {
    background: var(--blue);
}

.ma-hour-badge.ma-storm {
    background: var(--blue2);
}

.ma-hour-temp {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.ma-hour-rain {
    display: block;
    font-size: 11px;
    color: var(--blue);
    margin-top: 4px;
}

/* Extended Multi-day layout */
.ma-extended-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ma-extended-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.ma-row-date {
    width: 120px;
}

.ma-row-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
}

.ma-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.ma-status-indicator.ma-clear {
    background-color: var(--amber);
}

.ma-status-indicator.ma-cloudy {
    background-color: var(--dim);
}

.ma-status-indicator.ma-rain {
    background-color: var(--blue);
}

.ma-status-indicator.ma-storm {
    background-color: var(--blue2);
}

.ma-temp-high {
    font-weight: 700;
}

.ma-uv-pill {
    background: rgba(var(--alert-yellow-rgb), 0.1);
    border: 1px solid rgba(var(--alert-yellow-rgb), 0.28);
    color: var(--yellow);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Rain prediction tab */
.ma-rain-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .ma-rain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ma-rain-gauge-card {
    background: var(--bg3);
    border: 1px solid var(--green);
    padding: 20px;
    border-radius: 12px;
}

.ma-gauge-bar-bg {
    background: var(--border);
    height: 12px;
    border-radius: 6px;
    margin: 12px 0;
    overflow: hidden;
}

.ma-gauge-bar-fill {
    background: var(--green);
    height: 100%;
    transition: width 1s ease-in-out;
}

/* Nearby Cities Cards - Dynamic grid for responsiveness */
.ma-cities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .ma-cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .ma-cities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ma-city-anchor {
    padding: 12px;
    background: var(--bg2);
    border-radius: 8px;
    text-align: center;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.ma-city-anchor:hover {
    background: var(--blue);
    color: var(--bg);
}

/* FAQ Trigger Accordions */
.ma-faq-item {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.ma-faq-trigger {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    padding: 8px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.ma-faq-trigger::after {
    content: "✚";
    font-size: 12px;
    color: var(--muted);
}

.ma-faq-trigger.is-active::after {
    content: "➖";
}

.ma-faq-panel {
    display: none;
    padding-top: 8px;
    font-size: 14px;
    color: var(--dim);
    line-height: 1.6;
}

/* Social Share Style */
.ma-social-share {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--bg2);
    padding: 12px 20px;
    border-radius: 10px;
}

.ma-share-label {
    font-weight: 600;
    font-size: 13px;
}

.ma-share-btn {
    padding: 6px 12px;
    color: var(--bg);
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.ma-share-btn.fb {
    background: #3b5998;
}

.ma-share-btn.tw {
    background: #1da1f2;
}

.ma-share-btn.wa {
    background: #25d366;
}

.ma-comments-section {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

/* Hindi Cards and Details Wrapper */
.ma-hindi-details-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 24px 0;
}

.ma-hindi-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.ma-hindi-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ma-hindi-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.ma-hindi-icon-wrapper.map-icon {
    background-color: var(--bg3);
}

.ma-hindi-icon-wrapper.clipboard-icon {
    background-color: var(--bg3);
}

.ma-hindi-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue2);
    margin: 0;
}

.ma-hindi-card-text {
    font-size: 15px;
    line-height: 1.75;
    color: var(--dimmer);
    margin: 0;
}