/*
 * EduPortal — forms & frontend UI stylesheet
 * All rules scoped under .ep-form-wrap to avoid theme conflicts.
 * Loaded on every page that has an EduPortal shortcode.
 */

/* ── Reset inside our wrapper ─────────────────────────────────────────────── */
.ep-form-wrap *,
.ep-form-wrap *::before,
.ep-form-wrap *::after {
    box-sizing: border-box;
}
.ep-form-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout containers ─────────────────────────────────────────────────────── */
.ep-form-wrap .ep-container {
    max-width: 520px;
    margin: 40px auto;
    padding: 0 16px;
}
.ep-form-wrap .ep-container--wide {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 16px;
}
.ep-form-wrap .ep-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 20px;
}
.ep-form-wrap .ep-card--sm {
    padding: 20px 24px;
}

/* ── Typography ─────────────────────────────────────────────────────────────── */
.ep-form-wrap h1,
.ep-form-wrap h2,
.ep-form-wrap h3 {
    margin: 0 0 8px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}
.ep-form-wrap h1 { font-size: 24px; }
.ep-form-wrap h2 { font-size: 20px; }
.ep-form-wrap h3 { font-size: 16px; }
.ep-form-wrap p  { margin: 0 0 14px; color: #374151; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
    gap: 0;
}
.ep-form-wrap .ep-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.ep-form-wrap .ep-tab-btn:hover { color: #374151; }
.ep-form-wrap .ep-tab-btn.active,
.ep-form-wrap .ep-tab-btn[aria-selected="true"] {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}
.ep-form-wrap .ep-tab-panel { display: none; animation: ep-fadein 0.18s ease; }
.ep-form-wrap .ep-tab-panel.active { display: block; }
@keyframes ep-fadein {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}

/* ── Form fields ─────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-field {
    margin-bottom: 18px;
}
.ep-form-wrap .ep-field:last-child { margin-bottom: 0; }
.ep-form-wrap .ep-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.ep-form-wrap .ep-required {
    color: #dc2626;
    margin-left: 2px;
}
.ep-form-wrap input[type="text"],
.ep-form-wrap input[type="email"],
.ep-form-wrap input[type="password"],
.ep-form-wrap input[type="tel"],
.ep-form-wrap input[type="url"],
.ep-form-wrap input[type="number"],
.ep-form-wrap input[type="date"],
.ep-form-wrap select,
.ep-form-wrap textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.5;
}
.ep-form-wrap select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.ep-form-wrap input:focus,
.ep-form-wrap select:focus,
.ep-form-wrap textarea:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29,78,216,0.12);
}
.ep-form-wrap textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}
.ep-form-wrap input[type="file"] {
    width: 100%;
    padding: 8px 0;
    font-size: 13px;
    color: #374151;
    border: none;
    background: none;
    cursor: pointer;
}
.ep-form-wrap .ep-field-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 5px;
}
.ep-form-wrap .ep-field-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 5px;
    display: none;
}
.ep-form-wrap .ep-field.has-error input,
.ep-form-wrap .ep-field.has-error select,
.ep-form-wrap .ep-field.has-error textarea {
    border-color: #dc2626;
}
.ep-form-wrap .ep-field.has-error .ep-field-error { display: block; }

/* ── Grid layouts ────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 580px) {
    .ep-form-wrap .ep-grid-2 { grid-template-columns: 1fr; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, opacity 0.12s, transform 0.08s;
    line-height: 1.4;
    white-space: nowrap;
    user-select: none;
}
.ep-form-wrap .ep-btn:active { transform: scale(0.98); }
.ep-form-wrap .ep-btn-primary {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}
.ep-form-wrap .ep-btn-primary:hover { background: #1e40af; border-color: #1e40af; }
.ep-form-wrap .ep-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.ep-form-wrap .ep-btn-outline {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}
.ep-form-wrap .ep-btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }
.ep-form-wrap .ep-btn-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.ep-form-wrap .ep-btn-danger:hover { background: #fee2e2; }
.ep-form-wrap .ep-btn-full { width: 100%; }
.ep-form-wrap .ep-btn-sm { padding: 7px 14px; font-size: 12px; }
.ep-form-wrap .ep-btn-loading { opacity: 0.7; cursor: wait; }

/* ── Alerts & messages ───────────────────────────────────────────────────── */
.ep-form-wrap .ep-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    line-height: 1.5;
    border: 1px solid transparent;
}
.ep-form-wrap .ep-alert.show { display: flex; align-items: flex-start; gap: 10px; }
.ep-form-wrap .ep-alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}
.ep-form-wrap .ep-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.ep-form-wrap .ep-alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}
.ep-form-wrap .ep-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

