﻿

/* ----------------------------------------- Structure ----------------------------------------- */

main {
    padding: 40px 4%;
    display: flex;
    justify-content: center;
    gap: 32px;
    position: relative;
    flex-direction: column;
    align-items: center;
}

.grecaptcha-badge {
    width: 70px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    left: 4px !important;
}

    .grecaptcha-badge:hover {
        width: 256px !important;
    }

.container-form {
    width: 100%;
    max-width: 800px;
    height: auto;
    min-height: 50dvh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-form {
    width: 100%;
    height: fit-content;
    max-height: 0;
    opacity: 0;
    transform: translateY(-1rem);
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: max-height 1.4s ease, opacity .6s ease, transform .4s ease;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.60) inset, 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.hr-title {
    width: 80%;
    margin: 12px 0 8px;
    border: 1px solid #16161614;
}

fieldset {
    width: 100%;
    margin: 32px 0 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    border: none;
    row-gap: 12px;
}

.show-step {
    max-height: fit-content ;
    opacity: 1 ;
    transform: translateY(0) ;
}

#step1 {
    display: flex !important;
    max-height: fit-content !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
}

/* -------- first step --------*/
.box-banner {
    width: 100%;
    height: fit-content;
    display: flex;
    overflow: hidden;
    max-height: 40dvh;
    border-radius: 8px 8px 0 0;
}

.title-step {
    color: var(--color-gray2);
    font-size: 20px;
    font-weight: bold;
}

.box-banner img {
    max-width: 100%;
    object-fit: cover;
}

.info-step1 {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 8px !important;
} 




/*----------------------- Inputs --------------------------*/

.form-item {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
}

.form-item input {
    display: block;
    width: 100%;
    height: 44px;
    background: transparent;
    border: solid 1px var(--color-gray);
    border-radius: 8px;
    transition: all .3s ease;
    padding: 0 15px;
    outline: none !important;
    font-size: 16px;
    box-shadow: 0 0 6px 0px rgba(0, 0, 0, 0.15);
}

.form-item input:focus {
    border-color: var(--color-accent);
}

.form-item label {
    position: absolute;
    cursor: text;
    z-index: 2;
    top: 13px;
    left: 10px;
    font-size: 16px;
    background: #fafafa;
    padding: 0 10px;
    color: var(--color-gray2);
    transition: all .3s ease
}

    .form-item input:focus ~ label, .form-item input:hover ~ label,
    .form-item input:valid ~ label {
        font-size: 12px;
        top: -6px;
        font-weight: bold;
        padding-left: 4px;
    }

    .form-item input[disabled] ~ label, .form-item select[disabled] ~ label {
        font-size: 12px;
        top: -6px;
        font-weight: bold;
        padding-left: 4px;
        background-color: #ededed;
        border-radius: 4px;
        cursor: not-allowed !important;
    }

input[disabled], select[disabled] {
    background-color: #ededed !important;
    cursor: not-allowed !important;
}

    .form-item input:focus ~ label {
        color: var(--color-accent);
        font-weight: bold;
    }

/* ------- Selects --------*/
    .form-item select {
        display: block;
        width: 100%;
        height: 44px;
        padding: 0 15px;
        font-size: 16px;
        background: transparent;
        color: var(--color-gray2);
        border: 1px solid var(--color-gray);
        border-radius: 8px;
        transition: all .3s ease;
        outline: none !important;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        cursor: pointer;
        background-image: url("/Images/select.svg");
        background-repeat: no-repeat;
        background-size: 18px 12px;
        background-position: right 12px center;
        box-shadow: 0 0 6px 0px rgba(0, 0, 0, 0.15);
        padding-right: 42px;
    }

.form-item select:focus {
    border-color: var(--color-accent);
}

    .form-item select:focus ~ label,
    .form-item select:hover ~ label,
    .form-item select:valid ~ label {
        top: -6px;
        font-size: 12px;
        font-weight: bold;
        padding-left: 4px;
    }

    .form-item select:focus ~ label {
        color: var(--color-accent);
    }

        .form-item select ~ label {
            cursor: pointer;
            min-width: 100px;
        }

select option:hover {
    background-color: var(--color-accent);
    color: #fff;
}

