/* Zonkracht widget — gescoped onder .cms-zonkracht */

.cms-zonkracht .container {
    margin: 0 auto;
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
}

.cms-zonkracht .day-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    width: 100%;
}

.cms-zonkracht .day {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #ddd;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.cms-zonkracht .day.active {
    background: #fa259a;
    color: white;
}

.cms-zonkracht .day-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    width: 0%;
    transition: width linear;
    border-radius: 999px;
    pointer-events: none;
}

.cms-zonkracht .day.active .day-progress {
    background: rgba(255, 255, 255, 0.3);
}

.cms-zonkracht .chart-container {
    position: relative;
    width: 100%;
    aspect-ratio: 13/10;
    background: white;
    max-width: 1000px;
    margin: 0 auto;
}

@keyframes zk-rise {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes zk-grow {
    0%   { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

.cms-zonkracht .hour-circle {
    opacity: 0;
    background: #fa259a;
    color: white;
    border-radius: 50%;
    width: 90%;
    padding-top: 90%;
    position: relative;
    margin: 0 auto;
}

.cms-zonkracht .hour-text {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.cms-zonkracht .uv-bar {
    position: absolute;
    bottom: 0;
    border-radius: 999px 999px 0 0;
    cursor: help;
    transform: scaleY(0);
    transform-origin: bottom;
    animation: zk-grow 0.5s ease forwards;
    z-index: 2;
    border: 2px solid white;
    box-sizing: border-box;
}

.cms-zonkracht .uv-bar-clearsky {
    position: absolute;
    bottom: 0;
    border-radius: 999px 999px 0 0;
    cursor: help;
    transform: scaleY(0);
    transform-origin: bottom;
    animation: zk-grow 0.5s ease forwards;
    z-index: 1;
    background-color: #d8d8d8 !important;
    opacity: 0.8;
    border: 2px solid white;
    box-sizing: border-box;
}

.cms-zonkracht .uv-line {
    position: absolute;
    cursor: help;
    border-radius: 2px;
}

.cms-zonkracht .grid-line {
    pointer-events: none;
    z-index: 0;
}

.cms-zonkracht .grid-line-label {
    background-color: white;
    font-size: 12px;
    color: #999;
    z-index: 0;
}

.cms-zonkracht .uv-values-row {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 5px 0;
    margin-bottom: 5px;
}

.cms-zonkracht .uv-circle-container {
    padding: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cms-zonkracht .uv-value-circle {
    width: 90%;
    padding-top: 90%;
    position: relative;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: white;
    margin: 0 auto;
}

.cms-zonkracht .uv-value-text {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #aaa;
}

.cms-zonkracht .hour-circle-container {
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 600px) {
    .cms-zonkracht .hour-text,
    .cms-zonkracht .uv-value-text { font-size: 16px; }
    .cms-zonkracht .hour-circle,
    .cms-zonkracht .uv-value-circle { width: 90%; padding-top: 90%; }
    .cms-zonkracht .uv-circle-container,
    .cms-zonkracht .hour-circle-container { padding: 1px; }
}

.cms-zonkracht .location-display {
    text-align: center;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.cms-zonkracht .location-display::before {
    content: "\1F4CC ";
}

.cms-zonkracht .legend-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px 30px;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.cms-zonkracht .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cms-zonkracht .legend-circles {
    display: flex;
    gap: 2px;
}

.cms-zonkracht .legend-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.cms-zonkracht .legend-circle.green  { background-color: #9dbd1b; }
.cms-zonkracht .legend-circle.yellow { background-color: #ffbd17; }
.cms-zonkracht .legend-circle.orange { background-color: #f58520; }
.cms-zonkracht .legend-circle.red    { background-color: #e2423a; }
.cms-zonkracht .legend-circle.grey   { background-color: #d8d8d8; }

.cms-zonkracht .status-container {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

.cms-zonkracht .refresh-status { opacity: 0.8; }

.cms-zonkracht .refresh-status.refreshing {
    color: #fa259a;
    font-weight: bold;
}

.cms-zonkracht .chart-container.fading {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}
