/* Franz Fahrenheit Web App Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f2f2f7;
    min-height: 100vh;
    color: #1c1c1e;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Header - directly on background */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    color: #1c1c1e;
}

.app-store-button {
    height: 40px;
}

.app-store-button img {
    height: 100%;
    width: auto;
}

/* Value Proposition */
.value-prop {
    text-align: center;
    color: #8e8e93;
    font-size: 16px;
    font-weight: 400;
    margin: 20px 0 30px 0;
    padding: 0 20px;
}

/* Location Section */
.location-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.location-button {
    background: #007aff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Geist', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.location-button:hover {
    background: #0056cc;
    transform: translateY(-1px);
}

.location-button:disabled {
    background: #8e8e93;
    cursor: not-allowed;
    transform: none;
}

/* Current Weather Section - iOS Style */
.current-weather-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    text-align: center;
}

.city-name {
    font-size: 32px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 10px;
}

.current-weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.weather-icon {
    font-size: 70px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.weather-icon .wi {
    font-size: 70px;
    color: #007AFF;
}

/* Weather icons in hourly and daily forecasts */
.hourly-icon .wi,
.daily-icon .wi {
    font-size: 24px;
    color: #007AFF;
}

/* Temperature Stack Component - iOS Style */
.temperature-stack {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.temp-primary {
    font-family: 'Geist Mono', monospace;
    font-size: 48px;
    font-weight: 500;
    color: #1c1c1e;
    line-height: 1;
}

.temp-secondary {
    font-family: 'Geist Mono', monospace;
    font-size: 48px;
    font-weight: 500;
    color: #8e8e93;
    opacity: 0.6;
    line-height: 1;
}

/* Small temperature stacks for details */
.temperature-stack-small {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.temp-primary-small {
    font-family: 'Geist Mono', monospace;
    font-size: 16px;
    font-weight: 500;
    color: #1c1c1e;
    line-height: 1.2;
}

.temp-secondary-small {
    font-family: 'Geist Mono', monospace;
    font-size: 16px;
    font-weight: 500;
    color: #8e8e93;
    opacity: 0.6;
    line-height: 1.2;
}

/* Hourly temperature stacks */
.temperature-stack-hourly {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.temp-primary-hourly {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #1c1c1e;
    line-height: 1.2;
}

.temp-secondary-hourly {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: #8e8e93;
    opacity: 0.6;
    line-height: 1.2;
}

/* Daily temperature stacks */
.temperature-stack-daily {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.temp-primary-daily {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1e;
    line-height: 1.2;
}

.temp-secondary-daily {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #8e8e93;
    opacity: 0.6;
    line-height: 1.2;
}

.condition-text {
    font-size: 18px;
    color: #8e8e93;
    margin-top: 8px;
}

.feels-like {
    font-size: 16px;
    color: #8e8e93;
    margin-top: 10px;
}

/* Weather Details Grid - iOS Style */
.weather-details-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Inline weather details within current weather section */
.weather-details-inline {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(60, 60, 67, 0.1);
}

/* Compact feels like section */
.feels-like-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.feels-like-label {
    font-size: 16px;
    color: #8e8e93;
}

.feels-like-temps {
    font-family: 'Geist Mono', monospace;
    font-size: 16px;
    font-weight: 500;
    color: #8e8e93;
}

/* Compact weather details section */
.weather-details-compact {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(60, 60, 67, 0.1);
}

.compact-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 16px;
    align-items: flex-start;
}

.humidity-compact,
.pressure-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.wind-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.wind-stack-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.compact-value {
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1e;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1c1c1e;
    font-size: 16px;
}

.detail-icon {
    font-size: 16px;
    color: #8e8e93;
}

.detail-value {
    font-family: 'Geist Mono', monospace;
    font-size: 16px;
    font-weight: 500;
    color: #8e8e93;
}

/* Compact humidity and wind row */
.humidity-wind-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
}

.humidity-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.wind-section {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

/* Wind display with multiple units (vertically stacked) */
.wind-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.wind-primary {
    font-family: 'Geist', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1c1c1e;
    line-height: 1.2;
}

.wind-secondary {
    font-family: 'Geist', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #8e8e93;
    line-height: 1.2;
}

.wind-tertiary {
    font-family: 'Geist', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #8e8e93;
    line-height: 1.2;
}

.wind-beaufort {
    font-family: 'Geist', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #8e8e93;
    line-height: 1.2;
}

/* Small wind display for details section */
.wind-display-small {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.wind-display-small .wind-primary {
    font-size: 14px;
}

.wind-display-small .wind-secondary {
    font-size: 12px;
}

.wind-display-small .wind-tertiary {
    font-size: 12px;
}

.wind-display-small .wind-beaufort {
    font-size: 12px;
}

/* Hourly Forecast Section */
.hourly-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #8e8e93;
}

.hourly-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hourly-scroll::-webkit-scrollbar {
    display: none;
}

.hourly-container {
    display: flex;
    gap: 12px;
    padding: 10px 0;
}

.hourly-item {
    flex-shrink: 0;
    text-align: center;
    min-width: 50px;
    max-width: 50px;
    width: 50px;
}

.hourly-time {
    font-size: 14px;
    color: #8e8e93;
    margin-bottom: 8px;
}

.hourly-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.hourly-precip {
    font-size: 12px;
    color: #007aff;
    margin-bottom: 8px;
    height: 16px;
}

/* Daily Forecast Section */
.daily-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.daily-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.daily-item {
    display: grid;
    grid-template-columns: 70px 50px 1fr;
    grid-template-areas: 
        "day icon temps";
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(60, 60, 67, 0.1);
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Show narrative only on larger screens */
@media (min-width: 768px) {
    .daily-item {
        grid-template-columns: 70px 1fr 50px 100px;
        grid-template-areas: 
            "day narrative icon temps";
        gap: 12px;
    }
    
    .daily-description {
        display: block;
    }
}

/* On small screens, keep temps container right-aligned while stacks stay centered internally */
@media (max-width: 767px) {
    .daily-temps { justify-content: flex-end; }
}

.daily-item:last-child {
    border-bottom: none;
}

.daily-day {
    grid-area: day;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.daily-weekday {
    font-size: 16px;
    color: #1c1c1e;
    font-weight: 500;
    line-height: 1.2;
}

.daily-date {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 2px;
}

.daily-description {
    grid-area: narrative;
    font-size: 13px;
    color: #1c1c1e;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    display: none; /* Hidden by default on mobile */
}

/* Show narrative on larger screens */
@media (min-width: 768px) {
    .daily-description {
        display: block;
    }
}

.daily-icon {
    grid-area: icon;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.daily-icon .wi {
    font-size: 24px;
}

.daily-precip {
    font-size: 12px;
    color: #007aff;
    text-align: center;
}

.daily-temps {
    grid-area: temps;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

/* Error State */
.error {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .current-weather-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .temp-primary, .temp-secondary {
        font-size: 48px;
    }
    
    .weather-icon {
        font-size: 60px;
    }
    
    /* Ensure forecast sections don't overflow on mobile */
    .hourly-section,
    .daily-section {
        padding: 15px;
    }
    
    .hourly-container {
        gap: 8px;
    }
    
    .hourly-item {
        min-width: 45px;
        max-width: 45px;
        width: 45px;
    }
    
    .daily-item {
        grid-template-columns: 60px 40px 1fr;
        gap: 6px;
    }
    
    .daily-temps {
        gap: 8px;
        min-width: 0;
        max-width: none;
        width: 100%;
        justify-content: flex-end;
    }
}
