/* personalizar.css */
/* === Estilos del Modal === */
.modal {
    display: none;
    /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    /* Fondo oscuro */
    z-index: 3000;
    font-family: 'Raleway', sans-serif;
    font-style: lighter;
    justify-content: center;
    align-items: center;
}




/* Mostrar el modal */
.modal.show {
    display: flex;
}

/* Caja del modal */
.modal-content {

    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
    padding-bottom: 80px;

    /* espacio para que no se superponga el footer */
    /* === CONTROL DE MEDIDAS === */
    width: 800px;
    /* 👈 Ajusta el ancho */
    height: 600px;
    /* 👈 Ajusta el alto */
    max-width: 95%;
    max-height: 95%;

    /* === CONTROL DE POSICIÓN === */
    margin-top: -30px;
    /* 👈 Sube o baja el modal */
}

/* Contenido dividido (sidebar y formulario) */
.modal-body {
    display: flex;
    height: 100%;

}

/* Sidebar izquierda */
.modal-sidebar {
    width: 250px;
    border-right: 1px solid #ddd;
    /* Línea gris divisoria */
    background: #f9f9f9;
    padding: 20px;
}

/* Área principal */
.modal-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Botones */
/* Botones (footer fijo al fondo) */
.modal-footer {
    position: absolute;

    bottom: 20px;
    /* separación del borde inferior */
    left: 20px;
    /* separación del borde izquierdo */
    right: 20px;
    /* separación del borde derecho */
    display: flex;
    justify-content: center;
    gap: 20px;
}


.modal-footer button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;


}

/* Contenido interno centrado */
.profile-form-container {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    padding-bottom: 80px;
    /* espacio para botones */
    width: 800px;
    height: 600px;
    max-width: 95%;
    max-height: 95%;
    overflow: hidden;
    font-weight: 600;
}

.modal-content,
.profile-form-container,
.close {
    position: relative;
    /* o absolute dentro del modal */
    z-index: 3000;
    /* más alto que el modal principal */
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: rgb(240, 138, 70);
    z-index: 5000;
    /* aumentar z-index para que esté arriba */
}

/* === Progreso === */
.progressbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    margin-top: 30px;
    font-family: 'Raleway', sans-serif;
    font-style: lighter;
    position: relative;
}

.progressbar .step {
    flex: 1;
    text-align: center;
    font-weight: 500;
    color: gray;
    position: relative;
    z-index: 1002;
}

.progressbar .step.active {
    color: rgb(240, 138, 70);
    font-weight: lighter;
    z-index: 1002;
}

.progressbar .step:before {
    content: "";
    display: block;
    margin: 0 auto 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: lightgray;
    position: relative;
    /* clave */
    z-index: 2;
    /* círculo arriba */
}

.progressbar .step.active:before {
    background: rgb(240, 138, 70);
    z-index: 1030;
}

/* Línea de fondo (gris) */
.progressbar::before {
    content: "";
    position: absolute;
    margin-left: 100px;
    top: 8px;
    /* alinea con los círculos */
    left: 0;
    width: 75%;
    height: 3px;
    background: lightgray;
    z-index: 1;
    border-radius: 2px;
}

/* Línea de progreso (naranja) */
.progressbar::after {
    content: "";
    position: absolute;
    margin-left: 100px;
    top: 8px;
    /* mismo que arriba */
    left: 0;
    width: var(--progress, 0%);
    height: 3px;
    background: rgb(240, 138, 70);
    z-index: 2;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* === Círculos blanco centro === */
.progressbar .step.active::after {
    content: "";
    position: absolute;
    top: 21%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    /* tamaño del círculo blanco */
    height: 5px;
    border-radius: 50%;
    background: rgb(255, 255, 255);
    z-index: 1040;
    /* > 1030 para que quede encima */
}


/* === Círculos de progreso === */

/* círculo completado */
.progressbar .step.completed:before {
    background: rgb(240, 138, 70);
}

/* círculo activo (paso actual) */
.progressbar .step.active:before {
    background: rgb(240, 138, 70);
}

/* === Inputs === */
.form-container {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    /* ya no lo centres */
    align-items: flex-start;
    /* lo dejamos arriba */
    padding: 20px 40px;
    /* un poco de margen */
}

.form-step {
    width: 100%;
    max-width: 800px;
    display: none;
    /* ocultar por defecto */
    flex-direction: column;
    align-items: flex-start;
    /* todo a la izquierda */
    justify-content: flex-start;
}

.form-step.active {
    display: block;
}

.form-step>div:first-child {
    width: 100% !important;
    /* que se expanda todo el ancho del modal */
    max-width: none !important;
    text-align: center;
    display: block;
}

.form-step h2 {
    font-family: 'Raleway', sans-serif;
    font-weight: 100;
    margin-bottom: 0px;
    font-style: italic;
    margin: 0 auto;
    text-align: center;

}

.form-step hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 10px 0;
}



