/**
 * OWM Weather Plugin Styles
 */

/* Container */
.owm-weather-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Light Theme */
.owm-theme-light {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.owm-theme-light .owm-weather-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Dark Theme */
.owm-theme-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

.owm-theme-dark .owm-weather-content {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* Loading State */
.owm-weather-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.owm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: owm-spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Content */
.owm-weather-content {
    padding: 25px;
}

/* Location */
.owm-location {
    text-align: center;
    margin-bottom: 15px;
}

.owm-city-name {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Main Info */
.owm-main-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.owm-weather-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.owm-temperature {
    font-size: 3.5em;
    font-weight: 300;
    line-height: 1;
}

/* Description */
.owm-description {
    text-align: center;
    font-size: 1.2em;
    text-transform: capitalize;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Details */
.owm-details {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.owm-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.owm-label {
    font-size: 0.75em;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.owm-detail span:last-child {
    font-size: 1.1em;
    font-weight: 500;
}

/* Forecast */
.owm-forecast {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.owm-forecast h4 {
    margin: 0 0 15px 0;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    text-align: center;
}

.owm-forecast-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.owm-forecast-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    transition: background 0.2s ease;
}

.owm-forecast-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.owm-forecast-day {
    font-weight: 500;
    min-width: 100px;
}

.owm-forecast-icon {
    width: 40px;
    height: 40px;
}

.owm-forecast-desc {
    flex: 1;
    text-align: center;
    font-size: 0.9em;
    opacity: 0.9;
    padding: 0 10px;
}

.owm-forecast-temp {
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

/* Error State */
.owm-weather-error {
    padding: 30px 20px;
    text-align: center;
}

.owm-error-message {
    margin: 0;
    color: #ffcdd2;
    font-size: 0.95em;
}

.owm-theme-dark .owm-error-message {
    color: #ef9a9a;
}

/* Widget Adjustments */
.widget .owm-weather-container {
    max-width: 100%;
}

.widget .owm-temperature {
    font-size: 2.5em;
}

.widget .owm-weather-icon {
    width: 60px;
    height: 60px;
}

.widget .owm-forecast-item {
    flex-wrap: wrap;
}

.widget .owm-forecast-desc {
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    .owm-weather-container {
        border-radius: 0;
        max-width: 100%;
    }

    .owm-temperature {
        font-size: 2.8em;
    }

    .owm-details {
        flex-wrap: wrap;
        gap: 15px;
    }

    .owm-detail {
        min-width: 80px;
    }

    .owm-forecast-desc {
        display: none;
    }
}

/* Animation */
.owm-weather-content {
    animation: owm-fadeIn 0.5s ease;
}

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

/* Refresh Button (optional) */
.owm-refresh-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.owm-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.owm-refresh-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Attribution */
.owm-attribution {
    text-align: center;
    font-size: 0.7em;
    opacity: 0.5;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.owm-attribution a {
    color: inherit;
    text-decoration: none;
}

.owm-attribution a:hover {
    text-decoration: underline;
}
