/**
 * Engeduca Auth Frontend - Layout Minimalista
 * v4.1.0 - direcionamento cliente 08/05/2026
 *
 * Foco: conversao, simplicidade, fundo neutro, formulario centralizado.
 * SEM gradiente azul, SEM background pattern (decisao arquitetural do cliente).
 */

/* ====== Reset minimalista no escopo do auth ====== */
.engeduca-auth-wrap *,
.engeduca-auth-wrap *::before,
.engeduca-auth-wrap *::after {
    box-sizing: border-box;
}

/* ====== Suprime titulos/breadcrumbs duplicados do template Elementor nas paginas auth ====== */
/* Aplica em paginas com body class .engeduca-auth-page (setada pelo plugin engeduca-auth-frontend.php) */
.engeduca-auth-page .elementor-widget-theme-post-title,
.engeduca-auth-page .elementor-widget-heading h1.elementor-heading-title:empty,
.engeduca-auth-page .elementor-element .elementor-heading-title:empty {
    display: none !important;
}

/* Reduz margem extra dos containers Elementor que continham o titulo removido */
.engeduca-auth-page .elementor-section-wrap > .elementor-section:first-child:has(.elementor-heading-title:empty) {
    padding-top: 0;
    padding-bottom: 0;
}

/* ====== Container principal: fundo neutro full-viewport ====== */
.engeduca-auth-wrap {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #fafafa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ====== Card central ====== */
.engeduca-auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 12px;
    padding: 48px 40px 40px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 12px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid #ececec;
}

.engeduca-auth-card-wide {
    max-width: 480px;
}

/* ====== Logo texto Enge+duca ====== */
.engeduca-auth-logo {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    color: #1a2744;
    line-height: 1;
}

.engeduca-auth-logo span {
    color: #B85510; /* v1.1.0 RODADA 2 a11y: era #f08c2e (2.47:1), agora B85510 (4.51:1 sobre branco WCAG AA) */
}

/* ====== Heading e subheading ====== */
.engeduca-auth-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-align: left;
}

.engeduca-auth-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 28px;
    line-height: 1.5;
    text-align: left;
}

/* ====== Mensagens de feedback ====== */
.engeduca-auth-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
}

.engeduca-auth-msg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.engeduca-auth-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.engeduca-auth-msg a {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

/* ====== Formulario ====== */
.engeduca-auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.engeduca-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.engeduca-auth-field label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.engeduca-auth-hint {
    color: #595959; /* v1.1.0 RODADA 2 a11y: era #9ca3af (2.53:1), agora 595959 (7.0:1 sobre branco WCAG AA) */
    font-weight: 400;
    font-size: 12px;
}

.engeduca-auth-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.engeduca-auth-field input:focus {
    outline: none;
    border-color: #f08c2e;
    box-shadow: 0 0 0 3px rgba(240, 140, 46, 0.15);
}

.engeduca-auth-field input::placeholder {
    color: #9ca3af;
}

.engeduca-auth-field input:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Grid 2 colunas (nome + sobrenome) */
.engeduca-auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ====== Linha lembrar-de-mim + esqueci-senha ====== */
.engeduca-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
    margin-bottom: 4px;
}

.engeduca-auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
}

.engeduca-auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #f08c2e;
    cursor: pointer;
}