/* === boton seleccionar archivo oculto y genero boton lindo === */

#avatar-input {
    display: none;
    /* ocultamos el input real */
}

.avatar-container {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    /* recorta la imagen fuera del círculo */
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#avatar-btn {
    display: block;
    margin: 0 auto;
    padding: 4px 12px;
    /* menos padding = botón más pequeño */
    border-radius: 50px;
    /* mantiene esquinas redondeadas */
    border: .1px solid rgb(240, 138, 70);
    background-color: white;
    color: rgb(240, 138, 70);
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    /* reduce tamaño del texto */
    max-width: 120px;
    /* opcional: limita ancho máximo */
    transition: 0.3s;
}

#avatar-btn:hover {
    background-color: rgb(240, 138, 70);
    color: white;
}

/* === Toggle Switch === */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    color: rgb(240, 138, 70);
    font-weight: 500;

    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.username {
    display: block;
    text-align: center;
    padding: 5px;

}

.toggle-container .Editar {
    font-size: 14px;
    /* antes era más grande */
    font-weight: 400;
    margin-left: 30px;
    /* más liviano */
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;

}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #8d8d8d;
    border-radius: 20px;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: rgb(255, 255, 255);
    border-radius: 50%;
    transition: 0.4s;
}

.switch input:checked+.slider {
    background-color: rgb(240, 138, 70);
}

.switch input:checked+.slider:before {
    transform: translateX(20px);
}


/*Metodos de pago*/
.metodopago {
    text-align: center;
    padding: 5px;
}

.payment-methods {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 10px 0;
}

.payment-methods img {
    width: 50px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s, filter 0.3s;
    border-radius: 10px;
    padding: 5px;
    border: 2px solid transparent;
    object-fit: cover;

}

.payment-methods img:hover {
    transform: translateY(-10px);
}

.payment-methods img.selected {
    border: 1px solid rgb(240, 138, 70);
    /* tu color naranja */
    filter: brightness(1.1);


}

.selected-method {
    text-align: center;
    font-family: 'Raleway', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: rgb(240, 138, 70);
    margin-bottom: 10px;
}

/* Inputs agrupados con línea separadora */

input {
    width: 40%;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    border: 1px solid rgb(240, 138, 70);
}


/* Inputs agrupados con línea separadora */
.input-container {

    font-weight: 800;
    padding: 0 0;

    display: flex;
    flex-wrap: wrap;
    /* permite que baje a nueva línea si la pantalla es pequeña */
    gap: 20px;
}

.input-group {
    display: flex;
    margin-left: 25px;
    ;
    flex-direction: column;
    /* label arriba del input */
    width: calc(45% - 10px);
    /* 2 columnas con gap de 20px */

}

.input-group label {
    font-family: 'Raleway', sans-serif;
    font-style: italic;
    margin-bottom: 5px;
    margin-left: 10px;
    /* espacio entre label e input */
    font-weight: 700;
    font-size: 14PX;
    color: rgb(33, 27, 23);

}

.input-group input {
    width: 100%;
    /* ocupa todo el ancho de su columna */
    padding: 10px;
    border-radius: 100px;
    border: .1px solid #999;
    box-sizing: border-box;
}


/* === Checkbox === */
.checkbox-group {
    width: 100%;
    margin-left: 5px;
    display: flex;
    align-items: center;
    margin-top: -10px;
}

.checkbox-group input[type="checkbox"] {
    display: none;
    /* ocultamos el checkbox real */
}

.checkbox-group label {
    position: relative;
    padding-left: 28px;
    /* espacio para el cuadrado */
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    font-size: 14px;
    color: rgb(33, 27, 23);
    line-height: 1.4;
    /* ayuda a centrar verticalmente */
    display: flex;
    align-items: center;
}

/* cuadrado */
.checkbox-group label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    /* centra verticalmente */
    width: 18px;
    height: 18px;
    border: .5px solid rgb(240, 138, 70);
    border-radius: 4px;
    background: white;
    box-sizing: border-box;
}

/* tilde */
.checkbox-group input[type="checkbox"]:checked+label::after {
    content: "✔";
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-52%);
    /* centra el tilde */
    font-size: 14px;
    color: rgb(240, 138, 70);
    /* color del tilde */
    font-weight: bold;
}


/* === Botones === */
.form-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* empuja extremos a los lados */
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 15px;
}

button {
    font-family: "Raleway";
    padding: 10px 20px;
    border-radius: 20px;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: lighter;
    min-width: 130px;
}

