/*
 * EduPortal — public stylesheet
 * All CSS custom properties follow WP's native palette where possible.
 */

/* ─── Reset & base ─────────────────────────────────────────────────────────── */
.ep-wrap *,
.ep-modal * {
    box-sizing: border-box;
}

/* ─── Modal overlay ────────────────────────────────────────────────────────── */
.ep-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ep-modal-overlay.ep-open {
    display: flex;
}
.ep-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ep-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    padding: 4px 8px;
}
.ep-modal-close:hover { color: #111827; }

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */
.ep-modal-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}
.ep-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    color: #6b7280;
    margin-bottom: -1px;
    font-family: inherit;
    transition: color 0.1s, border-color 0.1s;
}
.ep-tab.active,
.ep-tab[aria-selected="true"] {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
    font-weight: 600;
}
.ep-tab-panel { animation: ep-fade-in 0.15s ease; }
@keyframes ep-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ─── Form fields ──────────────────────────────────────────────────────────── */
.ep-field {
    margin-bottom: 16px;
}
.ep-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}
.ep-field input[type="text"],
.ep-field input[type="email"],
.ep-field input[type="password"],
.ep-field input[type="tel"],
.ep-field input[type="number"],
.ep-field input[type="date"],
.ep-field select,
.ep-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.5;
}
.ep-field input:focus,
.ep-field select:focus,
.ep-field textarea:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}
.ep-field textarea { resize: vertical; min-height: 80px; }
.ep-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 8px;
}
.ep-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.ep-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    transition: background 0.1s, border-color 0.1s, opacity 0.1s;
    line-height: 1.4;
}
.ep-btn-primary {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}
.ep-btn-primary:hover { background: #1e40af; border-color: #1e40af; }
.ep-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.ep-btn-outline {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}
.ep-btn-outline:hover { background: #f9fafb; }
.ep-btn-full { display: block; width: 100%; }
.ep-btn-sm { padding: 6px 12px; font-size: 12px; }
.ep-link-btn {
    background: none;
    border: none;
    color: #1d4ed8;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.ep-link-btn:hover { text-decoration: underline; }

/* ─── Form messages ────────────────────────────────────────────────────────── */
.ep-form-message {
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}
.ep-form-message.ep-msg-error {
    display: block;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.ep-form-message.ep-msg-success {
    display: block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ─── Login trigger button ─────────────────────────────────────────────────── */
.ep-login-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

/* ─── Course listing ───────────────────────────────────────────────────────── */
.ep-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}
.ep-course-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.15s;
}
.ep-course-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.ep-course-thumb {
    height: 120px;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}
.ep-course-body { padding: 16px; }
.ep-course-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #111827;
}
.ep-course-meta {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}
.ep-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
}
.ep-badge-blue  { background: #eff6ff; color: #1e40af; }
.ep-badge-green { background: #f0fdf4; color: #166534; }
.ep-badge-amber { background: #fffbeb; color: #92400e; }
.ep-badge-gray  { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.ep-material-hint {
    font-size: 11px;
    color: #9ca3af;
    margin: 8px 0;
}

/* ─── Dashboard ────────────────────────────────────────────────────────────── */
.ep-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111827;
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
}
.ep-dashboard-header { margin-bottom: 24px; }
.ep-dashboard-header h2 { font-size: 22px; margin: 0 0 4px; }
.ep-student-id-badge {
    font-size: 13px;
    color: #6b7280;
    font-family: monospace;
}
.ep-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ep-info-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}
.ep-info-card h4 { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.ep-info-card p  { font-size: 14px; font-weight: 500; margin: 0; }
.ep-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.ep-card h3 { font-size: 15px; margin: 0 0 14px; color: #111827; }
.ep-notification {
    border-left: 3px solid #1d4ed8;
    padding: 10px 14px;
    background: #eff6ff;
    border-radius: 0 6px 6px 0;
    margin-bottom: 10px;
}
.ep-notification-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.ep-notification-body  { font-size: 12px; color: #374151; }
.ep-notification-meta  { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.ep-notification.ep-unread { border-left-color: #1d4ed8; }
.ep-notification.ep-read   { border-left-color: #d1d5db; background: #f9fafb; }
.ep-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}
.ep-progress-fill {
    height: 100%;
    background: #1d4ed8;
    border-radius: 3px;
    transition: width 0.3s;
}

/* ─── Employer registration ────────────────────────────────────────────────── */
.ep-reg-wrap {
    max-width: 640px;
    margin: 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ep-step-bar {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}
.ep-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9ca3af;
}
.ep-step.ep-step-active { color: #111827; font-weight: 600; }
.ep-step-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    background: #f9fafb;
    color: #374151;
}
.ep-step.ep-step-active .ep-step-dot {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}
.ep-step-line { flex: 1; height: 1px; background: #e5e7eb; margin: 0 8px; }
.ep-field-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ep-notice {
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin: 14px 0;
}
.ep-notice-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ep-modal { padding: 20px 16px; }
    .ep-course-grid { grid-template-columns: 1fr; }
    .ep-field-grid-2 { grid-template-columns: 1fr; }
    .ep-step-bar { flex-wrap: wrap; gap: 8px; }
    .ep-step-line { display: none; }
}
