:root {
    --bg-desktop: #f6f6f6;
    --bg-white: #ffffff;
    --text-black: #000000;
    --text-gray: #545454;
    --surface-gray: #eeeeee;     
    --surface-dark: #e2e2e2;     
    --accent-black: #000000;     
    --accent-white: #ffffff;
    --error-color: #d93025;
    --border-radius: 8px;        
    --transition-speed: 0.3s;
    --font-family: 'Inter', system-ui, sans-serif;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-white); 
    color: var(--text-black);
    display: flex; flex-direction: column;
    height: 100dvh; 
    overflow-x: hidden; /* TRAVA 1: Impede tela de balançar no mobile */
}

@media (min-width: 768px) {
    body { background-color: var(--bg-desktop); }
}

/* CABEÇALHO */
.uber-header {
    width: 100%;
    background-color: var(--bg-white);
    display: flex; flex-direction: column;
    flex-shrink: 0; z-index: 20;
    border-bottom: 1px solid #f0f0f0;
}

.header-content {
    width: 100%; max-width: 700px; margin: 0 auto;
    height: 60px; display: flex; justify-content: space-between; align-items: center;
    padding: 0 24px;
}

.header-left, .header-right { width: 40px; display: flex; align-items: center; }
.header-right { justify-content: flex-end; }
.menu-icon { font-size: 1.6rem; color: var(--text-black); cursor: pointer; }
.logo-container { flex: 1; display: flex; justify-content: center; }
.main-logo { height: 28px; width: auto; object-fit: contain; }

.progress-wrapper { width: 100%; height: 3px; background-color: #f0f0f0; display: none; }
.progress-bar { height: 100%; width: 0%; background-color: var(--accent-black); transition: width 0.4s ease-out; }

/* =========================================
   ÁREA DE CONTEÚDO CORRIGIDA
   ========================================= */
.uber-main-container {
    flex: 1; 
    overflow-y: auto;
    overflow-x: hidden;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    /* TRAVA 2: Adiciona padding para que nada grude nas laterais do iPhone */
    padding: 24px; 
    width: 100%;
}

.form-card {
    width: 100%; max-width: 600px;
    background-color: var(--bg-white);
    padding: 0; /* No mobile, o container pai gerencia a borda */
    display: flex; flex-direction: column; flex: 1;
}

@media (min-width: 768px) {
    .uber-main-container { padding: 40px 24px; }
    .form-card {
        flex: none; min-height: 500px;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.06);
        border: 1px solid #e5e5e5;
        padding: 32px; /* Retorna o padding para desktop */
    }
}

form { display: flex; flex-direction: column; flex: 1; }

.step {
    display: none; flex-direction: column; flex: 1;
    opacity: 0; transform: translateX(10px);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.step.active { display: flex; }
.step.show { opacity: 1; transform: translateX(0); }

/* TIPOGRAFIA */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.15; margin-bottom: 12px; letter-spacing: -0.04em; }
h2 { font-size: 1.6rem; font-weight: 600; line-height: 1.25; margin-bottom: 24px; letter-spacing: -0.02em; }
p { color: var(--text-gray); font-size: 1rem; line-height: 1.5; }
.text-header, .subtitle-text { margin-bottom: 32px; }

