/* ============================================
   TRAINING PROGRAMS — Caly-Quiz IRVE LMS
   Styles for formation programs & checklist
   Version 1.0 — Mars 2026
   ============================================ */

/* ─── CONTAINER ─────────────────────────── */
.tp-container {
    --tp-dark: #0f172a;
    --tp-surface: #1e293b;
    --tp-border: rgba(245, 166, 35, 0.15);
    --tp-muted: #64748b;
    --tp-primary: #f59e0b;
    --tp-radius: 12px;
    margin: 24px 40px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--tp-border);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
}

/* ─── HOME BUTTON ──────────────────────── */
.tp-btn-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 166, 35, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 166, 35, 0.25);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}
.tp-btn-home:hover {
    background: rgba(245, 166, 35, 0.25);
    color: #fbbf24;
}
.tp-btn-home svg { flex-shrink: 0; }

/* ─── HEADER ────────────────────────────── */
.tp-header {
    padding: 20px 24px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tp-header-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.tp-header-sub {
    font-size: 13px;
    color: var(--tp-muted);
    margin-top: 4px;
}

/* ─── TABS (Program selector) ───────────── */
.tp-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.tp-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.tp-tab:hover {
    border-color: rgba(245, 166, 35, 0.4);
    background: rgba(245, 166, 35, 0.08);
    color: #e2e8f0;
}

.tp-tab--active {
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.tp-tab-icon {
    font-size: 18px;
}

.tp-tab-label {
    font-weight: 800;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
}

.tp-tab-pct {
    font-size: 11px;
    font-weight: 700;
    margin-left: 2px;
}

/* ─── DETAIL PANEL ──────────────────────── */
.tp-detail {
    animation: tpSlideIn 0.3s ease;
}

@keyframes tpSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tp-detail-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tp-detail-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tp-detail-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.tp-detail-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tp-detail-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.tp-detail-progress {
    text-align: right;
}

.tp-detail-pct {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tp-detail-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

/* ─── INFO ROWS ─────────────────────────── */
.tp-detail-info {
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(30, 58, 95, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tp-detail-info-row {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.5;
}

.tp-detail-info-label {
    font-weight: 700;
    color: var(--tp-primary);
    margin-right: 6px;
}

/* ─── PROGRESS BAR ──────────────────────── */
.tp-progress-bar-full {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.tp-progress-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 0 3px 3px 0;
}

/* ─── CHECKLIST ─────────────────────────── */
.tp-checklist {
    padding: 16px 24px 8px;
    max-height: 500px;
    overflow-y: auto;
}

.tp-checklist::-webkit-scrollbar { width: 5px; }
.tp-checklist::-webkit-scrollbar-track { background: transparent; }
.tp-checklist::-webkit-scrollbar-thumb { background: rgba(245, 166, 35, 0.3); border-radius: 3px; }

/* ─── SECTION ───────────────────────────── */
.tp-section {
    margin-bottom: 16px;
}

.tp-section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--tp-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(245, 166, 35, 0.15);
}

/* ─── CHECKLIST ITEM ────────────────────── */
.tp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.tp-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tp-item--done {
    opacity: 0.65;
}

.tp-item--done .tp-item-text {
    text-decoration: line-through;
    color: var(--tp-muted);
}

.tp-checkbox {
    display: none;
}

.tp-checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    transition: all 0.2s ease;
    background: transparent;
}

.tp-item:hover .tp-checkmark {
    border-color: rgba(245, 166, 35, 0.5);
}

.tp-item--done .tp-checkmark {
    background: #22c55e;
    border-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.tp-item-text {
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.4;
}

/* ─── ACTIONS ───────────────────────────── */
.tp-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px 20px;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tp-btn {
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.tp-btn:hover {
    transform: scale(1.03);
}

.tp-btn-primary {
    background: linear-gradient(135deg, var(--tp-primary), #d97706);
    color: var(--tp-dark);
    box-shadow: 0 2px 12px rgba(245, 166, 35, 0.3);
}

.tp-btn-primary:hover {
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.5);
}

.tp-btn-outline {
    background: transparent;
    border: 1px solid var(--tp-muted);
    color: #94a3b8;
}

.tp-btn-outline:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ─── RESPONSIVE ────────────────────────── */
@media (max-width: 1200px) {
    .tp-container {
        margin: 20px 24px;
    }
}

@media (max-width: 768px) {
    .tp-container {
        margin: 16px;
    }

    .tp-header {
        padding: 16px 16px 10px;
    }

    .tp-header-title {
        font-size: 18px;
    }

    .tp-tabs {
        padding: 12px 16px;
        gap: 6px;
    }

    .tp-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .tp-tab-label {
        font-size: 13px;
    }

    .tp-detail-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tp-detail-progress {
        text-align: left;
    }

    .tp-detail-info {
        padding: 10px 16px;
    }

    .tp-checklist {
        padding: 12px 16px 8px;
        max-height: 400px;
    }

    .tp-item {
        padding: 6px 8px;
    }

    .tp-actions {
        padding: 12px 16px 16px;
        flex-direction: column;
    }

    .tp-btn {
        width: 100%;
        text-align: center;
    }
}
