/* Custom styles for LGBTQI+ Community Survey */

/* Root variables for consistent theming */
:root {
    --pride-red: #ff6b9d;
    --pride-orange: #ff8e53;
    --pride-yellow: #ffd93d;
    --pride-green: #6bcf7f;
    --pride-blue: #4d96ff;
    --pride-purple: #9775fa;
    --warm-pink: #ff6b9d;
    --sunny-orange: #ff8e53;
    --happy-yellow: #ffd93d;
    --fresh-green: #51cf66;
    --sky-blue: #74c0fc;
    --soft-purple: #b197fc;
}

/* Body and layout */
body {
    line-height: 1.6;
    background: linear-gradient(135deg, #fff5f5 0%, #f0f9ff 50%, #faf5ff 100%);
    min-height: 100vh;
    color: #2d3748 !important;
}

/* Text color overrides for dark theme compatibility */
h1, h2, h3, h4, h5, h6 {
    color: #2d3748 !important;
}

p, label, .form-label {
    color: #4a5568 !important;
}
span {
    color: #ffffff !important;

}

.lead {
    color: #4a5568 !important;
}

.card-title {
    color: #2d3748 !important;
}

.card-text {
    color: #4a5568 !important;
}

/* Custom navbar styling */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: white !important;
}

.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

/* Pride gradient background for special sections */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--pride-red), var(--pride-orange), var(--pride-yellow), var(--pride-green), var(--pride-blue), var(--pride-purple));
}

/* Card hover effects */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* Form styling enhancements */
.form-check-input:checked {
    background-color: var(--warm-pink);
    border-color: var(--warm-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
}

.form-select:focus,
.form-control:focus {
    border-color: var(--warm-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 157, 0.25);
}

.form-select,
.form-control {
    border-radius: 0.75rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748 !important;
}

.form-check-label {
    color: #2d3748 !important;
}

/* Button enhancements */
.btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
    border-radius: 2rem;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warm-pink), var(--sunny-orange));
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    height: 100px;
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--sunny-orange), var(--happy-yellow));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
    color: white;
}

.btn-outline-info {
    border: 2px solid var(--sky-blue);
    color: var(--sky-blue);
    border-radius: 2rem;
}

.btn-outline-info:hover {
    background: var(--sky-blue);
    transform: translateY(-2px);
}

/* Chart container styling */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Loading spinner customization */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alert customizations */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Statistics cards */
.card-body i {
    opacity: 0.8;
}

/* Rainbow text effect for special elements */
.rainbow-text {
    background: linear-gradient(to right, var(--pride-red), var(--pride-orange), var(--pride-yellow), var(--pride-green), var(--pride-blue), var(--pride-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 1.8rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .h2 {
        font-size: 1.4rem;
    }
    
    .card-body {
        padding: 1rem 0.75rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.25rem;
        font-size: 1.1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Survey form mobile optimizations */
    .form-check-label {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .form-select {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    .row.g-2 {
        --bs-gutter-x: 0.5rem;
    }
    
    .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    /* Better touch targets */
    .form-check-input {
        width: 1.25em;
        height: 1.25em;
        margin-top: 0.125em;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* SVG styling */
svg {
    max-width: 100%;
    height: auto;
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus indicators for better accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: 2px solid var(--bs-warning);
    outline-offset: 2px;
}

/* Card header styling */
.card-header {
    border-bottom: 2px solid rgba(255, 193, 7, 0.2);
    font-weight: 600;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom margins and padding utilities */
.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.my-6 {
    margin-top: 4rem !important;
    margin-bottom: 4rem !important;
}

/* Mobile survey optimization */
.survey-mobile-friendly .form-check {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.08), rgba(255, 142, 83, 0.08));
    border: 2px solid rgba(255, 107, 157, 0.15);
    transition: all 0.3s ease;
}

.survey-mobile-friendly .form-check:hover {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15), rgba(255, 142, 83, 0.15));
    border-color: var(--warm-pink);
    transform: translateY(-2px);
}

.survey-mobile-friendly .form-check-input:checked + .form-check-label {
    font-weight: 600;
    color: var(--warm-pink);
}

.survey-mobile-friendly .form-check-input:checked {
    transform: scale(1.1);
}

/* Fun emoji decorations */
.survey-section-emoji {
    font-size: 2rem;
    margin-right: 0.5rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Chart.js responsive overrides */
.chart-container canvas {
    max-height: 400px;
}

/* Progress indicators for multi-step forms */
.progress-step {
    position: relative;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.progress-step.active {
    background: rgba(255, 193, 7, 0.2);
    border-left: 4px solid var(--bs-warning);
}

/* Tooltips for charts */
.chart-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Dark mode adjustments */
/* Override Bootstrap dark theme */
[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #fff5f5 0%, #f0f9ff 50%, #faf5ff 100%) !important;
    color: #2d3748 !important;
}

[data-bs-theme="dark"] .card {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #2d3748 !important;
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] h1, 
[data-bs-theme="dark"] h2, 
[data-bs-theme="dark"] h3, 
[data-bs-theme="dark"] h4, 
[data-bs-theme="dark"] h5, 
[data-bs-theme="dark"] h6 {
    color: #2d3748 !important;
}

[data-bs-theme="dark"] p,
[data-bs-theme="dark"] span,
[data-bs-theme="dark"] .lead,
[data-bs-theme="dark"] .card-text,
[data-bs-theme="dark"] .form-label {
    color: #4a5568 !important;
}

[data-bs-theme="dark"] .bg-gradient-primary {
    opacity: 0.9;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .container {
        max-width: none !important;
    }
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Filter form styles */
#filterForm .form-select {
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
}

/* Añade esto a tu archivo CSS */
.filter-options {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    padding: 10px;
    border-radius: 5px;
}

.form-check {
    margin-bottom: 5px;
}

.form-check-input {
    margin-right: 8px;
}

.filter-active {
    background-color: #e9f7fe;
    font-weight: bold;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .accordion-body {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .form-check {
        padding-left: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .form-check-input {
        width: 1.1em;
        height: 1.1em;
        margin-top: 0.15em;
    }
    
    .form-check-label {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Show active filter count on accordion headers */
.accordion-button::after {
    margin-left: auto;
    content: attr(data-count);
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-right: 10px;
}

.form-check-label {
    display: block;
    cursor: pointer;
    padding: 10px;
}
.form-check-input {
    cursor: pointer;
}