/* ==========================================================================
   Juntos pelo Rim - Frontend
   Paleta: azul Fresenius #003C7E, amarelo CTA #FBC02D
   ========================================================================== */

:root {
    --jpr-azul: #003C7E;
    --jpr-azul-claro: #1565C0;
    --jpr-amarelo: #FBC02D;
    --jpr-cinza-bg: #F5F5F5;
    --jpr-cinza-borda: #E0E0E0;
    --jpr-erro: #D32F2F;
    --jpr-sucesso: #388E3C;
}

.jpr-wrap { max-width: 1200px; margin: 24px auto; padding: 0 16px; font-family: inherit; color: #333; }
.jpr-wrap h1 { color: var(--jpr-azul); font-size: 32px; margin-bottom: 8px; }
.jpr-wrap h2 { color: var(--jpr-azul); font-size: 24px; margin: 24px 0 12px; }
.jpr-aviso { color: var(--jpr-azul); font-size: 14px; margin-bottom: 16px; }

/* Header da página de cadastro com link "Já tenho cadastro" */
.jpr-cadastro-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.jpr-cadastro-header h1 { margin: 0; }
.jpr-link-login { color: var(--jpr-azul); text-decoration: none; font-weight: 600; font-size: 15px; }
.jpr-link-login:hover { text-decoration: underline; }
.jpr-form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.jpr-btn-link { color: var(--jpr-azul); text-decoration: none; font-size: 15px; }
.jpr-btn-link:hover { text-decoration: underline; }

/* Form */
.jpr-form { display: block; }
.jpr-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jpr-grid-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 720px) {
    .jpr-grid-2col, .jpr-grid-3col { grid-template-columns: 1fr; }
}
.jpr-form input[type=text],
.jpr-form input[type=email],
.jpr-form input[type=password],
.jpr-form input[type=date],
.jpr-form select {
    width: 100%;
    padding: 14px 12px;
    background: var(--jpr-cinza-bg);
    border: 0;
    border-left: 4px solid var(--jpr-azul);
    border-radius: 2px;
    font-size: 15px;
    box-sizing: border-box;
}
.jpr-form input:focus, .jpr-form select:focus { outline: 2px solid var(--jpr-azul); }
.jpr-form .jpr-erro-inline { color: var(--jpr-erro); font-size: 13px; margin: 4px 0 0; }
.jpr-form label.jpr-check { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0; font-size: 15px; }
.jpr-form label.jpr-check input { width: 18px; height: 18px; }