.engeduca-auth-link-sm {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.engeduca-auth-link-sm:hover,
.engeduca-auth-link-sm:focus {
    color: #f08c2e;
    text-decoration: underline;
}

/* ====== Botao primario destaque ======
 * Especificidade aumentada (.engeduca-auth-card .engeduca-auth-btn-primary) para
 * vencer regras [type=submit], button do tema hello-elementor que pintariam de rosa.
 */
.engeduca-auth-card .engeduca-auth-btn-primary,
button.engeduca-auth-btn-primary {
    width: 100%;
    height: 48px;
    background: #f08c2e !important;
    color: #1a1a1a !important; /* v1.1.0 RODADA 2 a11y: era #ffffff (2.47:1 sobre laranja), agora 1a1a1a (7.2:1 WCAG AA) */
    border: none !important;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700; /* v1.1.0 - bumped 600 -> 700 para reforco visual */
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    font-family: inherit;
    letter-spacing: 0.01em;
    margin-top: 8px;
    text-shadow: none;
    box-shadow: none;
}

.engeduca-auth-card .engeduca-auth-btn-primary:hover,
button.engeduca-auth-btn-primary:hover {
    background: #d97a23 !important;
    color: #ffffff !important;
}

.engeduca-auth-card .engeduca-auth-btn-primary:active,
button.engeduca-auth-btn-primary:active {
    transform: translateY(1px);
}

.engeduca-auth-card .engeduca-auth-btn-primary:focus,
button.engeduca-auth-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 140, 46, 0.35);
}

.engeduca-auth-card .engeduca-auth-btn-primary:disabled,
button.engeduca-auth-btn-primary:disabled {
    background: #d1d5db !important;
    cursor: not-allowed;
}

/* ====== Footer texto + link ====== */
.engeduca-auth-footer-text {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 28px 0 0;
    line-height: 1.5;
}

.engeduca-auth-link {
    color: #B85510; /* v1.1.0 RODADA 2 a11y: era #f08c2e (2.47:1), agora B85510 (4.51:1 sobre branco WCAG AA) */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.engeduca-auth-link:hover,
.engeduca-auth-link:focus {
    color: #9C4A0E; /* v1.1.0 RODADA 2 a11y: era #d97a23, agora escuro mais alto contrast */
    text-decoration: underline;
}

/* ====== Esconder elementos potencialmente conflitantes do tema/Elementor ====== */
.engeduca-auth-wrap .elementor-element[data-element_type="container"] {
    /* Garante que nao fique sobrescrito por containers Elementor herdados */
}

/* ====== Responsivo - Tablet ====== */
@media (max-width: 768px) {
    .engeduca-auth-wrap {
        padding: 32px 16px;
        min-height: calc(100vh - 60px);
    }

    .engeduca-auth-card {
        padding: 36px 28px 32px;
        max-width: 100%;
    }

    .engeduca-auth-card-wide {
        max-width: 100%;
    }

    .engeduca-auth-title {
        font-size: 22px;
    }
}

/* ====== Responsivo - Mobile ====== */
@media (max-width: 480px) {
    .engeduca-auth-wrap {
        padding: 24px 12px;
    }

    .engeduca-auth-card {
        padding: 32px 20px 28px;
        border-radius: 10px;
    }

    .engeduca-auth-logo {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .engeduca-auth-title {
        font-size: 20px;
    }

    .engeduca-auth-sub {
        font-size: 13px;
        margin-bottom: 22px;
    }

    .engeduca-auth-grid-2 {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .engeduca-auth-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .engeduca-auth-field input {
        font-size: 16px; /* evita zoom do iOS no focus */
    }
}

/* ====== Dark mode (respeita preferencia do sistema, opt-in) ====== */
@media (prefers-color-scheme: dark) {
    body.engeduca-auth-dark .engeduca-auth-wrap {
        background: #0f172a;
        color: #e5e7eb;
    }

    body.engeduca-auth-dark .engeduca-auth-card {
        background: #1e293b;
        border-color: #334155;
    }

    body.engeduca-auth-dark .engeduca-auth-title {
        color: #f9fafb;
    }

    body.engeduca-auth-dark .engeduca-auth-sub,
    body.engeduca-auth-dark .engeduca-auth-footer-text,
    body.engeduca-auth-dark .engeduca-auth-link-sm {
        color: #94a3b8;
    }

    body.engeduca-auth-dark .engeduca-auth-field input {
        background: #0f172a;
        border-color: #334155;
        color: #e5e7eb;
    }
}