/* ── Badges & pills ──────────────────────────────────────────────────────── */
.ep-form-wrap .ep-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.ep-form-wrap .ep-badge-blue    { background:#eff6ff; color:#1e40af; }
.ep-form-wrap .ep-badge-green   { background:#f0fdf4; color:#166534; }
.ep-form-wrap .ep-badge-amber   { background:#fffbeb; color:#92400e; }
.ep-form-wrap .ep-badge-red     { background:#fef2f2; color:#b91c1c; }
.ep-form-wrap .ep-badge-gray    { background:#f3f4f6; color:#374151; border:1px solid #e5e7eb; }
.ep-form-wrap .ep-badge-purple  { background:#f5f3ff; color:#5b21b6; }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #9ca3af;
    font-size: 12px;
}
.ep-form-wrap .ep-divider::before,
.ep-form-wrap .ep-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ── Checkbox & radio ────────────────────────────────────────────────────── */
.ep-form-wrap .ep-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}
.ep-form-wrap .ep-check-label input[type="checkbox"],
.ep-form-wrap .ep-check-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #1d4ed8;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Step bar ────────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-steps {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
    overflow-x: auto;
}
.ep-form-wrap .ep-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}
.ep-form-wrap .ep-step.active { color: #111827; font-weight: 600; }
.ep-form-wrap .ep-step.done   { color: #16a34a; }
.ep-form-wrap .ep-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: #f9fafb;
    color: #9ca3af;
    transition: all 0.2s;
}
.ep-form-wrap .ep-step.active .ep-step-dot {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}
.ep-form-wrap .ep-step.done .ep-step-dot {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.ep-form-wrap .ep-step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    min-width: 20px;
}
.ep-form-wrap .ep-step-line.done { background: #16a34a; }

/* ── Link buttons ────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-link {
    color: #1d4ed8;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ep-form-wrap .ep-link:hover { color: #1e40af; }

/* ── Info box ────────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-info-box {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.ep-form-wrap .ep-progress-fill {
    height: 100%;
    background: #1d4ed8;
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* ── Password strength ───────────────────────────────────────────────────── */
.ep-form-wrap .ep-pw-strength {
    margin-top: 6px;
    font-size: 11px;
}
.ep-form-wrap .ep-pw-bar {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    margin-bottom: 4px;
    overflow: hidden;
}
.ep-form-wrap .ep-pw-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.25s, background 0.25s;
}

/* ── Course cards ────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.ep-form-wrap .ep-course-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.ep-form-wrap .ep-course-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: #c7d2fe;
}
.ep-form-wrap .ep-course-thumb {
    height: 110px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}
.ep-form-wrap .ep-course-body { padding: 16px; }

/* ── Job cards ───────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-job-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    transition: box-shadow 0.15s;
    margin-bottom: 14px;
}
.ep-form-wrap .ep-job-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.ep-form-wrap .ep-stat-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.ep-form-wrap .ep-stat-num {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}
.ep-form-wrap .ep-stat-lbl {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-table-wrap { overflow-x: auto; }
.ep-form-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ep-form-wrap th {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.ep-form-wrap td {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}
.ep-form-wrap tr:last-child td { border-bottom: none; }
.ep-form-wrap tr:hover td { background: #fafafa; }

/* ── Upload zone ─────────────────────────────────────────────────────────── */
.ep-form-wrap .ep-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.ep-form-wrap .ep-upload-zone:hover,
.ep-form-wrap .ep-upload-zone.dragover {
    border-color: #1d4ed8;
    background: #eff6ff;
    color: #1d4ed8;
}
.ep-form-wrap .ep-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ── Notification items ──────────────────────────────────────────────────── */
.ep-form-wrap .ep-notif-item {
    padding: 14px 16px;
    border-left: 3px solid;
    border-radius: 0 8px 8px 0;
    margin-bottom: 10px;
    background: #f9fafb;
}
.ep-form-wrap .ep-notif-item.info    { border-color: #1d4ed8; background: #eff6ff; }
.ep-form-wrap .ep-notif-item.success { border-color: #16a34a; background: #f0fdf4; }
.ep-form-wrap .ep-notif-item.warning { border-color: #d97706; background: #fffbeb; }
.ep-form-wrap .ep-notif-item.error   { border-color: #dc2626; background: #fef2f2; }
.ep-form-wrap .ep-notif-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.ep-form-wrap .ep-notif-body  { font-size: 12px; color: #374151; line-height: 1.5; }
.ep-form-wrap .ep-notif-meta  { font-size: 11px; color: #9ca3af; margin-top: 4px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ep-form-wrap .ep-card { padding: 20px 16px; }
    .ep-form-wrap .ep-course-grid { grid-template-columns: 1fr; }
    .ep-form-wrap .ep-steps { gap: 4px; }
}
