/**
 * src/css/favorites.css
 * Steuert die Favoritenliste und das detaillierte Kandidaten-Dossier (Modal).
 * REFACTORED: Nutzt zentrale Variablen und das goldene Scoring-Design.
 * Fokus: Akten-Look, präzise Ring-Passform und Premium-Modals.
 */

/* 1. FAVORITEN LISTE (GRID) */
#favorites-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* 2. DIE DOSSIER-KARTE (AKTE) */
.favorite-dossier {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: row;
    padding: 15px;
    position: relative;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
    min-height: 160px;
    align-items: center;
    overflow: hidden;
}

.favorite-dossier:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-green);
}

/* 3. LINKER BEREICH (PROFILBILD & RING) */
.dossier-left {
    flex-shrink: 0;
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-right: 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.03);
}

.dossier-ring-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dossier-ring-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.dossier-profile-img {
    width: 86.7%; /* Exakte Passform für den Ring */
    height: 86.7%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
}

.match-heart-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid var(--gold);
    z-index: 3;
    font-size: 14px;
}

/* 4. MITTLERER BEREICH (FAKTEN-GRID) */
.dossier-center {
    flex-grow: 1;
    padding: 0 20px;
}

.dossier-header {
    margin-bottom: 12px;
}

.dossier-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.dossier-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

.fact-item {
    display: flex;
    flex-direction: column;
}

.fact-item strong {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    font-weight: 700;
}

.fact-item span {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}

/* 5. RECHTER BEREICH (GOLDENER SCORE & DELETE) */
.dossier-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    min-width: 60px;
}

.score-ring-small {
    width: 55px;
    height: 55px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
    color: var(--gold);
    text-shadow: 0.5px 0.5px 1px rgba(184, 134, 11, 0.2);
    background: var(--white);
    box-shadow: var(--shadow);
}

.delete-fav-btn {
    color: var(--gray-200);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.delete-fav-btn:hover {
    color: var(--error, #ef4444);
}

/* 6. DETAIL POPUP (DOSSIER-ANSICHT) */
.candidate-detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.detail-card {
    background: var(--white);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.detail-carousel {
    width: 100%;
    height: 380px;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-ring-wrapper {
    width: 300px;
    height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-main-img {
    width: 86.7%;
    height: 86.7%;
    border-radius: 50%;
    object-fit: cover;
}

/* 7. FORMULAR-SIMULATION IM MODAL */
.detail-info-content {
    padding: 30px;
}

.dossier-form-simulation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.dossier-form-field label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.value-box {
    background: var(--gray-50);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--gray-100);
}

/* 8. MOBILE OPTIMIERUNG */
@media (max-width: 600px) {
    .favorite-dossier {
        flex-wrap: wrap;
        padding: 12px;
    }

    .dossier-left {
        width: 90px;
        padding-right: 10px;
    }

    .dossier-ring-wrapper {
        width: 80px;
        height: 80px;
    }

    .dossier-center {
        width: calc(100% - 100px);
        padding: 0 10px;
    }

    .dossier-facts {
        grid-template-columns: 1fr; /* Eine Spalte auf sehr kleinen Geräten */
        gap: 5px;
    }

    .dossier-right {
        width: 100%;
        flex-direction: row;
        align-items: center;
        margin-top: 15px;
        padding-top: 12px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
}