/* Estilos principales para el sistema de rifas */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gold-color: #ffd700;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --border-color: #dee2e6;
}

/* Tema oscuro (por defecto) */
body {
    --primary-color: #3a86ff;
    --secondary-color: #8d99ae;
    --success-color: #38b000;
    --warning-color: #ffb703;
    --danger-color: #e63946;
    --light-color: #dee2e6;
    --dark-color: #212529;
    --gold-color: #ffd700;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --background-primary: #121212;
    --background-secondary: #1e1e1e;
    --border-color: #495057;
}

/* Tema claro */
body.light-theme {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gold-color: #ffd700;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --border-color: #dee2e6;
}

/* Estilos para los boletos especiales */
.special-tickets-container {
    margin: 10px 0;
}

.ticket-base {
    position: relative;
    font-family: 'Arial', sans-serif;
    text-align: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    min-width: 50px;
    font-weight: bold;
}

/* Ticket especial azul - para números especiales */
.ticket-diamond {
    background: linear-gradient(135deg, #0077be 0%, #1e90ff 50%, #0077be 100%);
    color: white;
    border: 1px solid #005c91;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ticket-diamond::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(90deg, #0077be, #0077be 10px, #1e90ff 10px, #1e90ff 20px);
}

.ticket-diamond::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: repeating-linear-gradient(90deg, #0077be, #0077be 10px, #1e90ff 10px, #1e90ff 20px);
}

/* Efecto de brillo para tickets diamante */
.ticket-diamond-glow {
    animation: ticket-blue-glow 1.5s ease-in-out infinite alternate;
}

@keyframes ticket-blue-glow {
    0% { box-shadow: 0 0 5px #1e90ff, 0 0 10px #1e90ff; }
    100% { box-shadow: 0 0 15px #1e90ff, 0 0 25px #4169e1, 0 0 35px #0000ff; }
}


/* Estilos para el marco de difuminado */
.raffle-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Usar vh para altura completa de la ventana */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    z-index: -1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Soporte para Safari */
    background-color: rgba(0, 0, 0, 0.3); /* Fondo oscuro semi-transparente por defecto */
    pointer-events: none;
}

/* Variante para tema claro */
.light-theme .raffle-frame {
    background-color: rgba(255, 255, 255, 0.3); /* Fondo claro semi-transparente */
    background: linear-gradient(135deg, rgba(240, 240, 240, 0.1), rgba(200, 200, 200, 0.1));
}

/* Contenedor principal para el contenido de la rifa */
.raffle-content {
    text-align: center;
    width: 100%;
    max-width: 1200px; /* Limitar ancho máximo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    margin: 0 auto; /* Centrar horizontalmente */
    position: relative;
    z-index: 1; /* Asegurar que esté por encima del fondo */
}

/* Título principal con estilo dorado */
.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    width: 100%;
    text-align: center;
    transition: color var(--transition-speed) ease;
    white-space: normal; /* Permitir saltos de línea */
    border-right: none; /* Quitar borde que podría afectar el diseño */
    margin-bottom: 0;
}

.h1 .hero-title{
    margin-bottom: 0;
}

/* Subtítulo con color dorado más claro */
.hero-subtitle {
    font-family: 'Raleway', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #D4AF37; /* Color dorado específico */
    width: 100%;
    text-align: center;
    transition: color var(--transition-speed) ease;
    white-space: normal; /* Permitir saltos de línea */
    border-right: none; /* Quitar borde que podría afectar el diseño */
    margin-bottom: 0;
}

.p .hero-subtitle{
    margin-bottom: 0;
}

/* Estilos para tema claro */
.light-theme .hero-title {
    color: #B8860B; /* Dorado más oscuro para tema claro */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.light-theme .hero-subtitle {
    color: #DAA520; /* Dorado goldenrod para tema claro */
}

/* Clase para ocultar inicialmente los elementos que se animarán */
.first-hidden {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media queries para responsividad */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .raffle-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
}

/* Script para manejar la altura en dispositivos móviles */
/* Agregando estilos para el contenedor principal y las secciones */
.background-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden; /* Evitar desbordamiento */
}

.main-container-inicio {
    width: 100%;
    height: auto;
    position: relative;
    overflow: visible; /* Eliminar el scroll adicional */
}

#bienvenida.ih-seccion {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 5vh; /* Espacio superior */
}

/* Ajuste de la animación de fondo */
.bg-an {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
}

/* Clase para manejar la animación de entrada de los elementos */
.bienvenida-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Alinear al inicio */
    width: 100%;
    position: relative;
}

