/* =======================================================
   KYC — Etapa Telefone (Pixel match Figma Desktop & Mobile)
   Scoped strictly to .kyc-page--telefone
   ======================================================= */

/* Card base & Layout */
.kyc-page--telefone .kyc-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1080px;
    height: 680px;
    max-height: calc(100vh - 48px);
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

/* Coluna Esquerda: Sidebar */
.kyc-page--telefone .kyc-card-sidebar {
    flex: 0 0 500px;
    max-width: 500px;
    width: 48%;
    display: flex;
    flex-direction: column;
    padding: 32px 36px;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid #F3F4F6;
    background: #FFFFFF;
    min-width: 0;
}

/* Timeline Vertical na Sidebar */
.kyc-page--telefone .kyc-vstep {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    margin-top: 8px;
    min-height: 0;
}

.kyc-page--telefone .kyc-vstep-item {
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    column-gap: 14px !important;
    align-items: stretch !important;
    min-height: fit-content !important;
    flex-shrink: 0 !important;
}

.kyc-page--telefone .kyc-vstep-body {
    display: flex !important;
    gap: 12px !important;
    align-items: flex-start !important;
    padding-bottom: 16px !important;
    min-width: 0 !important;
}

.kyc-page--telefone .kyc-vstep-icon,
.kyc-page--telefone .kyc-vstep-icon img {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
}

.kyc-page--telefone .kyc-vstep-title {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    color: #3F3F3F;
    margin: 0 0 2px 0;
}

.kyc-page--telefone .kyc-vstep-desc {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.35;
    color: #888888;
    margin: 0;
}

/* Coluna Direita: Main Content */
.kyc-page--telefone .kyc-card-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 32px 36px;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
    position: relative;
    background: #FFFFFF;
    min-width: 0;
}

.kyc-page--telefone .kyc-card-main-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Títulos do Painel Principal */
.kyc-page--telefone .kyc-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-height: 0;
}

.kyc-page--telefone .kyc-main-title {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    color: #3F3F3F;
    margin: 0 0 8px 0;
    text-align: center;
}

.kyc-page--telefone .kyc-main-subtitle {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    color: #888888;
    margin: 0 auto 28px;
    text-align: center;
    max-width: 440px;
}

/* Form Inputs / Phone Row */
.kyc-page--telefone .kyc-phone-row--intl {
    width: 100%;
    max-width: 480px;
    margin: 0 auto 20px;
}

.kyc-page--telefone .ark-phone-wrap--split {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    align-items: flex-start;
}

