/**
 * layout-improved.css - Melhorias no layout geral do formulário
 * Versão: 1.0
 */

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    max-width: 540px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
}

.progress-step {
    flex: 1;
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    transition: background 0.4s ease;
}

.progress-step.active {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.progress-step.done {
    background: var(--green);
}

/* ===== INTRO ===== */
.intro {
    text-align: center;
    margin-bottom: 32px;
}

.intro h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text);
}

.intro h1 span {
    color: var(--accent);
    display: block;
}

.intro p {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ===== STEP CARD ===== */
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    margin-bottom: 20px;
    animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== STEP TITLE ===== */
.step-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.step-title .num {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== STEP SUBTITLE ===== */
.step-subtitle {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 20px;
    padding-left: 44px;
    line-height: 1.5;
}

/* ===== FORM GROUP ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    min-height: 160px;
    resize: vertical;
    line-height: 1.6;
}

/* ===== TEXT COUNTER ===== */
.text-counter {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-dim);
}

.text-counter .palavras {
    font-weight: 600;
    color: var(--text);
}

.text-counter .duracao {
    color: var(--blue);
    font-weight: 600;
}

/* ===== CALCULO BOX ===== */
.calculo-box {
    display: none;
    background: var(--bg-input);
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 14px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.calculo-box.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calc-valor {
    font-family: 'Space Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 6px;
}

.calc-duracao {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.calc-creditos {
    font-size: 12px;
    color: var(--blue);
}

/* ===== OPTIONS GRID ===== */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.option-card {
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.option-card:hover {
    border-color: var(--text-muted);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: var(--accent);
    background: var(--accent-glow);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.opt-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.opt-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.opt-desc {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.4;
}

/* ===== TIP BOX ===== */
.tip-box {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--blue);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.tip-box i {
    color: var(--blue);
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 14px;
}

/* ===== RESUMO ===== */
.resumo-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.resumo-item:last-child {
    border-bottom: none;
}

.resumo-item .rlabel {
    color: var(--text-dim);
    font-weight: 500;
}

.resumo-item .rvalue {
    font-weight: 700;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
    color: var(--text);
}

.resumo-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    margin-top: 20px;
}

.resumo-total .rlabel {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.resumo-total .rvalue {
    font-family: 'Space Mono', monospace;
    font-size: 26px;
    font-weight: 700;
    color: var(--green);
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }

    .progress-bar {
        gap: 4px;
        margin-bottom: 24px;
    }

    .intro {
        margin-bottom: 24px;
    }

    .intro h1 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .intro p {
        font-size: 13px;
    }

    .step-card {
        padding: 16px 14px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .step-title {
        font-size: 16px;
        gap: 10px;
        margin-bottom: 6px;
    }

    .step-title .num {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .step-subtitle {
        font-size: 12px;
        padding-left: 38px;
        margin-bottom: 16px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px;
        border-radius: 8px;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .option-card {
        padding: 14px;
    }

    .opt-icon {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .opt-name {
        font-size: 13px;
    }

    .opt-desc {
        font-size: 10px;
    }

    .calculo-box {
        padding: 12px;
        margin-top: 12px;
    }

    .calc-valor {
        font-size: 20px;
    }

    .resumo-total {
        padding: 14px;
        margin-top: 16px;
    }

    .resumo-total .rlabel {
        font-size: 14px;
    }

    .resumo-total .rvalue {
        font-size: 22px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 20px 18px;
    }

    .step-card {
        padding: 20px 18px;
    }

    .options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (min-width: 769px) {
    .container {
        max-width: 600px;
        padding: 32px 24px;
    }

    .progress-bar {
        margin-bottom: 32px;
    }

    .intro {
        margin-bottom: 40px;
    }

    .intro h1 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .intro p {
        font-size: 15px;
    }

    .step-card {
        padding: 28px 24px;
        margin-bottom: 24px;
        border-radius: 16px;
    }

    .step-title {
        font-size: 20px;
        gap: 14px;
        margin-bottom: 10px;
    }

    .step-title .num {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .step-subtitle {
        font-size: 14px;
        padding-left: 50px;
        margin-bottom: 24px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-input {
        padding: 16px 18px;
        font-size: 16px;
    }

    .options-grid {
        gap: 14px;
    }

    .option-card {
        padding: 18px;
    }

    .opt-icon {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .opt-name {
        font-size: 15px;
    }

    .opt-desc {
        font-size: 12px;
    }

    .resumo-total {
        padding: 18px;
    }

    .resumo-total .rlabel {
        font-size: 18px;
    }

    .resumo-total .rvalue {
        font-size: 28px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 700px;
        padding: 40px 32px;
    }

    .step-card {
        padding: 32px 28px;
    }
}
