/* ── eLearning Registration Plugin – Frontend Styles ── */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Fraunces:wght@700;900&display=swap');

:root {
    --elr-primary:    #0057ff;
    --elr-primary-dk: #003ecc;
    --elr-tutor:      #7c3aed;
    --elr-tutor-dk:   #5b21b6;
    --elr-student:    #059669;
    --elr-student-dk: #047857;
    --elr-bg:         #f8faff;
    --elr-border:     #dde3f0;
    --elr-text:       #1e293b;
    --elr-muted:      #64748b;
    --elr-radius:     14px;
    --elr-shadow:     0 8px 40px rgba(0,0,0,.10);
    --elr-font:       'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ── Wrapper ── */
.elr-wrap {
    font-family: var(--elr-font);
    max-width: 760px;
    margin: 40px auto;
    padding: 0 16px;
    color: var(--elr-text);
}
.elr-tutor-wrap { max-width: 860px; }

.elr-card {
    background: #fff;
    border-radius: var(--elr-radius);
    box-shadow: var(--elr-shadow);
    overflow: hidden;
}

/* ── Card Header ── */
.elr-card-header {
    padding: 36px 44px 28px;
    position: relative;
    overflow: hidden;
}
.elr-header-student { background: linear-gradient(135deg, #059669 0%, #06b6d4 100%); }
.elr-header-tutor   { background: linear-gradient(135deg, #7c3aed 0%, #0057ff 100%); }

.elr-card-header::before {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.elr-card-header h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 900;
    color: #fff;
    margin: 8px 0 6px;
}
.elr-card-header p {
    color: rgba(255,255,255,.88);
    margin: 0;
    font-size: .93rem;
}
.elr-badge {
    display: inline-block;
    background: rgba(255,255,255,.22);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,.35);
}

/* ── Card Body ── */
.elr-card-body { padding: 36px 44px 44px; }

/* ── Progress Bar ── */
.elr-progress-bar {
    height: 5px;
    background: var(--elr-border);
    border-radius: 100px;
    margin-bottom: 18px;
    overflow: hidden;
}
.elr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--elr-tutor), var(--elr-primary));
    border-radius: 100px;
    width: 25%;
    transition: width .4s ease;
}

/* ── Steps Navigation ── */
.elr-steps-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.elr-step-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--elr-muted);
    padding: 5px 14px;
    border-radius: 100px;
    background: var(--elr-bg);
    border: 1.5px solid var(--elr-border);
    transition: all .25s;
    cursor: default;
}
.elr-step-label.active {
    color: var(--elr-tutor);
    border-color: var(--elr-tutor);
    background: rgba(124,58,237,.07);
}

/* ── Step Title ── */
.elr-step-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--elr-text);
    margin: 0 0 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--elr-border);
}

/* ── Fields ── */
.elr-field { margin-bottom: 18px; }
.elr-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--elr-text);
    margin-bottom: 6px;
    letter-spacing: .01em;
}
.req { color: #ef4444; margin-left: 2px; }
.elr-hint {
    font-size: .76rem;
    color: var(--elr-muted);
    font-weight: 400;
}

.elr-field input[type="text"],
.elr-field input[type="email"],
.elr-field input[type="tel"],
.elr-field input[type="url"],
.elr-field input[type="number"],
.elr-field input[type="date"],
.elr-field input[type="password"],
.elr-field input[type="file"],
.elr-field textarea,
.elr-field select {
    width: 100%;
    padding: 10px 14px;
    font-size: .9rem;
    font-family: var(--elr-font);
    color: var(--elr-text);
    background: #fff;
    border: 1.5px solid var(--elr-border);
    border-radius: 8px;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    appearance: none;
}
.elr-field input:focus,
.elr-field textarea:focus,
.elr-field select:focus {
    outline: none;
    border-color: var(--elr-primary);
    box-shadow: 0 0 0 3px rgba(0,87,255,.12);
}
.elr-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.elr-field textarea { resize: vertical; }

/* ── Password toggle ── */
.elr-pw-wrap { position: relative; }
.elr-pw-wrap input { padding-right: 44px; }
.elr-pw-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--elr-muted);
    padding: 4px;
}