/* Botões */
.jpr-btn { display: inline-block; padding: 12px 28px; border: 0; border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; transition: opacity 0.2s; }
.jpr-btn:hover { opacity: 0.9; }
.jpr-btn-primario { background: var(--jpr-azul); color: #fff; }
.jpr-btn-amarelo { background: var(--jpr-amarelo); color: var(--jpr-azul); font-weight: 700; }
.jpr-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Cards (página inicial) */
.jpr-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin: 32px 0; }
@media (max-width: 900px) { .jpr-cards { grid-template-columns: 1fr; } }
.jpr-card { background: var(--jpr-cinza-bg); border-radius: 8px; padding: 24px; text-align: center; }
.jpr-card h3 { color: var(--jpr-azul); margin: 0 0 12px; }
.jpr-card p { color: #555; margin: 0 0 16px; font-size: 14px; }

/* Login inline (estilo aproximado do card Elementor original) */
.jpr-login-inline { text-align: center; padding: 28px 24px; }
.jpr-login-inline h3 { color: var(--jpr-azul); font-size: 22px; font-weight: 700; margin: 0 0 18px; text-align: center; }
.jpr-login-inline form { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 0 auto; }
.jpr-login-inline input[type=text],
.jpr-login-inline input[type=password] {
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-left: 1px solid #d1d5db; /* sobrescreve a borda azul global */
    border-radius: 6px;
    font-size: 14px;
    color: #555;
    box-sizing: border-box;
}
.jpr-login-inline input:focus { outline: none; border-color: var(--jpr-azul); }
.jpr-login-inline a.jpr-link-esqueci {
    display: block; font-size: 13px; color: var(--jpr-azul); font-weight: 400;
    text-decoration: none; margin: 4px 0 6px; text-align: center;
}
.jpr-login-inline a.jpr-link-esqueci:hover { text-decoration: underline; }
.jpr-login-inline button[type=submit] {
    align-self: center;
    background: transparent;
    color: var(--jpr-azul);
    border: 2px solid var(--jpr-azul);
    border-radius: 4px;
    padding: 10px 36px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.jpr-login-inline button[type=submit]:hover { background: var(--jpr-azul); color: #fff; }
.jpr-login-inline #jpr-login-msg { font-size: 13px; }

/* Gerar cupom */
.jpr-gerar-cupom .jpr-sair { font-size: 14px; color: var(--jpr-azul); text-decoration: none; }
.jpr-gerar-cupom-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .jpr-gerar-cupom-grid { grid-template-columns: 1fr; } }
.jpr-gerar-cupom dl { display: grid; grid-template-columns: 120px 1fr; row-gap: 8px; column-gap: 16px; margin: 24px 0; max-width: 600px; }
.jpr-gerar-cupom dt { font-weight: bold; color: #555; text-align: right; }
.jpr-gerar-cupom dd { margin: 0; color: #333; }
.jpr-gerar-cupom #jpr-mensagem { margin-top: 16px; padding: 12px; border-radius: 4px; }
.jpr-gerar-cupom .jpr-msg-erro    { background: #FFEBEE; color: var(--jpr-erro); }
.jpr-gerar-cupom .jpr-msg-sucesso { background: #E8F5E9; color: var(--jpr-sucesso); }

/* CTA Compra (caixa amarela) */
.jpr-cta-compra { background: var(--jpr-amarelo); padding: 28px 24px; border-radius: 16px; text-align: center; }
.jpr-cta-compra p { color: #1a1a1a; font-size: 15px; line-height: 1.5; margin: 0 0 20px; }
.jpr-cta-compra .jpr-btn { display: inline-block; }

/* Mensagens gerais do form */
#jpr-form-msg, #jpr-login-msg, #jpr-esqueci-msg, #jpr-redefinir-msg, #jpr-esqueci-modal-msg {
    margin-top: 16px; padding: 12px; border-radius: 4px;
}
.jpr-msg-erro    { background: #FFEBEE; color: var(--jpr-erro); }
.jpr-msg-sucesso { background: #E8F5E9; color: var(--jpr-sucesso); }

/* Modal Esqueci Senha */
.jpr-modal { display: none; position: fixed; inset: 0; z-index: 99999; }
.jpr-modal.jpr-modal-open { display: block; }
.jpr-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); animation: jprFadeIn 0.18s ease-out; }
.jpr-modal-content {
    position: relative; max-width: 460px; width: calc(100% - 32px);
    margin: 8vh auto 0; background: #fff; border-radius: 12px; padding: 32px 28px 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); animation: jprSlideIn 0.22s ease-out;
}
.jpr-modal-content h3 { margin: 0 0 8px; color: var(--jpr-azul); font-size: 22px; }
.jpr-modal-content p { margin: 0 0 16px; color: #555; font-size: 14px; line-height: 1.5; }
.jpr-modal-content input[type=text] {
    width: 100%; padding: 14px 12px; background: var(--jpr-cinza-bg);
    border: 0; border-left: 4px solid var(--jpr-azul); border-radius: 2px;
    font-size: 15px; box-sizing: border-box;
}
.jpr-modal-close {
    position: absolute; top: 8px; right: 12px; background: none; border: 0;
    font-size: 28px; line-height: 1; color: #999; cursor: pointer; padding: 4px 10px;
}
.jpr-modal-close:hover { color: #333; }
.jpr-modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; }
@keyframes jprFadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes jprSlideIn { from { opacity: 0; transform: translateY(-12px) } to { opacity: 1; transform: translateY(0) } }
