/* =============================================================
   input.css — Componentes UI do modal: inputs, botões, OTP,
   campo de telefone, steps 2–4 e utilitarios de transição.
   Layout do container do modal → login.css
   ============================================================= */

/* ========================
   LABELS E INPUTS
======================== */
label.form-label {
    color: var(--input-label);
    font-size: 16px !important;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
    margin: 0 0 1rem;
}

.modal-body form input.form-control {
    border-radius: 8px;
    border: 1px solid #EAEAEA;
    background: #FFF;
    height: 48px;
    width: 100%;
}


/* ========================
   CAMPO DE TELEFONE
======================== */
/* Phone field */
.modal__field-label {
    font-size: 16px;
    font-weight: 700;
    color: #666;
    margin-bottom: 22px;
    display: block;
}

.modal__field {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 12px 16px;
    width: 242px;
}

.modal__field svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.modal__field-value {
    font-size: 20px;
    font-weight: 500;
    color: #666;
    line-height: 1.5;
}

/* ========================
   BOTÕES
======================== */
/* Buttons row */
.modal__actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Button base */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    width: 221px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.08px;
    border: none;
    text-decoration: none;
}

/* Secondary button */
.btn--secondary {
    background: transparent;
    border: 2px solid rgba(102, 102, 102, 0.3);
    color: #666;
}

.btn--primary svg,
.btn--secondary svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Primary button */
.btn--primary {
    background: linear-gradient(to right, #31d372, #a8d5ba);
    color: #fff;
    border: none;
}

.btn--primary .send-icon {
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.button-group-login {
    display: flex;
}


.btn--orange {
    background-color: #ffb74d;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 192px;
    height: 48px;
    font-size: 16px;
    font-weight: 600;
}

/* ========================
   STEP 2 — Digite o código
======================== */
.step2 .modal__body {
    padding: 28px 44px 40px;
}

.modal__subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #444;
    line-height: normal;
    margin-bottom: 32px !important;
}

/* OTP inputs */
.otp-row {
    display: flex;
    gap: 12px;
}

.otp-box {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    border: 1px solid #cecece;
    background: #fff;
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #666;
    outline: none;
    transition: border-color 0.2s;
}

.otp-box:first-child {
    border: 3px solid rgba(49, 211, 114, 0.5);
}

.otp-box:focus {
    border: 3px solid rgba(49, 211, 114, 0.7);
}

.modal__resend {
    font-size: 16px;
    font-weight: 400;
    color: #444;
    line-height: normal;
    margin: 24px 0 0 !important;
}

.modal__resend strong {
    font-weight: 700;
}

/* ========================
   STEP 3 — Validando
======================== */
.step3 .modal__body {
    padding: 0 44px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    text-align: center;
}

.loading-animation {
    position: relative;
    width: 108px;
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.loading-dot {
    width: 14px;
    height: 14px;
    background-color: #31d372;
    border-radius: 50%;
    animation: pulse 1.2s ease-in-out infinite;
}

.loading-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(49, 211, 114, 0.25);
    animation: spin 3s linear infinite;
}

.loading-orbit::before {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    background-color: rgba(49, 211, 114, 0.5);
    border-radius: 50%;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.step3 .modal__title {
    margin-bottom: 8px;
    font-size: 32px;
}

.step3 .modal__subtitle {
    margin-bottom: 0;
    font-size: 16px;
    color: #444;
}

/* ========================
   STEP 4 — Confirmado
======================== */
.step4 .modal__body {
    padding: 0 44px 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    text-align: center;
}

.success-icon-wrapper {
    position: relative;
    width: 121px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.success-icon-wrapper::before,
.success-icon-wrapper::after {
    content: '';
    position: absolute;
    background-color: rgba(49, 211, 114, 0.15);
    border-radius: 50%;
}

.success-icon-wrapper::before {
    width: 100px;
    height: 100px;
}

.success-icon-wrapper::after {
    width: 72px;
    height: 72px;
    background-color: rgba(49, 211, 114, 0.25);
}

/* decorative dots */
.success-dots {
    position: absolute;
    inset: 0;
}

.success-dots span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(49, 211, 114, 0.4);
}

.success-dots span:nth-child(1) {
    top: 8px;
    left: 30px;
}

.success-dots span:nth-child(2) {
    top: 20px;
    right: 12px;
    width: 4px;
    height: 4px;
}

.success-dots span:nth-child(3) {
    bottom: 16px;
    right: 24px;
}

.success-dots span:nth-child(4) {
    bottom: 8px;
    left: 18px;
    width: 4px;
    height: 4px;
}

.success-circle {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #31d372;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step4 .modal__title {
    font-size: 24px;
    color: #2d2d2d;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.step4 .modal__subtitle {
    font-size: 16px;
    color: #2d2d2d;
    font-weight: 400;
    margin-bottom: 32px;
    max-width: 420px;
    line-height: 1.6;
}

/* ========================
   TRANSITIONS
======================== */
.modal-step {
    animation: fadeIn 0.3s ease;
}

.page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    min-height: 100vh;
    background-color: #e8e8e8;
    padding: 40px 20px;
    font-family: 'Inter', sans-serif;
}

/* Step indicators */
.step-indicators {
    display: flex;
    gap: 10px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s;
}

.step-dot.active {
    background-color: #31d372;
}

.modal__actions svg {
    width: 16px;
}

#successTitle {
    font-size: 24px;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 580px) {
    .modal {
        width: 100%;
        border-radius: 12px;
    }

    .step1 .modal__body,
    .step2 .modal__body {
        padding: 24px 20px 32px;
    }

    .modal__actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .otp-row {
        gap: 8px;
    }

    .otp-box {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}