/* ==========================================================================
   MEMBER-AUTH.CSS — Shared member login/register styles
   Uses design tokens from base.css
   ========================================================================== */

/* ── Member Apply Page ── */
.member-apply .dd-apply-stage-wrap { position: relative; text-align: center; margin-bottom: 1.5rem; }
.member-apply .dd-apply-card-stage { position: relative; display: inline-block; }
.member-apply .dd-apply-glow { position: absolute; inset: -30px; background: radial-gradient(circle, rgba(255, 107, 53, 0.18) 0%, transparent 70%); border-radius: 50%; z-index: 0; pointer-events: none; }
.member-apply .dd-apply-card-img { position: relative; z-index: 1; max-width: 280px; width: 100%; filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.25)); }

.member-apply .dd-perk-row { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.member-apply .dd-perk-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--secondary-10); border: 1px solid var(--secondary-25); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.15rem; color: #fff; }
.member-apply .dd-perk-text strong { display: block; font-size: 0.92rem; color: #fff; margin-bottom: 2px; }
.member-apply .dd-perk-text span { font-size: 0.82rem; color: var(--text-on-dark-muted); line-height: 1.5; }

/* ── Form Section Titles ── */
.member-apply .cp-section-title { display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; margin: 0 0 0.9rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--shine-edge); }
.member-apply .cp-section-title iconify-icon { font-size: 1rem; color: var(--brand-secondary); }

