/* AEFC Volunteer Portal — Public Styles */

:root {
    --aefc-blue:   #1B4F8A;
    --aefc-green:  #2E7D32;
    --aefc-amber:  #B45309;
    --aefc-red:    #c00028;
    --aefc-border: #d1d5db;
    --aefc-bg:     #f9fafb;
    --aefc-radius: 8px;
}

/* ── Shared ─────────────────────────────────────────────────────────────── */
.aefc-notice {
    padding: 14px 18px;
    border-radius: var(--aefc-radius);
    margin-bottom: 20px;
    font-size: 15px;
}
.aefc-notice--success { background: #e6f4ea; border-left: 4px solid var(--aefc-green); color: #1b5e20; }
.aefc-notice--error   { background: #fce8e6; border-left: 4px solid var(--aefc-red);   color: #7f0000; }
.aefc-notice--info    { background: #e8f0fe; border-left: 4px solid var(--aefc-blue);  color: #0d2b5e; }

.aefc-badge { display:inline-block; padding:2px 10px; border-radius:12px; font-size:12px; font-weight:600; }
.aefc-badge--good    { background:#e6f4ea; color:var(--aefc-green); }
.aefc-badge--warn    { background:#fff3cd; color:#856404; }
.aefc-badge--danger  { background:#fce8e6; color:var(--aefc-red); }
.aefc-badge--neutral { background:#e8eaf6; color:var(--aefc-blue); }

.aefc-muted { color:#888; font-size:13px; }

/* ── Signup Form ─────────────────────────────────────────────────────────── */
.aefc-signup-wrap {
    max-width: 680px;
    margin: 0 auto;
}
.aefc-signup-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--aefc-blue);
    margin-bottom: 6px;
}
.aefc-signup-intro {
    color: #555;
    margin-bottom: 28px;
    font-size: 15px;
}

/* Form layout */
.aefc-form { display: flex; flex-direction: column; gap: 18px; }
.aefc-form-row { display: flex; gap: 16px; }
.aefc-form-row--half > * { flex: 1; }

.aefc-field { display: flex; flex-direction: column; gap: 5px; }
.aefc-field label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.aefc-field .req { color: var(--aefc-red); }
.aefc-field-hint { font-size: 12px; color: #888; margin: 2px 0 0; }

.aefc-field input[type="text"],
.aefc-field input[type="email"],
.aefc-field input[type="tel"],
.aefc-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--aefc-border);
    border-radius: 6px;
    font-size: 15px;
    color: #111;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}
.aefc-field input:focus,
.aefc-field select:focus {
    outline: none;
    border-color: var(--aefc-blue);
    box-shadow: 0 0 0 3px rgba(27,79,138,.12);
}

.aefc-fieldset {
    border: 1px solid var(--aefc-border);
    border-radius: var(--aefc-radius);
    padding: 16px 18px;
}
.aefc-fieldset legend {
    font-weight: 600;
    font-size: 13px;
    color: #555;
    padding: 0 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.aefc-field--checkbox label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
}
.aefc-field--checkbox input { margin-top: 2px; flex-shrink: 0; }

.aefc-form-footer { padding-top: 8px; }

.aefc-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity .15s;
}
.aefc-btn:hover { opacity: .88; }
.aefc-btn--primary {
    background: var(--aefc-blue);
    color: #fff;
}

@media (max-width: 560px) {
    .aefc-form-row { flex-direction: column; }
}

/* ── Volunteer Dashboard ─────────────────────────────────────────────────── */
.aefc-vol-dashboard { max-width: 760px; margin: 0 auto; }

.aefc-vol-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.aefc-vol-header h2 { margin: 0 0 4px; font-size: 22px; color: var(--aefc-blue); }
.aefc-vol-role { color: #555; margin: 0; font-size: 14px; }

.aefc-risk-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}
.aefc-risk-badge--low    { background: #e6f4ea; color: var(--aefc-green); }
.aefc-risk-badge--medium { background: #fff3cd; color: var(--aefc-amber); }
.aefc-risk-badge--high   { background: #fce8e6; color: var(--aefc-red); }

/* Progress bar */
.aefc-progress-wrap {
    background: #fff;
    border: 1px solid var(--aefc-border);
    border-radius: var(--aefc-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}
.aefc-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
}
.aefc-progress-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}
.aefc-progress-fill {
    height: 100%;
    background: var(--aefc-blue);
    border-radius: 6px;
    transition: width .4s ease;
}
.aefc-onboarding-done {
    margin: 10px 0 0;
    color: var(--aefc-green);
    font-weight: 600;
    font-size: 14px;
}

/* Sections */
.aefc-section {
    background: #fff;
    border: 1px solid var(--aefc-border);
    border-radius: var(--aefc-radius);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.aefc-section h3 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--aefc-blue);
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

/* Steps */
.aefc-steps-list { display: flex; flex-direction: column; gap: 10px; }
.aefc-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--aefc-bg);
}
.aefc-step--complete { background: #e6f4ea; }
.aefc-step--pending  { background: #fff3cd; }
.aefc-step--todo     { background: #f3f4f6; }

.aefc-step-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.aefc-step-body { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.aefc-step-note { font-size: 12px; color: #888; }

/* Credentials */
.aefc-creds-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.aefc-cred-card {
    border: 1px solid var(--aefc-border);
    border-radius: 6px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--aefc-bg);
}
.aefc-cred-type { font-weight: 600; font-size: 14px; color: #111; }
.aefc-cred-expiry { font-size: 12px; color: #555; }
.aefc-cred-note { font-size: 12px; color: var(--aefc-red); }

/* Assignments */
.aefc-assignments-list { display: flex; flex-direction: column; gap: 8px; }
.aefc-assignment-card {
    padding: 10px 14px;
    background: var(--aefc-bg);
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid var(--aefc-border);
}

/* ── Credential Upload Form ──────────────────────────────────────────────── */
.aefc-upload-box {
    border: 2px dashed var(--aefc-border);
    border-radius: var(--aefc-radius);
    padding: 20px 22px;
    background: var(--aefc-bg);
    margin-top: 4px;
}
.aefc-upload-box h4 {
    margin: 0 0 6px;
    font-size: 15px;
    color: var(--aefc-blue);
    font-weight: 700;
}
.aefc-upload-intro {
    font-size: 13px;
    color: #555;
    margin: 0 0 16px;
}
.aefc-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.aefc-upload-form .aefc-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.aefc-upload-form input[type="date"],
.aefc-upload-form select,
.aefc-upload-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--aefc-border);
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}
.aefc-upload-form input[type="date"]:focus,
.aefc-upload-form select:focus,
.aefc-upload-form textarea:focus {
    outline: none;
    border-color: var(--aefc-blue);
    box-shadow: 0 0 0 3px rgba(27,79,138,.10);
}
.aefc-upload-form input[type="file"] {
    font-size: 13px;
    padding: 6px 0;
}
.aefc-upload-form textarea {
    resize: vertical;
    min-height: 56px;
}
.aefc-cred-view {
    font-size: 12px;
    color: var(--aefc-blue);
    text-decoration: none;
}
.aefc-cred-view:hover { text-decoration: underline; }

@media (max-width: 560px) {
    .aefc-upload-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   AEFC Credential Checklist — v2.0
   ═══════════════════════════════════════════════════════════════ */

.aefc-credentials-wrap { max-width:860px; margin:0 auto; padding:0 16px 48px; }
.aefc-cred-header h2 { font-family:'Barlow Condensed',sans-serif; font-size:2rem; color:#0B1F3A; margin-bottom:4px; }
.aefc-cred-role-badge { font-size:.9rem; color:#555; margin-bottom:12px; display:block; }

.aefc-compliance-bar { height:10px; background:#E5E7EB; border-radius:9999px; overflow:hidden; margin-bottom:6px; }
.aefc-compliance-bar__fill { height:100%; background:linear-gradient(90deg,#C8102E 0%,#F0A500 55%,#22C55E 100%); border-radius:9999px; transition:width .4s ease; }
.aefc-compliance-label { font-size:.85rem; color:#666; margin-bottom:20px; }

.aefc-section-heading { font-family:'Barlow Condensed',sans-serif; font-size:1.15rem; color:#0B1F3A; border-bottom:2px solid #F0A500; padding-bottom:5px; margin:28px 0 14px; text-transform:uppercase; letter-spacing:.04em; }

.aefc-cred-item { background:#fff; border:1px solid #E5E7EB; border-radius:8px; padding:14px 18px; margin-bottom:10px; display:flex; flex-direction:column; gap:10px; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.aefc-cred-item--approved  { border-left:4px solid #22C55E; }
.aefc-cred-item--pending   { border-left:4px solid #F0A500; }
.aefc-cred-item--rejected  { border-left:4px solid #C8102E; }
.aefc-cred-item--expired   { border-left:4px solid #EF4444; }
.aefc-cred-item--missing   { border-left:4px solid #D1D5DB; }
.aefc-cred-item--optional  { background:#FAFAFA; }
.aefc-cred-item__info      { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.aefc-cred-item__label     { font-weight:600; color:#0B1F3A; font-size:.95rem; }
.aefc-cred-item__expiry    { font-size:.8rem; color:#888; }
.aefc-cred-approved        { font-size:.88rem; color:#15803D; font-weight:500; margin:0; }

.aefc-cred-status-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.aefc-dot--approved  { background:#22C55E; }
.aefc-dot--pending   { background:#F0A500; }
.aefc-dot--rejected,
.aefc-dot--expired   { background:#C8102E; }
.aefc-dot--missing   { background:#D1D5DB; }

.aefc-badge           { display:inline-block; font-size:.7rem; font-weight:700; border-radius:9999px; padding:2px 7px; text-transform:uppercase; letter-spacing:.03em; }
.aefc-badge--fee      { background:#FEF9C3; color:#854D0E; border:1px solid #FDE68A; }
.aefc-link-small      { font-size:.78rem; color:#C8102E; text-decoration:none; white-space:nowrap; }
.aefc-link-small:hover{ text-decoration:underline; }

/* Doc capture widget */
.aefc-capture-widget { margin-top:8px; }
.aefc-capture-label  { font-weight:600; color:#0B1F3A; margin-bottom:6px; font-size:.9rem; }
.aefc-capture-pick   { display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-size:.88rem; color:#374151; }
.aefc-capture-pick input[type="file"] { display:none; }
.aefc-capture-pick-btn { background:#0B1F3A; color:#fff; padding:6px 12px; border-radius:5px; font-size:.82rem; }
.aefc-capture-filename { color:#888; font-size:.8rem; }
.aefc-capture-dates  { display:flex; gap:12px; flex-wrap:wrap; margin-top:8px; }
.aefc-field-small    { display:flex; flex-direction:column; gap:3px; font-size:.82rem; color:#555; }
.aefc-field-small input[type="date"] { border:1px solid #D1D5DB; border-radius:4px; padding:4px 8px; font-size:.82rem; }

@media (min-width:640px) {
  .aefc-cred-item { flex-direction:row; align-items:flex-start; justify-content:space-between; }
}

/* ── Step interactive buttons ────────────────────────────────────────── */
.aefc-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.aefc-step-body {
    flex: 1;
}
.aefc-step-btn {
    flex-shrink: 0;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-family: 'Barlow', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, opacity .2s;
    align-self: center;
}
.aefc-step-btn--active {
    background: #C8102E;
    color: #fff;
}
.aefc-step-btn--active:hover {
    background: #A00E26;
}
.aefc-step-btn--later {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    opacity: .7;
}
.aefc-step-btn:disabled {
    opacity: .6;
    cursor: wait;
}

/* ── Profile section ─────────────────────────────────────────────────── */
.aefc-section-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.aefc-section-hdr h3 { margin: 0; }

.aefc-btn-link {
    background: none;
    border: none;
    color: #C8102E;
    font-family: 'Barlow', sans-serif;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
}
.aefc-btn-link:hover { color: #A00E26; }

.aefc-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
}
.aefc-profile-grid > div { display: flex; flex-direction: column; gap: 2px; }
.aefc-pf-label { font-size: .75rem; font-weight: 700; color: #6B7280; text-transform: uppercase; letter-spacing: .05em; }
.aefc-pf-val   { font-size: .95rem; color: #0B1F3A; }

.aefc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}
.aefc-field--full { grid-column: 1 / -1; }
.aefc-optional { font-size: .75rem; color: #9CA3AF; font-weight: 400; }

.aefc-field label { display: block; font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.aefc-field input,
.aefc-field textarea,
.aefc-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #D1D5DB;
    border-radius: 5px;
    padding: 7px 10px;
    font-family: 'Barlow', sans-serif;
    font-size: .9rem;
    color: #111;
    transition: border-color .2s;
}
.aefc-field input:focus,
.aefc-field textarea:focus,
.aefc-field select:focus {
    border-color: #C8102E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(200,16,46,.1);
}

@media (max-width: 580px) {
    .aefc-profile-grid,
    .aefc-form-grid { grid-template-columns: 1fr; }
    .aefc-field--full { grid-column: 1; }
}

/* Signup form: third-column grid for city/state/zip */
.aefc-form-row--third {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}
@media (max-width: 540px) {
    .aefc-form-row--third { grid-template-columns: 1fr; }
}

/* ── Checkbox fix — prevent width:100% from stretching checkbox ─────────── */
.aefc-field--checkbox {
    margin-top: 8px;
}
.aefc-field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.82rem;
    color: #4B5563;
    line-height: 1.5;
    font-weight: 400;
    cursor: pointer;
}
.aefc-field--checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #C8102E;
}

/* ── Account pending / rejected screens ─────────────────────────────────── */
.aefc-pending-wrap {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
}
.aefc-pending-card {
    background: #fff;
    border-radius: 12px;
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    border-top: 4px solid #F0A500;
}
.aefc-pending-card--rejected { border-top-color: #C8102E; }
.aefc-pending-icon { font-size: 3rem; margin-bottom: 16px; }
.aefc-pending-card h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.6rem;
    color: #0B1F3A;
    margin-bottom: 12px;
}
.aefc-pending-card p { color: #4B5563; line-height: 1.6; margin-bottom: 10px; }
.aefc-pending-note { font-size: .85rem; color: #9CA3AF; }

/* ── Frontend admin dashboard embed ─────────────────────────────────────── */
.aefc-frontend-admin-wrap {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 8px;
}

/* Reset WP Admin-style margins that don't apply on frontend */
.aefc-frontend-admin-wrap h1,
.aefc-frontend-admin-wrap h2 {
    padding-left: 0;
    margin-top: 0;
}

/* Make KPI tiles responsive in the theme container */
.aefc-frontend-admin-wrap .aefc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

/* Charts side by side on wide screens, stacked on mobile */
.aefc-frontend-admin-wrap .aefc-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 720px) {
    .aefc-frontend-admin-wrap .aefc-charts-row {
        grid-template-columns: 1fr;
    }
    .aefc-frontend-admin-wrap .aefc-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Credential delete button ──────────────────────────────────────────── */
.aefc-cred-delete-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: none;
    border: 1.5px solid #E5E7EB;
    border-radius: 5px;
    color: #9CA3AF;
    font-family: 'Barlow', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}
.aefc-cred-delete-btn:hover {
    border-color: #C8102E;
    color: #C8102E;
    background: #FEF2F2;
}
.aefc-cred-delete-btn:disabled {
    opacity: .5;
    cursor: wait;
}