/* Estilo para el contenedor de la rifa detallada */
.include-rifa-content {
    width: 100%;
    max-width: 1200px;
    margin-top: 2rem;
}

/* Ajuste para eliminar el segundo scroll */
.active-section {
    display: block;
    height: auto;
    overflow: visible;
}

/* Contenedor principal de rifas */
#rifa-detailed-container {
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-primary);
}

.rifa-detailed-content {
    background-color: var(--background-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

/* Encabezado */
.rifa-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.rifa-header h1 {
    font-family: 'Playfair Display', serif;
    color: var(--gold-color);
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 2rem;
}

.light-theme .rifa-header h1{
    color: #B8860B;
}

/* Navegación entre rifas */
.rifa-navigation-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    background-color: var(--background-secondary);
    border-radius: var(--border-radius);
    padding: 0.5rem;
}

.rifa-nav-btn {
    background-color: transparent;
    border: none;
    color: var(--gold-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: transform var(--transition-speed) ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.light-theme .rifa-nav-btn{
    color: #B8860B;
}

.rifa-nav-btn:hover {
    transform: scale(1.2);
    background-color: rgba(217, 147, 6, 0.1);
}

.rifa-position-indicator {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Badge de estado */
.badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 50rem;
    display: inline-block;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

.bg-success {
    background-color: var(--success-color);
    color: white;
}

.bg-info {
    background-color: #17a2b8;
    color: white;
}

.bg-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.bg-secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* Galería de imágenes */
.rifa-gallery {
    padding: 1.5rem;
}

.main-image-container {
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.main-image-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* Proporción 4:3 */
    position: relative;
    overflow: hidden;
    background-color: var(--background-secondary);
    border-radius: var(--border-radius);
}

.main-viewer-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-speed) ease;
    cursor: pointer;
}

.main-viewer-image:hover {
    transform: scale(1.02);
}

/* Contenedor de miniaturas */
.thumbnails-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-color) transparent;
    -webkit-overflow-scrolling: touch; /* Para scroll suave en iOS */
}

/* Estilo de la scrollbar para navegadores WebKit */
.thumbnails-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-container::-webkit-scrollbar-track {
    background: transparent;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background-color: var(--gold-color);
    border-radius: 6px;
}

.gallery-thumbnail {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-speed) ease;
    opacity: 0.7;
    position: relative;
}

.gallery-thumbnail.active {
    border-color: var(--gold-color);
    opacity: 1;
}

.gallery-thumbnail:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Asegurar que las imágenes en ratio 1x1 mantengan su proporción */
.ratio.ratio-1x1 {
    position: relative;
}

.ratio.ratio-1x1::before {
    display: block;
    padding-top: 100%;
    content: "";
}

.ratio > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Visor de imagen */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
}

.image-viewer.active {
    opacity: 1;
    visibility: visible;
}

.close-viewer {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 30;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

#viewer-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.viewer-zoom-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Detalles de rifa */
.rifa-details {
    height: 100%;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--background-primary);
    box-shadow: var(--card-shadow);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--gold-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: 'Raleway', sans-serif;
}

.light-theme .card-title{
    color: #B8860B;
}

.detail-item {
    margin-bottom: 1.5rem;
}

.detail-item h4 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Barra de progreso - Contenedor principal */
.progress {
    height: 20px;
    border-radius: calc(var(--border-radius, 4px) / 2);
    background-color: var(--background-secondary, #f8f9fa);
    overflow: hidden;
}

/* Estilos base de la barra de progreso */
.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    text-align: center;
    transition: width 0.6s ease;
}

