/* UV-Index Forecast Widget Styles */
.uv-forecast-widget {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 24px;
    padding: 32px;
    margin: 20px 0;
    color: white;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    /* Glassmorphism overlay */
    .uv-forecast-widget::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
        pointer-events: none;
        border-radius: 24px;
    }

    /* Animerade solstrålar */
    .uv-forecast-widget::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
        animation: uvRotate 20s linear infinite;
        pointer-events: none;
    }

@keyframes uvRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.uv-forecast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.uv-forecast-title {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 2;
    letter-spacing: -0.025em;
}

    .uv-forecast-title svg {
        margin-right: 12px;
        filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
        animation: uvPulse 2s ease-in-out infinite;
    }

@keyframes uvPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.4));
    }
}

.uv-current-value {
    text-align: right;
    position: relative;
    z-index: 2;
}

.uv-current-index {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
    line-height: 1;
    letter-spacing: -0.05em;
}

.uv-current-level {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 1);
    margin: 4px 0 0 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.uv-chart-container {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.uv-chart {
    width: 100%;
    height: 200px;
    overflow-x: auto;
    overflow-y: hidden;
}

.uv-chart-svg {
    min-width: 100%;
    height: 100%;
}

.uv-chart-grid {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1;
}

.uv-chart-line {
    fill: none;
    stroke: #FFD700;
    stroke-width: 3;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}

.uv-chart-area {
    fill: url(#uvGradient);
    opacity: 0.4;
}

.uv-chart-point {
    fill: #FFD700;
    stroke: white;
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .uv-chart-point:hover {
        r: 6;
        filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.6));
    }

.uv-chart-label {
    fill: white;
    font-size: 13px;
    text-anchor: middle;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.uv-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

    .uv-tooltip.show {
        opacity: 1;
    }

.uv-forecast-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 24px;
    position: relative;
    z-index: 2;
}

.uv-info-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.25);
    padding: 20px 16px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .uv-info-item:hover {
        background: rgba(255, 255, 255, 0.35);
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

.uv-info-value {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: white;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.025em;
}

.uv-info-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.uv-warning-text {
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    line-height: 1.6;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.uv-loading {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

    .uv-loading .spinner-border {
        color: #FFD700;
        width: 2rem;
        height: 2rem;
    }

.uv-error {
    text-align: center;
    padding: 20px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    color: #ff6b7a;
}

/* Responsiv design */
@media (max-width: 768px) {
    .uv-forecast-widget {
        padding: 16px;
        margin: 16px 0;
    }

    .uv-forecast-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .uv-current-value {
        text-align: center;
    }

    .uv-chart-container {
        padding: 16px;
    }

    .uv-chart {
        height: 160px;
    }

    .uv-forecast-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .uv-legend {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Animationer */
@keyframes uvFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uv-forecast-widget {
    animation: uvFadeIn 0.6s ease-out;
}

.uv-chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: uvLineAnimation 1.5s ease-out forwards;
}

@keyframes uvLineAnimation {
    to {
        stroke-dashoffset: 0;
    }
}

.uv-chart-point {
    opacity: 0;
    animation: uvPointAnimation 0.3s ease-out forwards;
}

    .uv-chart-point:nth-child(1) {
        animation-delay: 0.1s;
    }

    .uv-chart-point:nth-child(2) {
        animation-delay: 0.15s;
    }

    .uv-chart-point:nth-child(3) {
        animation-delay: 0.2s;
    }

    .uv-chart-point:nth-child(4) {
        animation-delay: 0.25s;
    }

    .uv-chart-point:nth-child(5) {
        animation-delay: 0.3s;
    }

@keyframes uvPointAnimation {
    to {
        opacity: 1;
    }
}
/* MOBIL VERSION - Kompakt och enkel */
.uv-forecast-widget.uv-mobile {
    padding: 16px;
    margin: 16px 0;
}

.uv-mobile .uv-forecast-header {
    margin-bottom: 12px;
}

.uv-mobile .uv-forecast-title {
    font-size: 1rem;
}

.uv-mobile .uv-current-index {
    font-size: 1.8rem;
}

.uv-mobile .uv-current-level {
    font-size: 0.9rem;
}

/* Mobil info grid - 2 kolumner ist�llet f�r 3 */
.uv-mobile-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0;
}

    .uv-mobile-info .uv-info-item {
        padding: 8px;
        font-size: 0.85rem;
    }

    .uv-mobile-info .uv-info-value {
        font-size: 1rem;
    }

    .uv-mobile-info .uv-info-label {
        font-size: 0.8rem;
    }

/* Mobil varning */
.uv-mobile-warning {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .uv-mobile-warning p {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 1);
        font-weight: 500;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

/* F�rb�ttrad responsiv design */
@media (max-width: 768px) {
    .uv-forecast-widget {
        padding: 14px;
        margin: 14px 0;
    }

    .uv-forecast-header {
        flex-direction: row;
        text-align: left;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }

    .uv-current-value {
        text-align: right;
    }

    /* D�lj grafen p� mobil f�r b�ttre prestanda */
    .uv-chart-container {
        display: none;
    }

    /* Kompaktare legend p� mobil */
    .uv-legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        font-size: 0.75rem;
        margin-top: 12px;
    }

    .uv-legend-item {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .uv-forecast-widget {
        padding: 12px;
        margin: 12px 0;
    }

    .uv-mobile-info {
        gap: 8px;
    }

        .uv-mobile-info .uv-info-item {
            padding: 6px;
        }

    .uv-mobile-warning {
        padding: 10px;
    }

        .uv-mobile-warning p {
            font-size: 0.8rem;
        }
}

/* Beh�ll full funktionalitet p� desktop */
@media (min-width: 769px) {
    .uv-mobile {
        display: none;
    }

    .uv-chart-container {
        display: block;
    }
}