.kyc-page--telefone .ark-phone-col--ddi {
    flex: 0 0 110px;
    max-width: 110px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.kyc-page--telefone .ark-phone-col--input {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.kyc-page--telefone .ark-phone-label {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #3F3F3F;
    text-transform: none;
    letter-spacing: normal;
    margin: 0;
}

.kyc-page--telefone .ark-phone-ddi {
    width: 100%;
    position: relative;
}

.kyc-page--telefone .ark-phone-ddi-btn {
    width: 100%;
    height: 44px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.kyc-page--telefone .ark-phone-ddi-btn:hover {
    border-color: #9CA3AF;
    background: #FAFAFA;
}

.kyc-page--telefone .ark-phone-flag {
    font-size: 16px;
    line-height: 1;
}

.kyc-page--telefone .ark-phone-ddi-code {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.kyc-page--telefone .ark-phone-chevron {
    font-size: 10px;
    color: #6B7280;
}

.kyc-page--telefone .ark-phone-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: #FFFFFF;
    height: 44px;
    padding: 0 12px;
    gap: 10px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.kyc-page--telefone .ark-phone-input-wrap:focus-within {
    border-color: #0EA5E9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.kyc-page--telefone .ark-phone-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kyc-page--telefone .ark-phone-input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    width: 100% !important;
    height: 100% !important;
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif !important;
    font-size: 14px !important;
    color: #1F2937 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.kyc-page--telefone .ark-phone-input::placeholder {
    color: #9CA3AF !important;
}

/* =======================================================
   OTP Boxes & Validation (Figma 40013013:1135 & 40013013:1573)
   ======================================================= */
.kyc-page--telefone .kyc-otp-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 28px 0 16px;
    flex-wrap: wrap;
}

.kyc-page--telefone .kyc-otp-input {
    width: 52px;
    height: 64px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    color: #1F2937;
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    background: #F3F4F6;
    box-sizing: border-box;
    padding: 0;
    transition: all 0.15s ease;
}

.kyc-page--telefone .kyc-otp-input:focus {
    outline: none;
    border: 1.5px solid #0EA5E9;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.kyc-page--telefone .kyc-otp-input--error {
    border: 1.5px solid #EF4444 !important;
    background: #FEF2F2 !important;
    color: #1F2937 !important;
    box-shadow: none !important;
}

.kyc-page--telefone .kyc-otp-input--error:focus {
    border: 1.5px solid #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.kyc-page--telefone .kyc-otp-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.kyc-page--telefone .kyc-otp-timer {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    color: #6B7280;
    margin: 0;
}

.kyc-page--telefone .kyc-otp-error {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 12px;
    color: #EF4444;
    margin: 0;
    text-align: center;
}

.kyc-page--telefone .kyc-link-resend {
    background: none;
    border: none;
    color: #0EA5E9;
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s, opacity 0.15s;
}

.kyc-page--telefone .kyc-link-resend:hover:not(:disabled) {
    color: #0284C7;
    text-decoration: underline;
}

.kyc-page--telefone .kyc-link-resend:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: none;
}

/* Info Box (Aviso amarelo com ícones duplos) */
.kyc-page--telefone .kyc-info-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 8px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
}

.kyc-page--telefone .kyc-info-box--warning {
    background: #FFFBEB;
    border: 1px solid #FEF3C7;
}

.kyc-page--telefone .kyc-info-box--warning p {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 11.5px;
    line-height: 1.4;
    color: #92400E;
    margin: 0;
    text-align: center;
    flex: 1;
}

.kyc-page--telefone .kyc-info-box-icon-img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Rodapé / Ações (Avançar e Pular) */
.kyc-page--telefone .kyc-footer-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    margin-top: auto !important;
    padding-top: 14px !important;
}

.kyc-page--telefone .kyc-footer-actions .kyc-btn-secondary {
    flex: 1 1 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    background: #FFFFFF !important;
    color: #374151 !important;
    border: 1px solid #4B5563 !important;
    border-radius: 6.85px !important;
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
}

.kyc-page--telefone .kyc-footer-actions .kyc-btn-secondary:hover:not(:disabled) {
    background: #F9FAFB !important;
    border-color: #111827 !important;
}

.kyc-page--telefone .kyc-footer-actions .kyc-btn-primary {
    flex: 1 1 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    background: #0EA5E9 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 6.85px !important;
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: background 0.15s ease !important;
    box-sizing: border-box !important;
}

.kyc-page--telefone .kyc-footer-actions .kyc-btn-primary:hover:not(:disabled) {
    background: #0284C7 !important;
}

.kyc-page--telefone .kyc-footer-actions .kyc-btn-primary:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* Painel de Resultados (Sucesso / Erro) */
.kyc-page--telefone .kyc-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    width: 100%;
    padding: 16px 0;
}

.kyc-page--telefone .kyc-result-illustration {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kyc-page--telefone .kyc-result-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.kyc-page--telefone .kyc-result-title {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    color: #3F3F3F;
    margin: 0 0 10px 0;
    max-width: 440px;
}

.kyc-page--telefone .kyc-result-desc {
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
    color: #888888;
    margin: 0 auto 28px;
    max-width: 440px;
}

.kyc-page--telefone .kyc-result-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 440px !important;
    margin-top: auto !important;
}

