/* =====================================================================
   Panamar — Criar conta (registo). Skin do formulário gerado por
   Form_Utilizador. Mesma linguagem visual do painel de login / conta.
   Markup: views/Utilizadores/form-registo.tpl  ·  Canal: views/registo-page.tpl
   ===================================================================== */

body.panamar-registo { background: #f5f5f5; }
.registo { min-height: 100vh; }

/* Cartão central — padding-top deixa espaço para o header Panamar (position:absolute) */
.registo__wrap { display: flex; justify-content: center; padding: 110px 20px 80px; }
/* Variante centrada verticalmente — para páginas curtas (ex.: recuperar password).
   NÃO usar no registo (form alto, transbordaria). */
.registo--center .registo__wrap { min-height: 100vh; align-items: center; padding-top: 80px; padding-bottom: 80px; }
.registo__card {
    background: #fff; width: min(520px, 100%); border-radius: 8px; padding: 40px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.registo__card--success { text-align: center; }
.registo__success-icon { margin-bottom: 12px; }

.registo__title { margin: 0 0 6px; font-family: 'Spectral', Georgia, serif; font-weight: 400; font-size: 28px; color: #161616; }
.registo__sub { margin: 0 0 28px; font-family: 'Jost', sans-serif; font-size: 13px; color: #808080; line-height: 1.5; }
.registo__card--success .registo__sub { margin-bottom: 24px; }

.registo__alert {
    margin: 0 0 20px; padding: 12px 14px; border-radius: 6px;
    background: #fdeceb; color: #b3261e; font-family: 'Jost', sans-serif; font-size: 13px;
}

/* Campos — o builder emite os inputs; estilizamos genericamente */
.registo__field { margin-bottom: 18px; }
.registo__label { margin-bottom: 4px; padding-left: 12px; font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 400; color: #808080; }
.registo__label label { font-weight: 400; margin: 0; display: inline; }  /* mata o bold do Bootstrap */
/* Marca "(opcional)" — campos sem Goweb_Validate_Required (ver form-registo.tpl) */
.registo__optional { color: #b0b0b0; font-style: italic; }

.registo__control input[type="text"],
.registo__control input[type="email"],
.registo__control input[type="password"],
.registo__control input[type="tel"],
.registo__control input[type="number"],
.registo__control input[type="date"],
.registo__control input:not([type]),
.registo__control select,
.registo__control textarea {
    width: 100%; box-sizing: border-box; margin: 0;
    border: none; border-bottom: 1px solid #ddd; border-radius: 0; box-shadow: none;
    -webkit-appearance: none; appearance: none; background: transparent;
    padding: 10px 0 10px 12px; line-height: 1.4;
    font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 400; color: #161616;
    outline: none; transition: border-color .2s;
}
.registo__control input:focus,
.registo__control select:focus,
.registo__control textarea:focus { border-bottom-color: #161616; }
.registo__control select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23161616' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 6px center; padding-right: 22px;
}

/* Mensagens de validação (próprias + LiveValidation do builder) */
.registo__field-error,
.registo__control .LV_validation_message,
.registo__control .LV_invalid {
    font-family: 'Jost', sans-serif; font-size: 12px; color: #b3261e;
    display: block; margin: 4px 0 0 12px;
    /* o custom.css punha estas mensagens em absolute; sem isto fugiam para o
       canto superior esquerdo da pagina */
    position: static; top: auto; left: auto;
}
.registo__control .LV_valid { color: #5cb85c; }
.registo__control .invalid_img { display: none; }

/* Captcha */
.registo__field--captcha img { display: inline-block; margin: 8px 0; max-width: 100%; border-radius: 4px; vertical-align: middle; }
.registo__field--captcha #refresh_captcha { width: 18px; cursor: pointer; margin-left: 8px; }

/* Botão / rodapé */
.registo__actions { margin-top: 28px; }
.registo__submit {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: #161616; color: #fff; border: none; border-radius: 4px; padding: 14px;
    cursor: pointer; font-family: 'Jost', sans-serif; font-size: 14px; text-align: center;
    transition: background .2s;
}
.registo__submit:hover { background: #333; }
.registo__submit span { color: #fff; }

.registo__foot { margin: 18px 0 0; text-align: center; font-family: 'Jost', sans-serif; font-size: 13px; color: #808080; }
.registo__foot a { color: #161616; text-decoration: underline; }
.registo__foot--forgot { margin: -6px 0 18px; text-align: left; } /* "Esqueci-me da password" na página de login */

@media (max-width: 560px) { .registo__card { padding: 28px 20px; } }

/* ═══════════════════════════════════════════════════════════════════
   Wizard de 2 passos (protótipo RegistoPage)
   ═══════════════════════════════════════════════════════════════════ */

/* Indicador de passos */
.registo__steps { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.registo__step { display: flex; align-items: center; gap: 8px; }
.registo__step-num {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center;
    /* line-height: 1 tira a dependencia do 1.428 herdado do Bootstrap e
       proportional-nums da ao "1" o avanco estreito (por defeito o Jost usa
       figuras tabulares, que deixam o 1 encostado a esquerda do circulo) */
    line-height: 1; font-variant-numeric: proportional-nums;
    border: 1px solid #ccc; background: #fff; color: #808080;
    font-family: 'Jost', sans-serif; font-size: 12px; transition: background .2s, border-color .2s, color .2s;
}
.registo__step-label { font-family: 'Jost', sans-serif; font-size: 12px; color: #808080; transition: color .2s; }
.registo__step.is-active .registo__step-num,
.registo__step.is-done .registo__step-num { background: #161616; border-color: #161616; color: #fff; }
.registo__step.is-active .registo__step-label { color: #161616; }
.registo__step-line { flex: 1; height: 1px; background: #e5e5e5; }

/* Painéis dos passos */
.registo__panel { display: none; }
.registo__panel.is-active { display: block; }
/* Botão "Continuar" (passo 1, direto no painel) precisa de margem própria */
.registo__panel > .registo__submit { margin-top: 28px; }

/* Linha de 2 campos (Nome/Apelido) — empilha no telemóvel */
.registo__row { display: flex; gap: 16px; }
.registo__row .registo__field { flex: 1; min-width: 0; }
@media (max-width: 520px) { .registo__row { flex-direction: column; gap: 0; } }

/* Password: mostrar/ocultar */
.registo__control--pass { position: relative; display: flex; align-items: center; }
.registo__control--pass input { flex: 1; padding-right: 34px; }
.registo__pass-toggle {
    position: absolute; right: 0; background: none; border: none; cursor: pointer;
    color: #808080; display: inline-flex; padding: 4px; transition: color .2s;
}
.registo__pass-toggle:hover, .registo__pass-toggle.is-on { color: #161616; }

/* Dicas de força da password */
.registo__hints { list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.registo__hints li {
    position: relative; padding-left: 18px;
    font-family: 'Jost', sans-serif; font-size: 11px; color: #a0a0a0; transition: color .2s;
}
.registo__hints li::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 12px; height: 12px; border-radius: 50%; border: 1px solid #ccc; box-sizing: border-box;
    transition: background .2s, border-color .2s;
}
.registo__hints li.is-ok { color: #2d6a3f; }
.registo__hints li.is-ok::before {
    border-color: #2d6a3f;
    background: #2d6a3f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 14 14'%3E%3Cpath d='M2 7l3.5 3.5L12 3' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/8px no-repeat;
}

/* Termos */
.registo__terms { margin: 18px 0 0; font-family: 'Jost', sans-serif; font-size: 11px; color: #a0a0a0; line-height: 1.5; }

/* Ações do passo 2: Voltar + Criar conta lado a lado */
.registo__actions { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.registo__actions .registo__submit { flex: 1; margin: 0; }
.registo__back {
    background: none; border: none; cursor: pointer; padding: 14px 4px; white-space: nowrap;
    font-family: 'Jost', sans-serif; font-size: 14px; color: #808080; transition: color .2s;
}
.registo__back:hover { color: #161616; }

/* Campos do modelo não usados (submetem mas não se mostram) */
.registo__hidden { display: none; }

/* Input inválido (validação client-side do passo 1) */
.registo__control input.is-invalid { border-bottom-color: #b3261e; }

/* Ecrã de sucesso: 2 CTAs empilhados */
.registo__success-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.registo__back--cta {
    display: block; text-align: center; padding: 13px; border: 1px solid #161616; border-radius: 4px;
    color: #161616; font-family: 'Jost', sans-serif; font-size: 14px; transition: background .2s, color .2s;
}
.registo__back--cta:hover { background: #161616; color: #fff; }
