/* assets/css/frontend.css */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main Container - Full Screen Weather Experience */
.autowasweer-widget {
    position: relative;
    min-height: 100vh;
    width: 100vw;
    margin: -50px -50px 0 -50px;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Weather Theme Classes */
.autowasweer-widget.theme-sunny {
    background: linear-gradient(135deg, #56CCF2 0%, #2F80ED 100%);
}

.autowasweer-widget.theme-rainy {
    background: linear-gradient(135deg, #4B5563 0%, #1F2937 100%);
}

.autowasweer-widget.theme-cloudy {
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
}

.autowasweer-widget.theme-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animated Background Clouds */
.aww-weather-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.3;
}

.aww-cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    opacity: 0.4;
}

.aww-cloud::before {
    content: '';
    position: absolute;
    background: white;
    border-radius: 100px;
}

.aww-cloud1 {
    width: 100px;
    height: 40px;
    top: 20%;
    animation: float 20s infinite;
}

.aww-cloud1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.aww-cloud2 {
    width: 80px;
    height: 35px;
    top: 40%;
    animation: float 25s infinite;
}

.aww-cloud2::before {
    width: 60px;
    height: 40px;
    top: -20px;
    right: 15px;
}

@keyframes float {
    0% {
        transform: translateX(-100px);
    }
    100% {
        transform: translateX(calc(100vw + 100px));
    }
}

/* Main Weather Display */
.aww-weather-display {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header with Time and Location */
.aww-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    color: white;
    animation: fadeInDown 0.8s ease;
}

.aww-datetime {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    opacity: 0.9;
}

.aww-time {
    font-weight: 600;
    font-size: 24px;
}

.aww-date {
    opacity: 0.8;
}

.aww-location-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.aww-location-display::before {
    content: '📍';
    font-size: 20px;
}

/* Main Weather Card */
.aww-main-weather {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    margin-bottom: 60px;
    animation: fadeIn 1s ease;
}

.aww-weather-icon {
    font-size: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.2));
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.aww-temperature {
    font-size: 96px;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 10px;
    position: relative;
}

.aww-temperature span {
    font-size: 48px;
    position: absolute;
    top: 10px;
    margin-left: 5px;
}

.aww-weather-description {
    font-size: 28px;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 30px;
    text-transform: capitalize;
}

/* Car Wash Advice - Premium Card */
.aww-advice-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.aww-advice-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.aww-advice-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.aww-advice-indicator.yes {
    background: #10B981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.aww-advice-indicator.no {
    background: #EF4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.aww-advice-indicator.wait {
    background: #F59E0B;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.aww-advice-title {
    font-size: 32px;
    font-weight: 600;
    color: white;
}

.aww-advice-message {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Weather Details Grid */
.aww-weather-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.aww-stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease, background 0.3s ease;
}

.aww-stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.aww-stat-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.aww-stat-value {
    font-size: 28px;
    font-weight: 600;
}

/* 7-Day Forecast */
.aww-forecast-section {
    margin-top: auto;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.aww-forecast-title {
    color: white;
    font-size: 20px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.aww-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.aww-forecast-day {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px 15px;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
}

.aww-forecast-day:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.aww-forecast-day.today {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.aww-forecast-weekday {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.aww-forecast-icon {
    font-size: 32px;
    margin: 10px 0;
}

.aww-forecast-temp {
    font-size: 20px;
    font-weight: 600;
}

.aww-forecast-temp-low {
    font-size: 16px;
    opacity: 0.7;
    margin-left: 5px;
}

/* Input Section - Floating Card */
.aww-input-card {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 600px;
    width: 90%;
    animation: slideUp 0.8s ease;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.aww-location-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #E5E7EB;
    border-radius: 15px;
    background: white;
    transition: all 0.3s ease;
}

.aww-location-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.aww-button {
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.aww-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.aww-button-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.aww-button-location {
    background: #F3F4F6;
    color: #374151;
    padding: 15px;
}

.aww-button-location:hover {
    background: #E5E7EB;
}

/* Loading State */
.aww-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.aww-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.aww-loading p {
    color: white;
    font-size: 18px;
}

/* Error State */
.aww-error {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Rain Animation for Rainy Theme */
.theme-rainy .aww-rain {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.theme-rainy .aww-rain::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="50" y1="0" x2="50" y2="3" stroke="rgba(255,255,255,0.3)" stroke-width="0.5"><animate attributeName="y1" from="-10" to="100" dur="0.5s" repeatCount="indefinite"/><animate attributeName="y2" from="-7" to="103" dur="0.5s" repeatCount="indefinite"/></line></svg>') repeat;
    animation: rain 1s linear infinite;
}

@keyframes rain {
    to {
        transform: translateY(100px);
    }
}

/* Sun Rays for Sunny Theme */
.theme-sunny .aww-sun-rays {
    position: absolute;
    top: 100px;
    right: 100px;
    width: 200px;
    height: 200px;
    opacity: 0.3;
}

.theme-sunny .aww-sun-rays::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-sun 3s ease-in-out infinite;
}

@keyframes pulse-sun {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .aww-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .aww-temperature {
        font-size: 72px;
    }
    
    .aww-weather-description {
        font-size: 24px;
    }
    
    .aww-advice-title {
        font-size: 24px;
    }
    
    .aww-weather-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .aww-forecast-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .aww-input-card {
        flex-direction: column;
        width: 95%;
        bottom: 20px;
    }
    
    .aww-location-input,
    .aww-button {
        width: 100%;
    }
}

/* Smooth Transitions */
.aww-weather-display,
.aww-main-weather,
.aww-advice-box,
.aww-weather-stats,
.aww-forecast-section {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide initial state */
.aww-weather-display.hidden {
    display: none;
}

/* Custom Scrollbar */
.autowasweer-widget::-webkit-scrollbar {
    width: 10px;
}

.autowasweer-widget::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.autowasweer-widget::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

.autowasweer-widget::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}