.kyc-page--telefone .kyc-result-actions .kyc-btn-result {
    flex: 1 1 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    background: #0EA5E9 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 6.85px !important;
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.kyc-page--telefone .kyc-result-actions .kyc-btn-result:hover:not(:disabled) {
    background: #0284C7 !important;
}

.kyc-page--telefone .kyc-result-actions .kyc-btn-outline-result {
    flex: 1 1 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    background: #FFFFFF !important;
    color: #374151 !important;
    border: 1px solid #4B5563 !important;
    border-radius: 6.85px !important;
    font-family: 'Work Sans', 'Inter', system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* =======================================================
   Tablets / Laptops Intermediários (768px – 1079px)
   ======================================================= */
@media (min-width: 768px) and (max-width: 1079px) {
    .kyc-page--telefone .kyc-card {
        max-width: calc(100vw - 32px);
        width: 100%;
        height: auto;
        min-height: 580px;
        max-height: calc(100vh - 32px);
    }

    .kyc-page--telefone .kyc-card-sidebar {
        flex: 0 0 42%;
        max-width: 420px;
        min-width: 280px;
        padding: 24px 24px;
    }

    .kyc-page--telefone .kyc-sidebar-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .kyc-page--telefone .kyc-sidebar-subtitle {
        font-size: 11.5px;
        margin-bottom: 12px;
    }

    .kyc-page--telefone .kyc-vstep-icon,
    .kyc-page--telefone .kyc-vstep-icon img {
        width: 36px !important;
        height: 36px !important;
    }

    .kyc-page--telefone .kyc-vstep-title {
        font-size: 13px;
    }

    .kyc-page--telefone .kyc-vstep-desc {
        font-size: 11px;
    }

    .kyc-page--telefone .kyc-card-main {
        flex: 1 1 58%;
        padding: 24px 24px;
    }

    .kyc-page--telefone .kyc-main-title {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .kyc-page--telefone .kyc-main-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .kyc-page--telefone .kyc-info-box {
        padding: 10px 14px;
    }

    .kyc-page--telefone .kyc-info-box p {
        font-size: 11px;
    }

    .kyc-page--telefone .kyc-footer-actions {
        padding-top: 12px !important;
    }

    .kyc-page--telefone .kyc-footer-actions .kyc-btn-primary,
    .kyc-page--telefone .kyc-footer-actions .kyc-btn-secondary {
        height: 38px !important;
        min-height: 38px !important;
        font-size: 13px !important;
    }
}

/* =======================================================
   Mobile Layout (≤ 767px — Figma 40013134:126543)
   ======================================================= */
@media (max-width: 767px) {
    .kyc-page--telefone .kyc-card {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
        border: none !important;
        border-radius: 0 !important;
        background: #FFFFFF !important;
    }

    .kyc-page--telefone .kyc-card-sidebar {
        display: none !important;
    }

    .kyc-page--telefone .kyc-mobile-top {
        display: block !important;
        padding: 16px 18px 0 !important;
        background: #FFFFFF !important;
    }

    .kyc-page--telefone .kyc-mobile-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .kyc-page--telefone .kyc-mobile-etapa {
        font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
        font-size: 12px;
        font-weight: 600;
        color: #0EA5E9;
        text-align: center;
        margin: 12px 0 16px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Stepper horizontal mobile */
    .kyc-page--telefone .kyc-mstep {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-bottom: 24px;
    }

    .kyc-page--telefone .kyc-mstep-circle {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'Work Sans', 'Inter', system-ui, sans-serif;
        font-size: 13px;
        font-weight: 600;
        background: #E5E7EB;
        color: #9CA3AF;
        flex-shrink: 0;
    }

    .kyc-page--telefone .kyc-mstep-circle--active {
        background: #0EA5E9;
        color: #FFFFFF;
    }

    .kyc-page--telefone .kyc-mstep-circle--done {
        background: #0EA5E9;
        color: #FFFFFF;
    }

    .kyc-page--telefone .kyc-mstep-line {
        flex: 1;
        max-width: 48px;
        height: 2px;
        background: #E5E7EB;
        margin: 0 4px;
    }

    .kyc-page--telefone .kyc-mstep-line--active {
        background: #0EA5E9;
    }

    .kyc-page--telefone .kyc-card-main {
        flex: 1 1 auto !important;
        width: 100% !important;
        padding: 0 18px 24px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .kyc-page--telefone .kyc-main-title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 8px;
    }

    .kyc-page--telefone .kyc-main-subtitle {
        font-size: 13.5px;
        margin-bottom: 24px;
    }

    .kyc-page--telefone .ark-phone-wrap--split {
        gap: 10px;
    }

    .kyc-page--telefone .ark-phone-col--ddi {
        flex: 0 0 100px;
        max-width: 100px;
    }

    .kyc-page--telefone .kyc-otp-group {
        gap: 8px;
        margin: 20px 0 14px;
    }

    .kyc-page--telefone .kyc-otp-input {
        width: 44px;
        height: 56px;
        font-size: 20px;
        border-radius: 6px;
    }

    .kyc-page--telefone .kyc-info-box {
        padding: 12px 14px;
        margin-bottom: 16px;
    }

    .kyc-page--telefone .kyc-footer-actions {
        flex-direction: column !important;
        gap: 8px !important;
        padding-top: 16px !important;
        margin-top: auto !important;
    }

    .kyc-page--telefone .kyc-footer-actions .kyc-btn-primary,
    .kyc-page--telefone .kyc-footer-actions .kyc-btn-secondary {
        width: 100% !important;
        flex: none !important;
        height: 44px !important;
        min-height: 44px !important;
        font-size: 14px !important;
    }

    .kyc-page--telefone .kyc-result-illustration {
        width: 140px;
        height: 140px;
        margin-bottom: 20px;
    }

    .kyc-page--telefone .kyc-result-title {
        font-size: 24px;
        line-height: 1.25;
    }

    .kyc-page--telefone .kyc-result-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .kyc-page--telefone .kyc-result-actions .kyc-btn-result,
    .kyc-page--telefone .kyc-result-actions .kyc-btn-outline-result {
        width: 100% !important;
        height: 44px !important;
        min-height: 44px !important;
    }
}

/* =======================================================
   Alturas Baixas no Desktop (max-height ≤ 740px)
   ======================================================= */
@media (min-width: 768px) and (max-height: 740px) {
    .kyc-page--telefone .kyc-card {
        height: calc(100vh - 32px);
        min-height: 0;
    }

    .kyc-page--telefone .kyc-card-sidebar {
        padding: 16px 20px;
    }

    .kyc-page--telefone .kyc-sidebar-title {
        font-size: 19px;
        margin-bottom: 4px;
    }

    .kyc-page--telefone .kyc-sidebar-subtitle {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .kyc-page--telefone .kyc-vstep {
        gap: 0;
        overflow-y: auto;
    }

    .kyc-page--telefone .kyc-vstep-item {
        flex-shrink: 0 !important;
        min-height: fit-content !important;
    }

    .kyc-page--telefone .kyc-vstep-body {
        padding-bottom: 10px !important;
    }

    .kyc-page--telefone .kyc-vstep-icon,
    .kyc-page--telefone .kyc-vstep-icon img {
        width: 32px !important;
        height: 32px !important;
    }

    .kyc-page--telefone .kyc-vstep-title {
        font-size: 12.5px;
    }

    .kyc-page--telefone .kyc-vstep-desc {
        font-size: 10.5px;
    }

    .kyc-page--telefone .kyc-card-main {
        padding: 16px 24px;
    }

    .kyc-page--telefone .kyc-main-title {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .kyc-page--telefone .kyc-main-subtitle {
        font-size: 11.5px;
        margin-bottom: 16px;
    }

    .kyc-page--telefone .kyc-info-box {
        padding: 8px 12px;
    }

    .kyc-page--telefone .kyc-info-box p {
        font-size: 10.5px;
    }

    .kyc-page--telefone .kyc-footer-actions {
        padding-top: 10px !important;
    }

    .kyc-page--telefone .kyc-footer-actions .kyc-btn-primary,
    .kyc-page--telefone .kyc-footer-actions .kyc-btn-secondary {
        height: 36px !important;
        min-height: 36px !important;
        font-size: 12.5px !important;
    }
}
