/* =============================================================================
   JP Jobs — Candidate Portal  |  portal.css  |  v1.0.0
   Inherits jp-status-badge & jp-btn classes from the core plugin stylesheet.
   ============================================================================= */

/* ── Wrapper ── */
.jp-portal-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
    font-family: inherit;
    color: #111827;
}

/* ── Form card (centered) ── */
.jp-portal-card--form {
    max-width: 460px;
    margin: 2rem auto;
    text-align: center;
}

.jp-portal-form-icon {
    font-size: 2.75rem;
    line-height: 1;
    margin-bottom: .75rem;
}

/* ── Dashboard header ── */
.jp-portal-dashboard-header {
    margin-bottom: 1.5rem;
}

/* ── Titles ── */
.jp-portal-title {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    color: #111827;
}

.jp-portal-subtitle {
    font-size: .95rem;
    color: #6b7280;
    margin: 0;
}

/* ── Cards ── */
.jp-portal-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    transition: box-shadow .15s;
}

.jp-portal-card--empty {
    text-align: center;
    color: #9ca3af;
    padding: 2.5rem 1.75rem;
}

/* ── Notices ── */
.jp-portal-notice {
    padding: .75rem 1rem;
    border-radius: 8px;
    font-size: .9rem;
    line-height: 1.5;
    margin-bottom: 1.1rem;
    text-align: left;
}

.jp-portal-notice--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.jp-portal-notice--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Form fields ── */
.jp-portal-card--form .jp-field-group {
    margin-bottom: .85rem;
    text-align: left;
}

.jp-field-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .35rem;
}

.jp-portal-input {
    display: block;
    width: 100%;
    padding: .65rem .9rem;
    font-size: .95rem;
    color: #111827;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.jp-portal-input:focus {
    outline: none;
    border-color: #0a5fbd;
    box-shadow: 0 0 0 3px rgba(10, 95, 189, .14);
}

/* Submit button */
.jp-portal-submit-btn {
    width: 100%;
    margin-top: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

/* Spinner (CSS only, no image) */
.jp-portal-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: jp-portal-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes jp-portal-spin {
    to { transform: rotate(360deg); }
}

/* ── Application card ── */
.jp-portal-app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.jp-portal-app-info {
    flex: 1;
    min-width: 0;
}

.jp-portal-app-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 .3rem;
    line-height: 1.35;
}

.jp-portal-app-title a {
    color: inherit;
    text-decoration: none;
}

.jp-portal-app-title a:hover {
    color: #0a5fbd;
    text-decoration: underline;
}

.jp-portal-app-date {
    font-size: .85rem;
    color: #9ca3af;
    margin: 0;
}

/* ── Status badge (extends core .jp-status-badge) ── */
/* Core classes are already loaded by jp-jobs, we just ensure alignment */
.jp-portal-card .jp-status-badge {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: .1rem;
}

/* ── Timeline ── */
.jp-portal-timeline {
    margin-top: 1.25rem;
    padding-top: 1.2rem;
    border-top: 1px solid #f3f4f6;
}

.jp-portal-timeline-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    margin: 0 0 .7rem;
}

.jp-portal-timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.jp-portal-timeline-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .875rem;
    line-height: 1.4;
}

.jp-portal-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #d1d5db;
}

/* Colours match jp-status-badge from core */
.jp-portal-timeline-dot--new       { background: #94a3b8; }
.jp-portal-timeline-dot--reviewed  { background: #60a5fa; }
.jp-portal-timeline-dot--contacted { background: #a78bfa; }
.jp-portal-timeline-dot--interview { background: #fb923c; }
.jp-portal-timeline-dot--presented { background: #facc15; }
.jp-portal-timeline-dot--hired     { background: #4ade80; }
.jp-portal-timeline-dot--rejected  { background: #f87171; }

.jp-portal-timeline-text {
    flex: 1;
    color: #374151;
    font-weight: 500;
}

.jp-portal-timeline-date {
    color: #9ca3af;
    font-size: .8rem;
    white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .jp-portal-card {
        padding: 1.25rem;
    }

    .jp-portal-app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .jp-portal-card .jp-status-badge {
        margin-top: 0;
    }
}