/* Colores según el porcentaje */
.progress-bar.low {
    background-color: var(--danger-color, #dc3545);
}

.progress-bar.medium {
    background-color: var(--warning-color, #ffc107);
}

.progress-bar.high {
    background-color: var(--success-color, #28a745);
}

/* Añadimos las rayas con un gradiente */
.progress-bar-striped {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
}

/* Animación del "tornillo sin fin" */
.progress-bar-animated {
    animation: progress-bar-stripes 0.5s linear infinite;
}

/* Animación para mover las rayas */
@keyframes progress-bar-stripes {
    from {
        background-position: 1rem 0;
    }
    to {
        background-position: 0 0;
    }
}

/* Clase para usar con JavaScript si deseas activar/desactivar la animación */
.animate-progress {
    animation: progress-bar-stripes 1s linear infinite;
}

/* Variaciones de velocidad */
.progress-bar-animated.slow {
    animation-duration: 2s;
}

.progress-bar-animated.fast {
    animation-duration: 0.5s;
}

/* Selector de boletos */
.boletos-opciones {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.btn-cantidad {
    position: relative;
    border: 2px solid var(--border-color);
    background-color: var(--background-secondary);
    border-radius: var(--border-radius);
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    flex: 1;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.btn-cantidad:hover {
    transform: translateY(-3px);
    border-color: var(--gold-color);
}

.btn-cantidad.selected {
    border-color: var(--gold-color);
    background-color: rgba(207, 252, 0, 0.1);
}

.fan-tickets {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
}

.ticket-fan {
    position: absolute;
    top: 0;
    left: 50%;
    transform-origin: center bottom;
    width: 20px;
    height: 35px;
    background-color: var(--gold-color);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ticket-gold-fan {
    background: linear-gradient(to bottom, #ffd700, #ffa500);
    border: 1px solid rgba(255, 215, 0, 0.5);
}

.btn-text {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Estilos para mejorar el input type number */


/* CSS para los controles personalizados del input numérico */
.input-group {
    display: flex;
    position: relative;
    align-items: stretch;
    width: 100%;
    max-width: 300px;
}

/* Estilo base para el input numérico */
.input-group input[type="number"] {
    border: 2px solid var(--gold-color, #ffc107);
    border-right: none;
    padding: 0.5rem 1rem;
    padding-left: 0;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-primary, #333);
    background-color: var(--background-primary, #fff);
    border-radius: var(--border-radius, 4px) 0 0 var(--border-radius, 4px);
    width: 80px;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Ocultar las flechas por defecto en todos los navegadores */
.input-group input[type="number"]::-webkit-outer-spin-button,
.input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.input-group input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Estilo para el texto del grupo */
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    text-align: center;
    white-space: nowrap;
    background-color: var(--gold-color, #ffc107);
    border: 2px solid var(--gold-color, #ffc107);
    border-left: none;
    border-radius: 0 var(--border-radius, 4px) var(--border-radius, 4px) 0;
}

/* Contenedor de los botones personalizados */
.input-spinner-buttons {
    position: absolute;
    right: 98px; /* Ajusta según el ancho del texto "Llaveros" */
    top: 0;
    bottom: 0;
    width: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 5;
}

/* Botones de incremento/decremento */
.spinner-button {
    width: 20px;
    height: 100%;
    background-color: var(--gold-color, #ffc107);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    padding: 0;
}

.spinner-button:hover {
    background-color: #d4af37; /* Un tono más claro de dorado */
}

/* Triángulos para las flechas */
.spinner-button.up::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #333; /* Triángulo hacia arriba */
}

.spinner-button.down::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333; /* Triángulo hacia abajo */
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    appearance: none;
    transition: border-color var(--transition-speed) ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

/* Precio y total */
.text-primary {
    color: var(--gold-color) !important;
}

.light-theme .text-primary {
    color: #B8860B !important;
}

.text-success {
    color: var(--success-color) !important;
}

.fs-4 {
    font-size: 1.5rem !important;
}

.fw-bold {
    font-weight: 700 !important;
}

/* Botón comprar */
.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
}

.w-100 {
    width: 100% !important;
}

/* Alertas */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alerta-precio {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--danger-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    z-index: 30;
    max-width: 90%;
    text-align: center;
    animation: fadeInUp 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
    opacity: 0;
    transform: translate(-50%, 20px);
    }
    to {
    opacity: 1;
    transform: translate(-50%, 0);
    }
}

/* Modal de datos de usuario */
.compra-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 35;
    overflow-y: auto;
}

.compra-modal-content {
    background-color: var(--background-primary);
    margin: 2rem auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
    opacity: 0;
    transform: translateY(-50px);
    }
    to {
    opacity: 1;
    transform: translateY(0);
    }
}

.compra-modal-header {
    background-color: var(--gold-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.compra-modal-header h2 {
    margin: 0;
    margin-right: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

.compra-modal-close-second {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    color: white;
    z-index: 35;
}

.compra-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    text-align: right;
}

/* Formulario */
.form-datos-usuario {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-wrap: wrap;
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background-primary);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-speed) ease-in-out;
}

.form-input:focus {
    color: var(--text-primary);
    background-color: var(--background-primary);
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-error {
    border-color: var(--danger-color);
}

.error-mensaje {
    display: none;
    font-size: 0.875rem;
    color: var(--danger-color);
    margin-top: 0.25rem;
}

.text-danger {
    color: var(--danger-color);
}

/* Ocultamos el checkbox original pero mantenemos su funcionalidad */
.form-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Contenedor para el checkbox personalizado */
.custom-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 1rem;
}

/* Estilo del checkbox personalizado */
.custom-checkbox-mark {
    position: relative;
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    background-color: var(--background-primary, #fff);
    border: 2px solid var(--border-color, #ced4da);
    border-radius: var(--border-radius, 4px);
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

/* Hover state */
.custom-checkbox:hover .form-checkbox-input ~ .custom-checkbox-mark {
    border-color: var(--primary-color, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

/* Checked state */
.form-checkbox-input:checked ~ .custom-checkbox-mark {
    background-color: var(--primary-color, #0d6efd);
    border-color: var(--primary-color, #0d6efd);
}

/* Check mark (hidden by default) */
.custom-checkbox-mark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Show the check mark when checked */
.form-checkbox-input:checked ~ .custom-checkbox-mark:after {
    display: block;
}

/* Focus state for accessibility */
.form-checkbox-input:focus ~ .custom-checkbox-mark {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Disabled state */
.form-checkbox-input:disabled ~ .custom-checkbox-mark {
    background-color: var(--background-secondary, #f8f9fa);
    border-color: var(--border-color, #ced4da);
    opacity: 0.5;
    cursor: not-allowed;
}

.form-checkbox-input:disabled ~ .custom-checkbox-text {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Variante de color - éxito (verde) */
.form-checkbox-input.success:checked ~ .custom-checkbox-mark {
    background-color: var(--success-color, #28a745);
    border-color: var(--success-color, #28a745);
}

.form-checkbox-input.success:focus ~ .custom-checkbox-mark {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

/* Variante de color - advertencia (amarillo) */
.form-checkbox-input.warning:checked ~ .custom-checkbox-mark {
    background-color: var(--warning-color, #ffc107);
    border-color: var(--warning-color, #ffc107);
}

.form-checkbox-input.warning:focus ~ .custom-checkbox-mark {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.25);
}

/* Variante de color - peligro (rojo) */
.form-checkbox-input.danger:checked ~ .custom-checkbox-mark {
    background-color: var(--danger-color, #dc3545);
    border-color: var(--danger-color, #dc3545);
}

.form-checkbox-input.danger:focus ~ .custom-checkbox-mark {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

/* Variante de color - dorado (para mantener consistencia con tu tema) */
.form-checkbox-input.gold:checked ~ .custom-checkbox-mark {
    background-color: var(--gold-color, #ffc107);
    border-color: var(--gold-color, #ffc107);
}

.form-checkbox-input.gold:focus ~ .custom-checkbox-mark {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.25);
}

.btn-pagar {
    background-color: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-pagar:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-pagar:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Mensajes de carga y error */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.error-display {
    text-align: center;
    padding: 2rem;
    color: var(--danger-color);
    font-weight: 600;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: var(--border-radius);
}

.info-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-weight: 600;
    background-color: var(--background-secondary);
    border-radius: var(--border-radius);
}

/* Utilidad para resaltar email */
.email-suggestions {
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    width: 100%;
    z-index: 36;
    box-shadow: var(--card-shadow);
}

.email-suggestion-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.email-suggestion-item:hover {
    background-color: var(--background-secondary);
}

/* Clases utilitarias */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

.text-center {
    text-align: center !important;
}

.text-end {
    text-align: right !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.g-2 {
    gap: 0.5rem !important;
}

/* Media queries para responsividad */
@media (max-width: 991.98px) {
    .rifa-gallery, .rifa-details {
    margin-bottom: 1.5rem;
    }
    
    .rifa-details {
    height: auto;
    }
}

@media (max-width: 767.98px) {
    .rifa-header h1 {
    font-size: 1.75rem;
    }
    
    .boletos-opciones {
    justify-content: center;
    }
    
    .btn-cantidad {
    min-width: 75px;
    }
    
    .compra-modal-content {
    width: 95%;
    margin: 1rem auto;
    }
}

@media (max-width: 575.98px) {
    .rifa-header h1 {
    font-size: 1.5rem;
    }
    
    .card-title {
    font-size: 1.25rem;
    }
    
    .fan-tickets {
    width: 50px;
    height: 50px;
    }
    
    .btn-cantidad {
    min-width: 70px;
    padding: 0.5rem 0.25rem;
    }
    
    .btn-text {
    font-size: 0.75rem;
    }
    
    .compra-modal-header h2 {
    font-size: 1.25rem;
    }
    
    .form-label, .form-input {
    font-size: 0.9rem;
    }
}

/* Cuando el modal está abierto */
body.modal-open {
    overflow: hidden;
}