/* ------- Phone --------*/

.phone-field { 
    display: flex;
    gap: 8px; 
}

    .phone-field select {
        width: 84px !important; 
        height: 44px;
        background: #fafafa; 
        border: solid 1px var(--color-gray);
        border-radius: 8px;
        font-size: 16px;
        padding: 0 10px;
        outline: none;
        cursor: pointer;
        box-shadow: 0 0 6px 0 rgba(0,0,0,.15);
        transition: all .3s ease;
    }
        
    .phone-field label {
        left: 100px !important;
    }
    .phone-field select:focus {
        border-color: var(--color-accent);
    }

        .phone-field select option {
            font-size: 16px; 
        }



/* -------- Input File --------- */

.file-upload {
    max-width: 520px;
    margin: 1.5rem auto;
}

    .file-upload h2 {
        margin: 0 0 1rem;
        text-align: center;
        color: var(--color-accent);
        font-size: 1.35rem;
    }

.file-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0.1px;
    height: 0.1px;
}

.file-drop {
    display: grid;
    place-items: center;
    gap: .35rem;
    text-align: center;
    padding: 2.25rem 1.5rem;
    border: 2px dashed var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

    .file-drop:hover,
    .file-drop:focus-within {
        border-color: var(--color-accent);
        background: #f3f5ff;
        box-shadow: var(--shadow-strong);
    }

    .file-drop svg {
        color: var(--color-accent);
    }

    .file-drop .primary {
        font-weight: 600;
    }

    .file-drop .secondary {
        font-size: 0.95rem;
        color: var(--color-muted);
    }

    .file-drop .hint {
        margin-top: .35rem;
        font-size: 0.8rem;
        color: var(--color-muted);
    }

.file-status::before {
    content: "Aún no has seleccionado un archivo.";
    color: var(--color-muted);
    display: inline-block;
    margin-top: .75rem;
    font-size: 0.9rem;
}

.file-upload:has(.file-input:valid) .file-status::before, input:valid ~ .file-status::before {
    content: "Archivo agregado ✓";
    color: var(--color-success);
}

.file-upload:has(.file-input:valid) .file-drop, input:valid ~ .file-drop {
    border-color: var(--color-success);
    background: #f1fcf7;
}

    .file-upload:has(.file-input:valid) .file-drop svg, input:valid ~ .file-drop svg {
        color: var(--color-success);
    }

/* ------- Error --------*/

.box-error-alert {
    height: 24px;
    position: absolute;
    bottom: 10px;
    right: 8px;
    display: none;
}

.errorAlert .box-error-alert {
    display: flex !important;
}


.errorAlert select {
    padding-right: 66px !important
}
.phone-field select {
    padding-right: 10px !important
}

    .errorAlert input, .errorAlert select + input {
        padding-right: 36px !important
    }
select + label + .box-error-alert, label + select + .box-error-alert {
    right: 38px !important;
}

.errorAlert label {
    font-size: 12px;
    top: -6px;
    font-weight: bold;
    padding-left: 4px;
}

.errorAlert input + label {
    color: red;
    font-weight: bold;
}

.errorAlert input {
    border-color: red;
}

.errorAlert select {
    border-color: red;
}

.errorAlert select + label {
    top: -6px;
    font-size: 12px;
    font-weight: bold;
    padding-left: 4px;
}

.errorAlert select + label {
    color: red;
}

/* ------- label largo --------*/

.label-outside input, .label-outside select{
    margin-top: 8px !important; 
}

.label-outside label {
    position: static !important;
    font-size: 16px !important;
    padding: 0 !important;
    background: none !important;
}

.box-inputs {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    gap: 8px;
}

.label-outside {
    display: flex;
    flex-direction: column;
}
/* ----------------------------------------- Texts in general ----------------------------------------- */
h2 {
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 2px #00000030;
    margin: 0px;
}

h1 {
    color: var(--color-balck);
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

p {
    color: var(--color-gray2);
    font-size: 16px;
    width: 100%;
    margin: 0;
    text-align: center;
}


fieldset h2 {
    font-size: 1.5rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    text-align: center;
}

.optional-msg {
    font-size: 0.9rem;
    color: var(--color-gray2);
    margin-bottom: 1.5rem;
    line-height: 1.45;
}



/* ----------------------------------------- Buttons ----------------------------------------- */

.btn-primary {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 12px 24px;
    color: var(--color-accent);
    background: #fff;
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    cursor: pointer;
    transition: color .3s ease, transform .3s ease, box-shadow .3s ease;
    outline: none !important;
    font-size: 18px;
    font-weight: bold;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-accent);
    transform: scaleX(0) scaleY(1.5);
    transform-origin: left;
    transition: transform .45s cubic-bezier(.4,0,.2,1);
    z-index: -1;
}


.btn-primary:hover::before,
.btn-primary:focus-visible::before {
    transform: scaleX(1);
}

    .btn-primary:hover,
    .btn-primary:focus-visible {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px 4px var(--color-shadow);
        outline: none;
    }

.btn-primary:focus-visible {
    box-shadow: 0 0 0 4px var(--color-accent), 0 8px 20px rgba(230,0,122,.3);
}

    .btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 4px 10px 2px var(--color-shadow);
    }

