/* GeoPR Dashboard - Custom Styles v1.2 */

/* Dropdown styling for Dash components - Improved for functionality */
.topbar .Select-control {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 10px !important;
    min-height: 42px !important;
    color: white !important;
}

.topbar .Select-placeholder,
.topbar .Select-value-label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 15px !important;
}

.topbar .Select-arrow {
    border-color: rgba(255, 255, 255, 0.7) transparent transparent !important;
}

.topbar .Select-input > input {
    color: white !important;
}

.Select-menu-outer {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.15) !important;
    background: white !important;
    margin-top: 4px !important;
}

.Select-option {
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: #1f2937 !important;
}

.Select-option:hover {
    background: rgba(60, 111, 143, 0.08) !important;
    cursor: pointer !important;
}

.Select-option.is-selected {
    background: rgba(60, 111, 143, 0.12) !important;
    color: #2f5f7d !important;
    font-weight: 600 !important;
}

.Select-option.is-focused {
    background: rgba(60, 111, 143, 0.05) !important;
}

/* Tabs styling */
.tab {
    color: #3b4b5a !important;
    border: none !important;
    text-align: center !important;
}

.tab--selected {
    background: linear-gradient(180deg, #3c6f8f, #2f5f7d) !important;
    color: white !important;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.12) !important;
    text-align: center !important;
}

/* Tab label centering */
._dash-undo-redo, .tab > div {
    text-align: center !important;
    width: 100% !important;
}

/* Graph container improvements */
.js-plotly-plot {
    border-radius: 18px !important;
}

/* Loading spinner */
._dash-loading {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 18px !important;
}

._dash-loading-callback {
    color: #3c6f8f !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

/* DataTable styling */
.dash-table-container {
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08) !important;
}

.dash-spreadsheet {
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.dash-spreadsheet-container .dash-spreadsheet-inner th {
    background: linear-gradient(180deg, #4e6376, #3f5466) !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 16px !important;
    font-size: 15px !important;
}

.dash-spreadsheet-container .dash-spreadsheet-inner td {
    padding: 14px !important;
    font-size: 14px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.dash-spreadsheet-container .dash-spreadsheet-inner tr:hover {
    background: rgba(60, 111, 143, 0.04) !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(78, 99, 118, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 99, 118, 0.5);
}

/* Button hover effects */
button:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease !important;
}

button:active {
    transform: translateY(0);
}

/* Download button specific styles */
#btn-download:hover {
    background-color: rgba(60, 111, 143, 0.08) !important;
    border-color: #2f5f7d !important;
    color: #2f5f7d !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 111, 143, 0.15) !important;
}

/* Radio button dot animation */
.radio-btn:hover {
    opacity: 1 !important;
}

/* Logo DDEC - mantener colores originales */
.brand img {
    object-fit: contain;
}

/* Dropdown containers in topbar */
.controls > div {
    display: flex;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 980px) {
    .topbar {
        flex-direction: column;
        gap: 16px !important;
        padding: 20px !important;
    }
    
    .controls {
        flex-direction: column;
        width: 100%;
        gap: 14px !important;
        align-items: stretch !important;
    }
    
    .controls > div {
        width: 100%;
        margin-right: 0 !important;
    }
    
    .controls .Select {
        width: 100% !important;
    }
    
    .toggle {
        flex-direction: row;
        justify-content: center;
        gap: 10px !important;
    }
    
    .tabs {
        flex-wrap: wrap;
        gap: 12px !important;
    }
    
    .tab {
        font-size: 18px !important;
        padding: 10px 16px !important;
    }
    
    .card-header .title {
        font-size: 24px !important;
    }
    
    .card-header .subtitle {
        font-size: 18px !important;
    }
}

/* Print styles */
@media print {
    .topbar, .tabs, button {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Accessibility improvements */
*:focus {
    outline: 2px solid rgba(60, 111, 143, 0.5) !important;
    outline-offset: 2px !important;
}

button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8) !important;
}

/* Animation for card appearance */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.4s ease-out;
}

/* Placeholder for empty states */
.placeholder-text {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