.btn-siguiente {
    background: rgb(240, 138, 70);
    color: #fff;
}

.btn-siguiente:hover {
    background: rgb(240, 138, 70, 0.5);
    color: rgb(33, 27, 23);
}

.btn-anterior {
    background: transparent;
    border: 1px solid rgb(240, 138, 70);
    color: rgb(240, 138, 70);
}

.btn-anterior:hover {
    background: rgb(33, 27, 23, 0.1);
    border: 1px solid rgb(240, 138, 70);
    color: rgb(240, 138, 70);
}

.btn-guardar {
    background: transparent;
    border: 1px solid rgb(240, 138, 70);
    color: rgb(240, 138, 70);
}

.btn-guardar:hover {
    background: rgb(33, 27, 23, 0.1);
    border: 1px solid rgb(240, 138, 70);
    color: rgb(240, 138, 70);
}

.btn-saltarPaso {
    text-decoration: underline;
    text-underline-offset: 5px;
    background: transparent;
    border: 0px solid #ccc;
    color: #999;
    margin-left: auto;
}

.btn-saltarPaso:hover {
    color: rgb(240, 138, 70);
}

/* Centra boton guardar*/
.center-buttons {
    flex: 1;
    display: flex;
    margin-left: 220px;
    /* centra el botón guardar */
}


/* Desktop/tablet → mostrar progressbar, ocultar título dinámico */
.step-title {
    display: none;
}

/* === FIX: centrar botón Guardar datos === */
.center-buttons {
    margin-left: 0 !important;
    /* elimina el desplazamiento */
    flex: 1;
    /* ocupa todo el espacio disponible */
    display: flex;
    justify-content: center;
    /* centra el botón */
}

.center-buttons .btn-guardar {
    display: block;
    margin: 0 auto;
    /* asegura el centrado */
}




































/* === RESPONSIVE === */

/* Celulares (pantallas pequeñas) */
@media (max-width: 600px) {

    /* Botón guardar centrado */
    .center-buttons .btn-guardar {
        width: 100%;
    }

    body.modal-open {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Modal ocupa todo el viewport */
    .modal {
        height: 100dvh; /* clave en iPhone */
        width: 100vw;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        padding-top: 0;
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }

    /* Contenedor principal del formulario */
    .profile-form-container {
        width: 90%;
        height: 80%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        overflow: hidden; /* mantener scroll en el hijo */
    }

    /* Contenedor scrolleable */
    .form-scroll {
        flex: 1;
        min-height: 0; /* clave para scroll en flex */
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 15px 20px;
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }

    /* Ajustes de títulos y inputs */
    .form-step h2 {
        font-size: 18px;
    }

    input,
    .input-group input {
        width: 90%;
        margin: 0 auto 5px;
        display: block;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 30px;
    }

    .input-container {
        flex-direction: column;
        gap: 15px;
    }

    .input-group {
        width: 100%;
        margin-left: 0;
    }

    .avatar-container {
        width: 60px;
        height: 60px;
    }

    .input-group label {
        display: block;
        font-size: 14px;
        margin-left: 25px;
        margin-bottom: 5px;
    }

    .payment-methods {
        flex-wrap: wrap;
        gap: 10px;
    }

    .payment-methods img {
        width: 40px;
    }

    .checkbox-group label {
        font-size: 12px;
    }

    /* Progressbar sticky */
    .progressbar {
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 10px 15px;
        box-sizing: border-box;
        z-index: 1001;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        font-family: 'Raleway', sans-serif;
        font-style: lighter;
        font-size: 13px;
    }

    /* Línea de fondo y progreso */
    .progressbar::before {
        content: "";
        position: absolute;
        margin-left: 64px;
        top: 18px;
        left: 0;
        width: 70%;
        height: 3px;
        background: lightgray;
        z-index: 1;
        border-radius: 2px;
    }

    .progressbar::after {
        content: "";
        position: absolute;
        margin-left: 45px;
        top: 18px;
        left: 0;
        width: var(--progress, 0%);
        height: 3px;
        background: rgb(240, 138, 70);
        z-index: 2;
        border-radius: 2px;
        transition: width 0.3s ease;
    }

    .progressbar .step.active::after {
        content: "";
        position: absolute;
        top: 18%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgb(255, 255, 255);
        z-index: 1040;
    }

    /* Navegación botones */
    .form-navigation {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-top: 20px;
    }

    .form-navigation button {
        width: 80%;
        margin: 0 auto;
        display: block;
    }

    .btn-saltarPaso {
        margin-left: 0;
        width: auto;
        display: block;
        text-align: center;
    }

    /* Footer */
    .modal-footer {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        text-align: center;
    }

    .modal-footer button {
        width: 60%;
        margin: 0 auto;
        display: block;
    }
}




