/* Puerto Rico Weather Plugin Styles */

.pr-weather-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.pr-weather-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="30" cy="70" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="70" cy="80" r="1" fill="rgba(255,255,255,0.03)"/></svg>');
    pointer-events: none;
}

.pr-weather-widget > * {
    position: relative;
    z-index: 1;
}

/* Location Section */
.pr-weather-location {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.pr-weather-location h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pr-weather-location-links {
    font-size: 0.9em;
    opacity: 0.9;
}

.pr-weather-location-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 8px;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-block;
}

.pr-weather-location-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Current Conditions */
.pr-weather-current {
    margin-bottom: 30px;
}

.pr-weather-current h3 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

.pr-weather-current-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: center;
}

.pr-weather-temp-main {
    text-align: center;
}

.pr-weather-temperature {
    display: block;
    font-size: 3.5em;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pr-weather-condition {
    font-size: 1.1em;
    opacity: 0.9;
    display: block;
}

.pr-weather-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pr-weather-detail {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 8px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.pr-weather-detail:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.pr-weather-label {
    display: block;
    font-size: 0.8em;
    opacity: 0.8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pr-weather-value {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
}

.pr-weather-observation {
    margin-top: 20px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.85em;
    line-height: 1.4;
}

/* Extended Forecast */
.pr-weather-extended {
    margin-bottom: 30px;
}

.pr-weather-extended h3 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

.pr-weather-daily-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.pr-weather-daily-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 3fr;
    gap: 15px;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

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

.pr-weather-daily-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pr-weather-day-name {
    font-weight: 600;
    display: block;
}

.pr-weather-day-date {
    font-size: 0.9em;
    opacity: 0.8;
    display: block;
}

.pr-weather-daily-temp {
    font-size: 1.4em;
    font-weight: 600;
    text-align: center;
}

.pr-weather-daily-icon {
    text-align: center;
}

.pr-weather-daily-icon img {
    max-width: 50px;
    max-height: 50px;
    filter: brightness(1.1);
}

.pr-weather-forecast {
    display: block;
    margin-bottom: 4px;
}

.pr-weather-wind {
    font-size: 0.85em;
    opacity: 0.8;
    display: block;
}

/* Hourly Forecast */
.pr-weather-hourly h3 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
}

.pr-weather-hourly-scroll {
    overflow-x: auto;
    padding-bottom: 10px;
}

.pr-weather-hourly-scroll::-webkit-scrollbar {
    height: 6px;
}

.pr-weather-hourly-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.pr-weather-hourly-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.pr-weather-hourly-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.pr-weather-hourly-list {
    display: flex;
    gap: 15px;
    min-width: fit-content;
}

.pr-weather-hourly-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 12px;
    border-radius: 15px;
    min-width: 110px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pr-weather-hourly-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pr-weather-hour-time {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.pr-weather-hour-temp {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
}

.pr-weather-hour-icon {
    margin-bottom: 10px;
}

.pr-weather-hour-icon img {
    max-width: 60px;
    max-height: 60px;
    filter: brightness(1.1);
}

.pr-weather-hour-desc {
    font-size: 0.8em;
    margin-bottom: 6px;
    opacity: 0.9;
    line-height: 1.2;
}

.pr-weather-hour-wind {
    font-size: 0.75em;
    opacity: 0.8;
}

/* Error States */
.pr-weather-error {
    background: #ff6b6b;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Loading States */
.pr-weather-loading {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.7;
}

.pr-weather-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: pr-weather-spin 1s ease-in-out infinite;
    margin-left: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .pr-weather-widget {
        margin: 10px;
        padding: 15px;
        border-radius: 15px;
    }
    
    .pr-weather-current-main {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .pr-weather-detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .pr-weather-daily-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
        padding: 15px;
    }
    
    .pr-weather-temperature {
        font-size: 2.8em;
    }
    
    .pr-weather-location-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .pr-weather-hourly-item {
        min-width: 90px;
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .pr-weather-detail-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .pr-weather-detail {
        padding: 10px;
    }
    
    .pr-weather-temperature {
        font-size: 2.4em;
    }
    
    .pr-weather-hourly-item {
        min-width: 80px;
        padding: 10px 6px;
    }
    
    .pr-weather-hour-icon img {
        max-width: 50px;
        max-height: 50px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pr-weather-widget {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
}

/* Animation enhancements */
.pr-weather-widget {
    animation: pr-weather-fade-in 0.6s ease-out;
}

@keyframes pr-weather-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus styles for accessibility */
.pr-weather-location-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .pr-weather-widget {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .pr-weather-location-links,
    .pr-weather-hourly {
        display: none !important;
    }
}