/* ELEMENTOS VISUAIS */
.benefits-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.benefit-item { display: flex; align-items: center; gap: 16px; }
.icon-box { width: 48px; height: 48px; border-radius: 50%; background-color: var(--surface-gray); display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.icon-box i { font-size: 1.5rem; color: var(--text-black); }
.benefit-text { display: flex; flex-direction: column; }
.benefit-text strong { font-size: 1rem; font-weight: 600; color: var(--text-black); }
.benefit-text span { font-size: 0.85rem; color: var(--text-gray); margin-top: 2px; }

.info-alert {
    display: flex; align-items: flex-start; gap: 12px;
    background-color: #fbfbfb; border: 1px solid #e5e5e5;
    border-radius: var(--border-radius); padding: 16px; margin-bottom: 32px;
}
.info-alert i { font-size: 1.5rem; color: var(--text-black); }
.info-alert p { font-size: 0.85rem; color: var(--text-gray); margin: 0; }

/* BOTÕES E INPUTS */
.btn-choice {
    background-color: var(--surface-gray); color: var(--text-black); border: none;
    padding: 18px 20px; font-size: 1.05rem; font-weight: 500; border-radius: var(--border-radius);
    cursor: pointer; transition: background-color 0.2s ease; width: 100%;
    margin-bottom: 12px; text-align: left;
}
.btn-choice:hover, .btn-choice:active { background-color: var(--surface-dark); }

.btn-primary, .btn-primary-inline {
    background-color: var(--accent-black); color: var(--accent-white); border: none;
    padding: 18px 20px; font-size: 1.1rem; font-weight: 600; border-radius: var(--border-radius);
    cursor: pointer; text-align: center; width: 100%; margin-top: auto;
}
.btn-primary:active, .btn-primary-inline:active { background-color: #333333; }

.btn-group-row { display: flex; gap: 12px; margin-top: auto; }
.btn-secondary {
    background-color: var(--surface-gray); color: var(--text-black); border: none;
    padding: 18px 20px; font-size: 1.1rem; font-weight: 600; border-radius: var(--border-radius);
    cursor: pointer; flex: 1; text-align: center;
}
.btn-primary-inline { flex: 1; margin-top: 0; }

textarea {
    width: 100%; padding: 16px; background-color: var(--surface-gray);
    border: 2px solid transparent; border-radius: var(--border-radius);
    color: var(--text-black); font-size: 1rem; resize: vertical; min-height: 120px;
}
textarea:focus { outline: none; border-color: var(--accent-black); background-color: var(--bg-white); }
.char-count { text-align: right; font-size: 0.8rem; color: var(--text-gray); margin-top: 4px; }

/* TRAVA 3: Estrutura segura para as colunas não estourarem no iPhone */
.input-row { 
    display: flex; 
    flex-direction: row; 
    width: 100%; 
    gap: 12px; 
    margin-bottom: 24px; 
}
.input-row .input-wrapper { 
    margin-bottom: 0; 
    flex: 1; 
}

.input-wrapper { margin-bottom: 24px; width: 100%; }
.input-wrapper label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-black); font-weight: 500; }
input[type="text"], input[type="email"], input[type="tel"] {
    width: 100%; padding: 16px; background-color: var(--surface-gray);
    border: 2px solid transparent; border-radius: var(--border-radius);
    color: var(--text-black); font-size: 1rem; transition: border-color 0.2s ease;
}
input:focus { outline: none; border-color: var(--accent-black); background-color: var(--bg-white); }
.error-msg { color: var(--error-color); font-size: 0.8rem; margin-top: 6px; display: none; }

/* CHECKBOX */
.checkbox-wrapper { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 32px; }
.checkbox-wrapper input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; width: 24px; height: 24px;
    border: 2px solid #ccc; border-radius: 4px; background-color: var(--bg-white);
    cursor: pointer; position: relative; flex-shrink: 0; margin-top: 2px;
}
.checkbox-wrapper input[type="checkbox"]:checked { background-color: var(--accent-black); border-color: var(--accent-black); }
.checkbox-wrapper input[type="checkbox"]:checked::after { content: "✔"; color: #fff; font-size: 14px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.checkbox-texts { display: flex; flex-direction: column; }
.checkbox-texts label { font-size: 0.85rem; color: var(--text-gray); line-height: 1.4; cursor: pointer; }

/* SWIPE BUTTON */
.swipe-container {
    width: 100%; height: 64px; background-color: var(--surface-gray); border-radius: 100px;
    position: relative; display: flex; align-items: center; justify-content: center;
    margin-top: auto; overflow: hidden; touch-action: pan-y;
}
.swipe-text { color: var(--text-black); font-size: 1.05rem; font-weight: 500; pointer-events: none; z-index: 1; display: flex; align-items: center; gap: 8px; transition: opacity 0.3s ease; }
.swipe-text i { animation: pulse-arrow 1.5s infinite; }
.swipe-btn {
    width: 56px; height: 56px; background-color: var(--accent-black); border-radius: 50%;
    position: absolute; left: 4px; top: 4px; display: flex; justify-content: center; align-items: center;
    cursor: grab; z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.swipe-btn:active { cursor: grabbing; }
.swipe-btn i { color: var(--accent-white); font-size: 1.5rem; font-weight: bold; }
.swipe-transition { transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); }

@keyframes pulse-arrow { 0%, 100% { transform: translateX(0); opacity: 0.3; } 50% { transform: translateX(5px); opacity: 1; } }

.visually-hidden { position: absolute; opacity: 0; pointer-events: none; }
.center-step { justify-content: center; align-items: center; text-align: center; }
.success-circle { width: 80px; height: 80px; background-color: #05a357; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 24px auto; }
.success-circle i { color: #fff; font-size: 2.5rem; font-weight: bold; }
.icon-large { font-size: 4rem; color: var(--text-black); margin-bottom: 24px; }

/* RODAPÉ FIXO COM SAFE AREA PARA iOS */
.uber-footer {
    width: 100%; 
    padding: 12px 24px calc(12px + env(safe-area-inset-bottom)) 24px; 
    background-color: var(--bg-white);
    color: #888888; font-size: 0.75rem; text-align: center; flex-shrink: 0;
    border-top: 1px solid #f0f0f0; z-index: 20;
}
@media (min-width: 768px) {
    .uber-footer { background-color: transparent; border-top: none; }
}