/* --------------------------------------------------------------------------
   Eigenes Modul für die Job Split-Ansicht (Desktop links/rechts)
   wird via base.html explizit nur geladen, wenn benötigt
-------------------------------------------------------------------------- */

.job-split-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 24px;
}

/* Linke Spalte: scrollbare Jobliste, Höhe = rechte Spalte (beide sticky auf Viewport-Höhe) */
.job-split-list {
    flex: 0 0 380px;
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 3px; /* Rand für box-shadow des aktiven Eintrags */
}
.job-split-list::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* card-grid inside split list must NOT shrink so the list scrolls properly */
.job-split-list .card-grid {
    flex-shrink: 0;
}

/* Rechte Spalte: Job-Detail-Panel, Höhe bestimmt das Layout */
.job-split-detail {
    flex: 1;
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
    background: transparent;
    border-radius: 12px;
    border: none;
    box-shadow: none;
}

/* Aktiven Job in der Liste kennzeichnen */
.job-split-list .job-card.active-card {
    border-color: var(--primary, #00aaff);
    box-shadow: 0 0 0 2px var(--primary, #00aaff);
}

/* Aktiven Rand auch während Hover-Zustand beibehalten */
.job-split-list .job-card.active-card:hover {
    border-color: var(--primary, #00aaff);
    box-shadow: 0 0 0 2px var(--primary, #00aaff);
    transform: none;
}

@media (max-width: 900px) {
    .job-split-container {
        flex-direction: column;
    }
    .job-split-list {
        flex: 1 1 auto;
        width: 100%;
        position: static;
        height: auto;
        overflow-y: visible;
    }
    .job-split-detail {
        display: none; /* Auf mobilen Geräten geht man direkt zur Detailseite */
    }
}

/* Keep height tracking for external split flow */
.job-split-detail .split-detail-box {
    height: 100%;
}

/* Apply button row in top-pane */
.sdb-top-apply {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
}
.sdb-apply-cta {
    min-width: 160px;
    text-align: center;
}
.sdb-already-applied {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e6f4ea;
    color: #2e7d32;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #c8e6c9;
}

/* Section headings inside panes */
.sdb-section-heading {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    color: var(--text-color, inherit);
}