.box-btn {
    width: 100%;
    display: flex;
    justify-content: end;
}




/* ----------------------------------------- Modal finish ----------------------------------------- */

.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    /* estado inicial fuera de escena */
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}

    /* visible */
    .backdrop.show {
        opacity: 1;
        pointer-events: all;
    }

    /* oculto (por si lo necesitas aparte) */
    .backdrop.hidden {
        display: none;
    }

.modalP {
    width: 90%;
    max-width: 600px;
    height: 92vh;
    height: fit-content;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transform: translateY(-40px) scale(0.98);
    opacity: 0;
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), opacity 300ms ease;
}

/* estado visible */
.backdrop.show .modalP {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* estado saliendo */
.backdrop.closing .modalP {
    transform: translateY(40px) scale(0.96);
    opacity: 0;
}

.head-finish-modal {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    border-bottom: 1px solid var(--color-gray);
    padding-bottom: 10px;
    align-items: center;
    box-shadow: 0 6px 15px -8px #0000001a;
}

    .head-finish-modal h1 {
        width: calc(100% - 32px);
        text-align: center;
        font-weight: bold;
        font-size: 20px;
        margin: 0px;
        color: var(--color-balck)
    }

#box-btn-close {
    width: 28px;
    height: 28px;
    padding: 4px;
    cursor: pointer;
}

    #box-btn-close svg {
        width: 100%;
        height: 100%;
    }


.box-data {
    display: flex;
    flex-wrap: wrap;
    overflow: auto;
    flex-direction: column;
    width: 100%;
    padding: 0 4px;
}

    .box-data .finish-data {
        position: relative;
        padding-top: 12px;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

.finish-data span {
    font-size: 16px;
    line-height: 1.2 !important;
    color: var(--color-gray2);
}

.data-label {
    font-weight: bold;
    font-size: 12px;
    color: #1212125e;
}

.box-value {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.container-value, .box-total {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    color: var(--color-gray2);
    font-size: 14px;
    gap: 5px;
    padding: 4px;
}


.box-total {
    background-color: var(--color-gray2);
    color: #fafafa !important;
    margin-top: 8px;
}

    .container-value span, .box-total span {
        width: 82px;
    }

    .value-label, .box-total label {
        width: fit-content;
        max-width: calc(100% - 90px);
    }

.separator {
    border: 1px dashed var(--color-gray);
    flex-grow: 1;
}

.box-total .separator {
    border: 1px dashed #fafafa !important;
}

.box-btn-finish {
    margin-top: 28px;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: end;
}





/* ################################################# MODO PC ################################################# */
@media (min-width: 720px) {
    /* ----------------------------------------- Structure ----------------------------------------- */

    main {
        flex-direction: row;
        align-items: start;
    }

    .step-form fieldset, .info-step1 {
        padding: 0 5%;
    }

    .container-form {
        width: calc(100% - var(--width-progress) - 32px);
        max-width: 800px;
        height: auto;
        min-height: 50dvh;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ----------------------------------------- Modal Finish ----------------------------------------- */
    .box-data {
        flex-direction: row;
        justify-content: space-between;
    }

        .box-data .finish-data {
            width: 48%;      
        }
}





