/* ── Grids ── */
.elr-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.elr-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 600px) {
    .elr-grid-2, .elr-grid-3 { grid-template-columns: 1fr; }
    .elr-card-body, .elr-card-header { padding: 24px 20px; }
}

/* ── Checkbox Grid (subjects) ── */
.elr-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    padding: 14px;
    background: var(--elr-bg);
    border: 1.5px solid var(--elr-border);
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
}
.elr-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    color: var(--elr-text);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background .15s;
}
.elr-check-label:hover { background: rgba(0,87,255,.06); }
.elr-check-label input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--elr-primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Checkbox (single agree) ── */
.elr-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .85rem;
    color: var(--elr-muted);
    cursor: pointer;
    font-weight: 400;
}
.elr-checkbox input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--elr-primary);
    flex-shrink: 0;
    margin-top: 2px;
}
.elr-checkbox a { color: var(--elr-primary); }

/* ── Captcha ── */
.elr-captcha-field { background: #fffbf0; border: 1.5px solid #fde68a; border-radius: 8px; padding: 14px; }
.elr-captcha-input { max-width: 120px !important; }

/* ── Char counter ── */
.elr-char-count { font-size: .75rem; color: var(--elr-muted); display: block; text-align: right; margin-top: 4px; }

/* ── Info box ── */
.elr-info-box {
    background: rgba(0,87,255,.05);
    border: 1.5px solid rgba(0,87,255,.18);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: .86rem;
}
.elr-info-box strong { display: block; margin-bottom: 6px; color: var(--elr-primary); }
.elr-info-box p { margin: 0; color: var(--elr-muted); }

/* ── Step Nav buttons ── */
.elr-step-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1.5px solid var(--elr-border);
}
.elr-step-nav .elr-btn-next { margin-left: auto; }

/* ── Buttons ── */
.elr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: .9rem;
    font-weight: 700;
    font-family: var(--elr-font);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: all .22s;
    text-decoration: none;
}
.elr-btn-student {
    width: 100%;
    justify-content: center;
    background: linear-gradient(135deg, #059669, #06b6d4);
    color: #fff;
    box-shadow: 0 4px 18px rgba(5,150,105,.3);
}
.elr-btn-tutor {
    background: linear-gradient(135deg, var(--elr-tutor), var(--elr-primary));
    color: #fff;
    box-shadow: 0 4px 18px rgba(124,58,237,.28);
}
.elr-btn-next {
    background: var(--elr-primary);
    color: #fff;
    box-shadow: 0 3px 12px rgba(0,87,255,.25);
}
.elr-btn-back {
    background: var(--elr-bg);
    color: var(--elr-muted);
    border: 1.5px solid var(--elr-border);
}
.elr-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.elr-btn:active { transform: translateY(0); }
.elr-btn-spinner { animation: elr-spin .8s linear infinite; }
@keyframes elr-spin { to { transform: rotate(360deg); } }

/* ── Messages ── */
.elr-msg {
    padding: 14px 18px;
    border-radius: 9px;
    font-size: .88rem;
    font-weight: 500;
    margin-bottom: 22px;
}
.elr-msg.success { background: #ecfdf5; border: 1.5px solid #6ee7b7; color: #065f46; }
.elr-msg.error   { background: #fef2f2; border: 1.5px solid #fca5a5; color: #991b1b; }

/* ── Login link ── */
.elr-login-link { text-align: center; font-size: .84rem; color: var(--elr-muted); margin-top: 18px; }
.elr-login-link a { color: var(--elr-primary); font-weight: 600; }

/* ── Login link (Tutor) ── */
.elr-login-link-tutor { text-align: center; font-size: .84rem; color: var(--elr-bg); margin-top: 18px; }
.elr-login-link-tutor a { color: var(--elr-bg); font-weight: 600; }

/* ── Honeypot ── */
.elr-hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; }

/* ── Notice (already logged in) ── */
.elr-notice { text-align: center; padding: 24px; font-size: 1rem; color: var(--elr-muted); }
