/* ============================================================
   EduJA — Secure Client Portal Stylesheet
   Matches the Jamaican black / green / gold brand identity used
   throughout css/style.css
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; }

body.portal-body {
    background: radial-gradient(circle at 0% 30%, #000000 0%, #006633 45%, #FDB827 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
}

.portal-wrap { width: 100%; max-width: 460px; }

.portal-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.portal-logo a {
    display: inline-flex;
    align-items: center;
    background: #000000cc;
    padding: 6px 20px;
    border-radius: 40px;
    text-decoration: none;
}
.portal-logo .edu { color: #FDB827; font-weight: 800; font-size: 22px; }
.portal-logo .ja { color: #00cc66; background: #000000aa; padding: 0 6px; border-radius: 30px; margin-left: 3px; font-weight: 800; font-size: 22px; }

.portal-tagline {
    text-align: center;
    color: #FDB827;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 18px;
    opacity: 0.9;
}
.portal-tagline .lock { margin-right: 4px; }

.portal-card {
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    border-radius: 20px;
    border: 1px solid rgba(253, 184, 39, 0.35);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.portal-config-banner {
    display: none;
    background: #7a1f1f;
    color: #ffe3e3;
    font-size: 0.75rem;
    padding: 10px 16px;
    text-align: center;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.portal-config-banner.show { display: block; }

.portal-tabs {
    display: flex;
    background: #0a0f0f;
    border-bottom: 2px solid #FDB827;
}
.portal-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #9fb0a5;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 14px 6px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: 0.2s;
}
.portal-tab.active { color: #FDB827; background: rgba(253,184,39,0.08); }
.portal-tab:hover { color: #FDB827; }

.portal-panel { display: none; padding: 26px 22px 24px; }
.portal-panel.active { display: block; animation: portalFadeIn 0.25s ease; }
@keyframes portalFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.portal-panel h2 { color: #FDB827; font-size: 1.3rem; margin-bottom: 4px; }
.portal-panel .portal-sub { color: #d7ded9; font-size: 0.82rem; margin-bottom: 18px; line-height: 1.4; }

.field-group { margin-bottom: 14px; }
.field-label { display: block; color: #c9d4cd; font-size: 0.75rem; font-weight: 600; margin-bottom: 5px; }

.mode-toggle { display: flex; gap: 6px; margin-bottom: 14px; background: #12181a; border-radius: 30px; padding: 4px; }
.mode-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    color: #9fb0a5;
    padding: 8px 6px;
    border-radius: 26px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.mode-toggle button.active { background: #FDB827; color: #000; }

.input-wrap { position: relative; }
.portal-input {
    width: 100%;
    background: #12181a;
    border: 1px solid #2a3a2a;
    color: #f2f6f3;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    outline: none;
    transition: 0.15s;
}
.portal-input:focus { border-color: #FDB827; box-shadow: 0 0 0 2px rgba(253,184,39,0.2); }
.portal-input.pw-input { padding-right: 42px; }
.portal-input::placeholder { color: #6b7a70; }

.pw-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px 8px;
    color: #9fb0a5;
    line-height: 1;
}
.pw-toggle-btn:hover { color: #FDB827; }

.field-error { color: #ff8080; font-size: 0.72rem; margin-top: 4px; display: none; }
.field-error.show { display: block; }

.field-optional { color: #7c8c81; font-weight: 400; text-transform: none; letter-spacing: 0; }
.field-hint { color: #7c8c81; font-size: 0.7rem; margin-top: 5px; line-height: 1.4; }

select.portal-input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239fb0a5' stroke-width='1.5' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
select.portal-input option { background: #12181a; color: #f2f6f3; }

.phone-input-row { display: flex; gap: 8px; }
.phone-input-row .phone-area-code { flex: 0 0 70px; text-align: center; }
.phone-input-row .country-picker { flex: 0 0 190px; position: relative; }
.phone-input-row .phone-number { flex: 1; }

.field-hidden { display: none; }

.country-picker-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #12181a;
    border: 1px solid #2a3a2a;
    border-radius: 10px;
    max-height: 190px;
    overflow-y: auto;
    list-style: none;
    z-index: 30;
    box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}
.country-picker-list[hidden] { display: none; }
.country-picker-list li { padding: 8px 12px; font-size: 0.78rem; color: #f2f6f3; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.country-picker-list li .dial { color: #9fb0a5; }
.country-picker-list li:hover, .country-picker-list li.active { background: rgba(253,184,39,0.15); }
.country-picker-list .no-match { color: #7c8c81; cursor: default; }
.country-picker-list .no-match:hover { background: none; }

.pw-strength-meter { height: 5px; background: #12181a; border-radius: 4px; margin-top: 8px; overflow: hidden; }
.pw-strength-fill { height: 100%; width: 0%; background: #b91c1c; transition: 0.2s ease; }
.pw-strength-label { font-size: 0.68rem; color: #7c8c81; margin-top: 3px; }

.row-between .portal-submit { width: auto; flex: 1; }

.pw-rules { list-style: none; margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.pw-rules li { font-size: 0.7rem; color: #7c8c81; transition: 0.15s; }
.pw-rules li::before { content: "○ "; }
.pw-rules li.met { color: #4ee08a; }
.pw-rules li.met::before { content: "✓ "; }

.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.remember-row { display: flex; align-items: center; gap: 7px; }
.remember-row input[type="checkbox"], .optout-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: #FDB827; cursor: pointer; }
.remember-row label, .optout-row label { color: #c9d4cd; font-size: 0.72rem; cursor: pointer; }
.link-btn { background: none; border: none; color: #FDB827; font-size: 0.75rem; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }
.link-btn:hover { color: #ffd35c; }

.optout-row { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 18px; }
.optout-row label { line-height: 1.4; }

.portal-submit {
    width: 100%;
    background: #FDB827;
    color: #000;
    border: none;
    padding: 13px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    transition: 0.2s;
}
.portal-submit:hover:not(:disabled) { background: #ffd35c; }
.portal-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.portal-switch { text-align: center; color: #9fb0a5; font-size: 0.78rem; margin-top: 16px; }

.portal-status { display: none; margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 0.78rem; line-height: 1.4; }
.portal-status.show { display: block; }
.portal-status.success { background: rgba(0, 204, 102, 0.14); border: 1px solid #00cc66; color: #b6ffd8; }
.portal-status.error { background: rgba(185, 28, 28, 0.18); border: 1px solid #b91c1c; color: #ffc4c4; }
.portal-status.info { background: rgba(253, 184, 39, 0.12); border: 1px solid #FDB827; color: #ffe9b8; }

.captcha-holder { margin-bottom: 16px; min-height: 65px; display: flex; align-items: center; justify-content: center; }
.captcha-fallback { font-size: 0.7rem; color: #7c8c81; text-align: center; border: 1px dashed #3a4a3f; border-radius: 10px; padding: 10px; width: 100%; }

.recovery-actions { display: flex; flex-direction: column; gap: 10px; }
.portal-submit.secondary { background: transparent; border: 1px solid #FDB827; color: #FDB827; }
.portal-submit.secondary:hover:not(:disabled) { background: rgba(253,184,39,0.1); }

.trust-note { text-align: center; font-size: 0.68rem; color: #7c8c81; margin-top: 16px; line-height: 1.5; }

.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(0,0,0,0.3); border-top-color: #000; border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 6px; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .portal-panel { padding: 22px 16px 20px; }
    .pw-rules { grid-template-columns: 1fr; }
}

/* Floating WhatsApp click-to-chat button — lets a visitor reach EduJA
   directly, before they've even created an account. Fixed to the
   viewport so it stays reachable while scrolling a long form. */
.whatsapp-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    z-index: 50;
    transition: transform 0.15s ease;
    text-decoration: none;
}
.whatsapp-fab:hover, .whatsapp-fab:focus-visible { transform: scale(1.08); }
