/* ==========================================================================
   ESTILOS ADICIONALES PARA EL REGISTRO DE TIENDAS
   ========================================================================== */

/* Fondo general de la página de registro */
body.bg-light {
    background-color: #fcfbf7 !important; /* Mantenemos el blanco hueso cálido */
}

/* Efectos para los inputs con icono integrado de Bootstrap */
.input-group .form-control:focus {
    border-color: #e2e8f0;
}

/* Cuando el usuario se para en un input, iluminamos sutilmente el icono del borde izquierdo */
.input-group:focus-within .input-group-text {
    border-color: #22c55e !important; /* Borde verde éxito al enfocar */
    color: #22c55e !important;
}

.input-group:focus-within .form-control {
    border-color: #22c55e !important;
}

/* Ajuste fino para las etiquetas de los formularios */
.form-label {
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Estilo para las alertas de error de validación */
.alert-danger {
    background-color: #fef2f2 !important; /* Rojo pastel muy suave */
    color: #991b1b !important;
    border-left: 4px solid #ef4444 !important; /* Línea de acento roja */
    border-radius: 8px;
}


/* =========================================================
   REGISTRO DE TIENDA: "Ingresar código" y "Solicitar acceso" (rg-)
   Colores de SOLOS: degradado violeta del panel y azul oscuro.
   Tamaño normal, pensado primero para celular.
   ========================================================= */

.rg-pagina {
    width: min(100% - 32px, 520px);
    margin: 0 auto;
    padding: 24px 0 96px;          /* abajo: espacio para el botón de WhatsApp */
    color: #1c1633;
}

.rg-cabecera {
    text-align: center;
    margin-bottom: 14px;
}

.rg-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, #420ae9 0%, #4d29a0 55%, #7857ac 100%);
    box-shadow: 0 8px 20px rgba(66, 10, 233, 0.25);
    color: #fff;
    font-size: 1.6rem;
}

.rg-cabecera h1 {
    margin: 0 0 6px;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
}

.rg-cabecera p {
    margin: 0;
    color: #6b6785;
    font-size: 1rem;
}

/* Tres beneficios en fila (en celular muy angosto se apilan) */
.rg-beneficios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.rg-beneficios li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border: 1px solid #e2ddf3;
    border-radius: 12px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.rg-beneficios i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #f1ecff;
    color: #5927ce;
    font-size: 1.05rem;
}

.rg-tarjeta {
    padding: 16px;
    border: 1px solid #e2ddf3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(77, 41, 160, 0.06);
}

.rg-tarjeta h2,
.rg-faq h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Pasos numerados */
.rg-pasos {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.rg-pasos li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.98rem;
}

.rg-pasos span {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1ecff;
    color: #5927ce;
    font-weight: 800;
    font-size: 0.9rem;
}

/* Botones grandes y cómodos de tocar */
.rg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rg-btn:hover {
    transform: translateY(-1px);
}

.rg-btn-principal {
    background: linear-gradient(135deg, #420ae9 0%, #4d29a0 55%, #7857ac 100%);
    box-shadow: 0 6px 18px rgba(66, 10, 233, 0.28);
    color: #fff;
}

.rg-btn-principal:hover {
    color: #fff;
    box-shadow: 0 8px 22px rgba(66, 10, 233, 0.36);
}

.rg-btn-oscuro {
    margin-top: 10px;
    background: #0f172a;
    color: #fff;
}

.rg-btn-oscuro:hover {
    color: #fff;
}

/* Separador "o" */
.rg-separador {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    color: #6b6785;
    font-weight: 600;
}

.rg-separador::before,
.rg-separador::after {
    content: "";
    flex: 1;
    border-top: 1px solid #e2ddf3;
}

.rg-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Campo del código: grande y legible */
.rg-form-codigo .form-control {
    min-height: 52px;
    border-radius: 12px;
}

.rg-form-codigo .form-control:focus {
    border-color: #7857ac;
    box-shadow: 0 0 0 0.2rem rgba(89, 39, 206, 0.15);
}

/* Preguntas frecuentes: <details> nativo, sin JS */
.rg-faq {
    margin-top: 18px;
}

.rg-faq details {
    margin-bottom: 8px;
    border: 1px solid #e2ddf3;
    border-radius: 12px;
    background: #fff;
}

.rg-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    font-size: 0.98rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.rg-faq summary::-webkit-details-marker {
    display: none;
}

.rg-faq summary::after {
    content: "+";
    color: #5927ce;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.2s ease;
}

.rg-faq details[open] summary::after {
    transform: rotate(45deg);
}

.rg-faq details p {
    margin: 0;
    padding: 0 14px 12px;
    color: #4b4766;
    font-size: 0.95rem;
}

.rg-faq a {
    color: #5927ce;
    font-weight: 600;
}

/* Botón flotante de ayuda por WhatsApp */
.rg-whatsapp {
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    background: #25d366;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
}

.rg-whatsapp i {
    font-size: 1.35rem;
}

.rg-whatsapp:hover {
    background: #1ebe5a;
    color: #fff;
}

@media (max-width: 380px) {

    .rg-beneficios {
        grid-template-columns: 1fr;
    }

    .rg-beneficios li {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
}

/* ---------- Formulario de solicitud ---------- */
.rg-campo {
    margin-bottom: 14px;
}

.rg-campo .form-control {
    min-height: 48px;
    border-radius: 12px;
    font-size: 1rem;
}

.rg-campo textarea.form-control {
    min-height: 84px;
}

.rg-campo .form-control:focus {
    border-color: #7857ac;
    box-shadow: 0 0 0 0.2rem rgba(89, 39, 206, 0.15);
}

.rg-ayuda {
    display: block;
    margin-top: 4px;
    color: #6b6785;
    font-size: 0.85rem;
}

.rg-opcional {
    color: #6b6785;
    font-weight: 400;
}

.rg-enlace-codigo {
    margin: 16px 0 0;
    text-align: center;
    font-size: 0.98rem;
}

.rg-enlace-codigo a {
    color: #5927ce;
    font-weight: 700;
}

/* Confirmación en la misma página; el formulario y su enlace se ocultan */
.rg-confirmacion {
    text-align: center;
}

.rg-confirmacion ~ .rg-form-solicitud,
.rg-confirmacion ~ .rg-enlace-codigo {
    display: none;
}

.rg-confirmacion-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 1.8rem;
}

.rg-confirmacion-texto {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 600;
}

/* Aparición suave al entrar (escalonada) y un latido leve del botón de ayuda */
@media (prefers-reduced-motion: no-preference) {

    .rg-aparecer {
        animation: rgAparecer 0.5s ease-out both;
    }

    .rg-aparecer:nth-child(2) { animation-delay: 0.05s; }
    .rg-aparecer:nth-child(3) { animation-delay: 0.12s; }
    .rg-aparecer:nth-child(4) { animation-delay: 0.19s; }
    .rg-aparecer:nth-child(5) { animation-delay: 0.26s; }
    .rg-aparecer:nth-child(6) { animation-delay: 0.33s; }
    .rg-aparecer:nth-child(7) { animation-delay: 0.4s; }

    .rg-whatsapp {
        animation: rgAparecer 0.5s ease-out 0.6s both, rgLatido 2.6s ease-in-out 1.4s infinite;
    }
}

@media (prefers-reduced-motion: reduce) {

    .rg-btn,
    .rg-faq summary::after {
        transition: none;
    }
}

@keyframes rgAparecer {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes rgLatido {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}
