/* =========================
   MENSAJES Y ESTADOS
========================= */

.reac-ok {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1.8;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    animation: reac-slideIn 0.5s ease-out;
}

.reac-err {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 25px 30px;
    margin: 30px 0;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1.8;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    animation: reac-slideIn 0.5s ease-out;
}

@keyframes reac-slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

button[disabled]{ 
    opacity:.6; 
    cursor:not-allowed; 
}


/* =========================
   MAPA GENERAL DEL PREDIO
========================= */

.reac-mapa-predio {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Wrapper imagen + SVG */
.reac-mapa-wrapper {
    position: relative;
    width: 100%;
}

/* Imagen de fondo */
.reac-mapa-fondo {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* SVG encima */
.reac-mapa-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.reac-mapa-svg svg {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: all;
}


/* =========================
   ZONAS (MAPA GENERAL)
========================= */

/* Zonas invisibles por defecto */
.reac-mapa-svg [id^="zona-"] {
    fill: transparent;
    opacity: 0;
    transition: opacity 0.2s ease, fill 0.2s ease;
    cursor: pointer;
}

/* Hover de zona */
.reac-mapa-svg [id^="zona-"]:hover {
    fill: rgba(220, 53, 69, 0.5);
    opacity: 1;
}


/* =========================
   LISTADO DE ZONAS (TEXTO)
========================= */

.reac-zonas-titulo {
    margin: 35px 0 15px;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    color: #2c3e50;
}

.reac-zonas-listado {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 420px;
    display: grid;
    gap: 12px;
}

.reac-zonas-listado li a {
    display: block;
    padding: 14px 18px;
    border-radius: 10px;
    background: #f3f5f7;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.reac-zonas-listado li a:hover {
    background: #2c3e50;
    color: #fff;
    transform: translateY(-2px);
}




/* =========================
   ZONA - GRILLA DE PUESTOS
========================= */

.reac-zona-detalle {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

/* Información de precios */
.reac-precio-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.reac-precio-info h4 {
    margin: 0 0 15px 0;
    color: #1976d2;
    font-size: 1.1rem;
}

.reac-precio-info p {
    margin: 8px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.reac-precio-info ul {
    margin: 10px 0 10px 20px;
    padding: 0;
    list-style: disc;
}

.reac-precio-info ul li {
    margin: 8px 0;
    color: #2c3e50;
}

.reac-precio-nota {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.reac-zona-instruccion {
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.reac-leyenda {
    text-align: center;
    margin-bottom: 25px;
}

.reac-leyenda .leyenda {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 6px;
}

.leyenda.disponible { background: #28a745; }
.leyenda.ocupado { background: #b52533; }

/* Título sobre la grilla de puestos */
.reac-zona-titulo-grid {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 25px 0 10px 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.1);
    letter-spacing: 0.3px;
}

/* CONTENEDOR DE PUESTOS - MEJORADO CON RECUADRO */
.reac-puestos-grid {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    padding: 30px;
    max-width: fit-content;

    /* Recuadro contenedor elegante */
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;

    /* Efecto de borde interno sutil */
    outline: 1px solid rgba(255, 255, 255, 0.6);
    outline-offset: -10px;

    /* Transición suave para efectos */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Efecto cuando hay puesto seleccionado */
.reac-puestos-grid:has(.reac-puesto.seleccionado) {
    border-color: rgba(0, 123, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.12),
                0 1px 3px rgba(0, 123, 255, 0.08);
}

/* =========================
   ORIENTACIONES - MEJORADO
========================= */

/* VERTICAL - Centrado */
.reac-zona-detalle.vertical .reac-puestos-grid {
    flex-direction: column;
    align-items: center; /* CENTRADO VERTICAL */
}

/* HORIZONTAL - Centrado */
.reac-zona-detalle.horizontal .reac-puestos-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center; /* CENTRADO HORIZONTAL */
}


/* =========================
   PUESTO - MEJORADO
========================= */

.reac-puesto {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    cursor: default;
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Horizontal: código debajo */
.reac-zona-detalle.horizontal .reac-puesto {
    flex-direction: column;
    gap: 8px;
    min-width: 70px;
}

/* Vertical: código al lado */
.reac-zona-detalle.vertical .reac-puesto {
    flex-direction: row;
    min-width: 120px;
}

/* Cuadro - MEJORADO */
.reac-cuadro {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.9);
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 2px solid transparent;
}

/* Código del puesto - MEJORADO */
.reac-puesto span {
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 600;
    transition: color 0.3s ease;
}

/* Estados - MEJORADO */
.reac-puesto.disponible .reac-cuadro {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    cursor: pointer;
    border-color: #28a745;
}

.reac-puesto.ocupado .reac-cuadro {
    background: linear-gradient(135deg, #b52533 0%, #8b1e29 100%);
    border-color: #b52533;
    opacity: 0.85;
}

.reac-puesto.ocupado {
    opacity: 0.75;
}

/* Hover solo en disponibles - MEJORADO */
.reac-puesto.disponible:hover {
    background: rgba(40, 167, 69, 0.08);
    transform: translateY(-2px);
}

.reac-puesto.disponible:hover .reac-cuadro {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.35);
    border-color: #1e7e34;
}

.reac-puesto.disponible:hover span {
    color: #28a745;
}

/* Estado de carga/bloqueando */
.reac-puesto.bloqueando {
    opacity: 0.5;
    pointer-events: none;
}

.reac-puesto.bloqueando .reac-cuadro {
    animation: reac-pulse 1.5s ease-in-out infinite;
}

/* SELECCIÓN DE PUESTO - MEJORADO */
.reac-puesto.seleccionado {
    background: rgba(0, 123, 255, 0.1);
}

.reac-puesto.seleccionado .reac-cuadro {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2),
                0 8px 20px rgba(0, 123, 255, 0.3);
    animation: reac-selected-pulse 2s ease-in-out infinite;
}

.reac-puesto.seleccionado span {
    color: #007bff;
    font-weight: 700;
}

/* Animación de pulso para seleccionado */
@keyframes reac-selected-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2),
                    0 8px 20px rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(0, 123, 255, 0.3),
                    0 8px 24px rgba(0, 123, 255, 0.4);
    }
}

/* Animación de pulso para carga */
@keyframes reac-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.reac-formulario-reserva {
    max-width: 600px;
    margin: 40px auto;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
}

.reac-formulario-reserva button[disabled] {
    opacity: .5;
}


/* Formulario oculto hasta seleccionar un puesto */
.reac-formulario-reserva {
    display: none;
    margin-top: 30px;
}

/* =========================
   FORMULARIO DE RESERVA
========================= */

.reac-puesto-info {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.reac-form-group {
    margin-bottom: 18px;
}

.reac-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}

.reac-required {
    color: #dc3545;
    font-weight: bold;
}

.reac-form-group input[type="text"],
.reac-form-group input[type="email"],
.reac-form-group input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.reac-form-group input:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.reac-form-group input::placeholder {
    color: #999;
    font-style: italic;
}

/* Grupo de categorías con radio buttons */
.reac-categoria-group {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #2196f3;
    margin-top: 15px;
}

.reac-categoria-group > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.05rem;
}

.reac-radio-option {
    margin: 12px 0;
}

.reac-radio-option label {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 12px;
}

.reac-radio-option label:hover {
    border-color: #2196f3;
    background: #f8f9fa;
}

.reac-radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #2196f3;
}

.reac-radio-option input[type="radio"]:checked + .reac-radio-label {
    color: #2196f3;
    font-weight: 600;
}

.reac-radio-option label:has(input:checked) {
    border-color: #2196f3;
    background: #e3f2fd;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.reac-radio-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.reac-radio-label strong {
    font-size: 1rem;
    color: #2c3e50;
}

.reac-precio-badge {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.reac-precio-badge.reac-gratis {
    color: #28a745;
    font-weight: 700;
    font-size: 1rem;
}

/* Checkbox de términos */
.reac-checkbox-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.reac-checkbox-group label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 15px;
}

.reac-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Detalle de términos y condiciones */
.reac-terminos-detalle {
    margin: 15px 0 0 0;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    max-height: 400px;
    overflow-y: auto;
}

.reac-terminos-intro {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 0.95rem;
}

.reac-terminos-titulo {
    margin: 20px 0 10px 0;
    color: #dc3545;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 2px solid #dc3545;
    padding-bottom: 5px;
}

.reac-terminos-titulo:first-of-type {
    margin-top: 10px;
}

.reac-terminos-lista {
    margin: 0 0 15px 20px;
    padding: 0;
    list-style: disc;
}

.reac-terminos-lista li {
    margin: 8px 0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.reac-terminos-lista li strong {
    color: #2c3e50;
}

/* Scrollbar personalizada para términos */
.reac-terminos-detalle::-webkit-scrollbar {
    width: 8px;
}

.reac-terminos-detalle::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.reac-terminos-detalle::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.reac-terminos-detalle::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Botón de envío */
.reac-btn-submit {
    width: 100%;
    padding: 14px 20px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

.reac-btn-submit:hover:not([disabled]) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.reac-btn-submit[disabled] {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .reac-formulario-reserva {
        padding: 20px 15px;
    }

    .reac-form-group input {
        font-size: 16px; /* Evita zoom en iOS */
    }

    /* Título de zona en móvil */
    .reac-zona-titulo-grid {
        font-size: 1rem;
        padding: 8px 15px;
        margin: 20px 10px 10px 10px;
    }

    /* Grilla de puestos en móvil */
    .reac-puestos-grid {
        gap: 12px;
        padding: 20px 15px;
        margin: 20px 10px;
        border-radius: 12px;
    }

    .reac-puesto {
        padding: 6px 10px;
    }

    .reac-cuadro {
        width: 38px;
        height: 38px;
    }

    /* Ajuste para horizontal en móvil */
    .reac-zona-detalle.horizontal .reac-puesto {
        min-width: 60px;
    }

    /* Ajuste para vertical en móvil */
    .reac-zona-detalle.vertical .reac-puesto {
        min-width: 100px;
    }
}


/* =========================
   CONSULTAR RESERVA POR TOKEN
========================= */

.reac-consultar-reserva {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Formulario de token */
.reac-token-form-wrapper {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
    margin: 40px 0;
    text-align: center;
}

.reac-token-form-wrapper h2 {
    margin: 0 0 15px;
    font-size: 1.8rem;
    color: #2c3e50;
}

.reac-token-form-wrapper p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.reac-token-form {
    max-width: 500px;
    margin: 0 auto;
}

.reac-token-form .reac-form-group input {
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Detalle de la reserva */
.reac-reserva-detalle {
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 40px 0;
}

.reac-reserva-detalle h2 {
    margin: 0 0 25px;
    font-size: 1.8rem;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.reac-reserva-detalle h3 {
    margin: 30px 0 20px;
    font-size: 1.4rem;
    color: #2c3e50;
}

/* Estados badge */
.reac-estado-badge {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.reac-estado-badge.estado-en-proceso {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.reac-estado-badge.estado-pago-informado {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #17a2b8;
}

.reac-estado-badge.estado-confirmado {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.reac-estado-badge.estado-liberado {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.reac-estado-badge.estado-bloqueado {
    background: #e2e3e5;
    color: #383d41;
    border: 2px solid #6c757d;
}

.reac-estado-descripcion {
    font-size: 1.05rem;
    color: #555;
    margin: 15px 0 30px;
    line-height: 1.6;
}

/* Grid de información */
.reac-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.reac-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reac-info-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reac-info-value {
    font-size: 1.1rem;
    color: #2c3e50;
}

.reac-info-item.reac-vencimiento {
    grid-column: 1 / -1;
    background: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.reac-vencido {
    color: #dc3545;
    font-weight: bold;
}

/* Formulario informar pago */
.reac-informar-pago-wrapper {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #28a745;
}

.reac-informar-pago-wrapper h3 {
    margin: 0 0 10px;
    color: #2c3e50;
}

.reac-informar-pago-wrapper p {
    color: #666;
    margin-bottom: 25px;
}

.reac-form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.reac-form-group input[type="file"]:hover {
    border-color: #28a745;
}

.reac-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.reac-form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.reac-help-text {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

.reac-loading {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 15px 0;
}

/* Info boxes */
.reac-info-box {
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
}

.reac-info-box h3 {
    margin: 0 0 15px;
}

.reac-info-box p {
    margin: 10px 0;
    line-height: 1.6;
}

.reac-info-box.reac-info-warning {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
}

.reac-info-box.reac-info-success {
    background: #d4edda;
    border-left: 5px solid #28a745;
}

.reac-small-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 15px;
}

/* Responsive para consultar reserva */
@media (max-width: 768px) {
    .reac-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .reac-token-form-wrapper,
    .reac-reserva-detalle {
        padding: 20px;
    }

    .reac-estado-badge {
        display: block;
        text-align: center;
    }
}
