/**
 * Weather Widget Styles
 */

.weather-drawer {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 300px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-slow);
    z-index: 1000;
}

.weather-toggle {
    width: 100%;
    padding: 15px 20px;
    border: none;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-base);
}

.weather-toggle:hover {
    background: var(--color-gray-200);
}

.toggle-arrow {
    margin-left: auto;
    transition: transform var(--transition-slow);
}

.weather-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.weather-drawer.open .weather-content {
    max-height: 300px;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}

.weather-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.weather-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin-bottom: 5px;
}

.weather-value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

.weather-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--color-border-lighter);
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--font-size-xs);
}

/* Gauge Component */
.gauge {
    position: relative;
    border-radius: 50% / 100% 100% 0 0;
    background-color: var(--color, #a22);
    overflow: hidden;
    margin: 0 auto;
}

.gauge:before {
    content: "";
    display: block;
    padding-top: 50%; /* ratio of 2:1 */
}

.gauge .chart {
    overflow: hidden;
}

.gauge .mask {
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 0;
    top: 40%;
    background-color: var(--color-bg);
    border-radius: 50% / 100% 100% 0 0;
}

.gauge .percentage {
    position: absolute;
    top: -1px;
    left: -1px;
    bottom: 0;
    right: -1px;
    background-color: var(--background, #aaa);
    transform: rotate(var(--rotation));
    transform-origin: bottom center;
    transition-duration: 600ms;
}

.gauge:hover {
    --rotation: 100deg;
}

.gauge .value {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
}

.gauge .min {
    position: absolute;
    bottom: 0;
    left: 5%;
}

.gauge .max {
    position: absolute;
    bottom: 0;
    right: 5%;
}

/* Responsive */
@media (max-width: 768px) {
    .weather-drawer {
        right: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
        max-width: 300px;
    }
}