/* ── Field Hints ── */
.member-apply .cp-field-hint { font-size: 0.78rem; color: var(--text-on-dark-muted); margin: -6px 0 1rem; line-height: 1.45; }
.member-apply .cp-field-hint a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ── Dropzone ── */
.member-apply .cp-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; width: 100%; min-height: 130px; padding: 1.25rem 1rem; margin-bottom: 1rem; background: var(--card-dark-bg); border: 1.5px dashed var(--shine-edge); border-radius: 14px; text-align: center; cursor: pointer; transition: all 0.2s ease; }
.member-apply .cp-dropzone:hover, .member-apply .cp-dropzone.is-dragover { border-color: var(--brand); background: rgba(255, 255, 255, 0.12); box-shadow: 0 0 0 4px rgba(26, 102, 116, 0.1); }
.member-apply .cp-dropzone.has-file { border-style: solid; border-color: var(--brand-secondary); }
.member-apply .cp-dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.member-apply .cp-dropzone-icon { font-size: 2rem; color: var(--brand-secondary); line-height: 1; pointer-events: none; }
.member-apply .cp-dropzone-title { margin: 0; font-size: 0.92rem; font-weight: 600; color: #fff; pointer-events: none; }
.member-apply .cp-dropzone-title span { color: var(--brand-secondary); }
.member-apply .cp-dropzone-sub { margin: 0; font-size: 0.78rem; color: var(--text-on-dark-muted); pointer-events: none; }
.member-apply .cp-dropzone-name { margin: 0.15rem 0 0; font-size: 0.8rem; font-weight: 600; color: var(--brand-secondary); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }

/* ── Preview ── */
.member-apply .cp-preview { text-align: center; margin-bottom: 1rem; }
.member-apply .cp-preview img { max-height: 140px; border-radius: 12px; border: 1px solid var(--shine-edge); }
.member-apply .cp-preview-caption { margin-top: 6px; font-size: 0.78rem; color: var(--text-on-dark-muted); }

/* ── Student Toggle ── */
.member-apply .cp-student-toggle { display: flex; align-items: center; gap: 0.55rem; width: 100%; padding: 0.75rem 0.9rem; background: var(--secondary-10); border: 1px solid var(--shine-edge); border-radius: 12px; margin-bottom: 0.85rem; cursor: pointer; transition: all 0.2s ease; }
.member-apply .cp-student-toggle:hover { background: var(--secondary-25); }
.member-apply .cp-student-toggle .form-check-input { width: 1.1rem; height: 1.1rem; margin: 0; flex-shrink: 0; border-color: rgba(255, 255, 255, 0.3); background-color: transparent; }
.member-apply .cp-student-toggle .form-check-input:checked { background-color: var(--brand-secondary); border-color: var(--brand-secondary); }
.member-apply .cp-student-toggle span { font-size: 0.92rem; font-weight: 600; color: #fff; }

/* ── Student Info ── */
.member-apply .cp-student-info { background: var(--secondary-10); border: 1px solid var(--secondary-25); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.member-apply .cp-student-info-inner { display: flex; align-items: flex-start; gap: 10px; }
.member-apply .cp-student-info-inner iconify-icon { font-size: 22px; color: var(--brand-secondary); margin-top: 2px; flex-shrink: 0; }
.member-apply .cp-student-info strong { color: #fff; font-size: 0.92rem; }
.member-apply .cp-student-info p { margin: 4px 0 0; font-size: 0.82rem; color: var(--text-on-dark-muted); line-height: 1.5; }

/* ── Terms ── */
.member-apply .dd-terms-section { border: 2px solid var(--shine-edge); border-radius: 14px; padding: 16px 18px; margin-top: 10px; margin-bottom: 28px; background: var(--card-dark-bg); transition: all 0.25s ease; }
.member-apply .dd-terms-section.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); animation: termsShake 0.45s ease; }
.member-apply .dd-terms-required-note { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--brand-secondary); margin-bottom: 12px; }
.member-apply .dd-terms-required-note iconify-icon { font-size: 1rem; }
.member-apply .dd-terms-wrapper { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.member-apply .dd-hidden-check { position: absolute; opacity: 0; width: 0; height: 0; }
.member-apply .dd-visible-check { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--shine-edge); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s ease; font-size: 0.9rem; color: transparent; }
.member-apply .dd-hidden-check:checked + .dd-visible-check { background: var(--brand-secondary); border-color: var(--brand-secondary); color: #fff; }
.member-apply .dd-terms-text { font-size: 0.85rem; color: var(--text-on-dark-muted); line-height: 1.5; }
.member-apply .dd-terms-text strong { color: #fff; display: block; margin-bottom: 2px; }
.member-apply .dd-terms-error { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.82rem; color: var(--danger); font-weight: 600; }

/* ── Phone Feedback ── */
.member-apply .dd-phone-feedback { font-size: 0.82rem; margin-top: -4px; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 6px; line-height: 1.45; }
.member-apply .dd-phone-feedback.is-valid { color: var(--success); }
.member-apply .dd-phone-feedback.is-invalid { color: var(--danger); }
.member-apply .dd-phone-feedback.is-checking { color: var(--text-on-dark-muted); }
.member-apply .dd-phone-feedback a { font-weight: 600; margin-left: 4px; color: #fff; }

/* ── Form Footnote ── */
.member-apply .cp-form-footnote { font-size: 0.88rem; color: var(--text-on-dark-muted); margin-bottom: 0; }
.member-apply .cp-form-footnote a { color: var(--brand-secondary); font-weight: 600; }

/* ── Processing Overlay ── */
.member-apply .dd-apply-processing { position: fixed; inset: 0; z-index: 99998; background: rgba(8, 56, 68, 0.55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.member-apply .dd-apply-processing-inner { background: var(--brand-dark); border: 1px solid var(--shine-edge); border-radius: 18px; padding: 32px 28px; max-width: 380px; width: 100%; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2); }
.member-apply .dd-apply-processing-inner strong { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.member-apply .dd-apply-processing-inner p { margin: 0; font-size: 0.88rem; color: var(--text-on-dark-muted); line-height: 1.55; }
.member-apply .dd-apply-spinner { width: 44px; height: 44px; margin: 0 auto 16px; border: 3px solid var(--shine-edge); border-top-color: var(--brand-secondary); border-radius: 50%; animation: ddSpin 0.75s linear infinite; }
.member-apply .dd-submit-btn.is-loading { opacity: 0.85; pointer-events: none; }
.member-apply .dd-submit-btn.is-loading .dd-submit-icon { animation: ddSpin 0.8s linear infinite; }
body.dd-apply-busy { overflow: hidden; }

@keyframes ddSpin { to { transform: rotate(360deg); } }
@keyframes termsShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
@keyframes successPopIn {
    from { transform: scale(.7); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ── Two-column grid ── */
.member-apply .cp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Sticky left panel ── */
@media (min-width: 992px) {
    .member-apply .contact-page-info-panel {
        position: sticky;
        top: 100px;
    }
}

/* ── Responsive ── */
@media (max-width: 575px) {
    .member-apply .cp-dropzone { min-height: 110px; padding: 1rem; }
    .member-apply .cp-grid-2 { grid-template-columns: 1fr; gap: 0.75rem; }
    .member-apply .cp-field-hint { margin: -4px 0 0.75rem; }
    .member-apply .dd-terms-section { padding: 14px 14px; }
    .member-apply .dd-terms-text { font-size: 0.82rem; }
}

@media (min-width: 576px) and (max-width: 767px) {
    .member-apply .cp-grid-2 { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
}
