/**
 * Estils CSS per al panell de predicció meteorològica
 * Afegeix aquests estils al teu fitxer CSS principal
 */

/* ========================================
   SIDEBAR DE PREDICCIÓ
   ======================================== */
/*
#sidebar-forecast {
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#sidebar-forecast.glass-panel {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}*/


.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Botó de toggle (ull) */
#forecast-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #2563eb;
}

#forecast-toggle-btn:hover {
    background: rgba(37, 99, 235, 0.1);
}

/*
.eye-icon {
    width: 20px;
    height: 20px;
    display: block;
}
*/
/* Contingut del sidebar */
.sidebar-content {
    /*padding: 16px;*/
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}



#forecast-day-display {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    text-align: center;
}

.forecast-nav-btn-minimal {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forecast-nav-btn-minimal:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1f2937;
}

.forecast-nav-btn-minimal:active {
    transform: scale(0.95);
}

.forecast-nav-btn-minimal:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Contingut de la predicció */
.forecast-content {
    min-height: 200px;
    margin-bottom: 8px;
}

.forecast-info {
    animation: fadeIn 0.3s ease;
}

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

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

.forecast-details {
    font-size: 13px;
    line-height: 1.3;
    color: #374151;
    white-space: pre-line;
}

.forecast-details strong {
    color: #1f2937;
    font-weight: 600;
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
}

.forecast-details strong:first-child {
    margin-top: 0;
}

/* Configuració de localitzacions */
.forecast-locations-config {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-top-color: rgba(255, 255, 255, 0.1);
}

.edit-forecast-locations {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
}

.edit-forecast-locations:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.edit-forecast-locations svg {
    margin-right: 6px;
}

/* Botó de toggle de predicció */
#toggle-forecast_BAK {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
}

/*
#toggle-forecast:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

#toggle-forecast:active {
    transform: scale(0.95);
}*/

/* ========================================
   ESTATS DE CÀRREGA
   ======================================== */

.forecast-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 8px;
    padding-bottom: 0px;
    padding-left: 8px;
    padding-right: 8px;
    color: #6b7280;
}

.forecast-loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 4px;
}

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

.forecast-loading-text {
    font-size: 14px;
}

/* Error state */
.forecast-error {
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-size: 13px;
    line-height: 1.5;
}

.forecast-error-title {
    font-weight: 600;
    margin-bottom: 8px;
}

/* Empty state */
.forecast-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.forecast-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.forecast-empty-text {
    font-size: 14px;
    line-height: 1.5;
}

/* ========================================
   RESPONSIVE
   ======================================== */
/*
@media (max-width: 768px) {
    #sidebar-forecast {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }
    
    .sidebar-content {
        max-height: calc(100vh - 150px);
    }
    
    #toggle-forecast {
        top: 80px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}*/

/* ========================================
   SCROLL PERSONALITZAT
   ======================================== */

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ========================================
   TRANSICIONS I ANIMACIONS
   ======================================== */

.forecast-fade-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.forecast-fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.forecast-fade-exit {
    opacity: 1;
    transform: translateY(0);
}

.forecast-fade-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* ========================================
   TEMES FOSCOS (OPCIONAL)
   ======================================== */

@media (prefers-color-scheme: dark) {

    /*    #sidebar-forecast {
        background: rgba(31, 41, 55, 0.70);
        border-color: rgba(255, 255, 255, 0.1);
    }
*/
    .sidebar-title {
        color: #f9fafb;
    }

    .sidebar-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .forecast-nav-compact {
        background: rgba(0, 0, 0, 0.2);
    }

    #forecast-day-display {
        color: #f9fafb;
    }

    .forecast-details {
        color: #d1d5db;
    }

    .forecast-details strong {
        color: #f9fafb;
    }

    .edit-forecast-locations {
        background: rgba(0, 0, 0, 0.2);
        color: #d1d5db;
    }

    .edit-forecast-locations:hover {
        background: rgba(0, 0, 0, 0.3);
        color: #f9fafb;
    }

    /*    #toggle-forecast {
        background: #1f2937;
    }*/

}