/* ---------------------------------------------------------------------------------------
   Komponente: Job-Saved-Card (Grund-Layout + fliegende Ecken + read + unread) 24.05.2026
   inklusive Modal Styles für interne Stellen weiter unten
   --------------------------------------------------------------------------------------- */

.ja-saved-job-card {
    /* --- 1. Ausgelagerte Inline-Styles --- */
    background: #fff; 
    border-top: 1.2px solid #00bfa6; 
    border-right: 1px solid #e0e0e0; 
    border-bottom: 1px solid #e0e0e0; 
    border-left: 4px solid #00bfa6; 
    border-radius: 8px; 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;

    /* --- 2. Setup für die Ecken --- */
    position: relative; /* Wichtig für die Hintergrund-Positionierung */
    
    background-image: 
        linear-gradient(to top right, transparent 50%, #07cda7 50%),   /* Türkis */
        linear-gradient(to bottom left, transparent 50%, #022093 50%); /* Blau */
        
    /* STARTPOSITION (Unsichtbar außerhalb der Karte geparkt):
       Türkis: Links außerhalb (-20px), Oben (0)
       Blau: Rechts außerhalb (100% + 20px), Unten (100%) */
    background-position: -20px 0, calc(100% + 20px) 100%;
    
    background-size: 20px 20px; 
    background-repeat: no-repeat;
    
    /* Die weiche Flug-Animation */
    transition: background-position 0.4s ease-out, background-color 0.3s ease, border-color 0.3s ease;
}

/* --------------------------------------------------------------------------
   🔥 Ego-Boost-Modus (Karte wurde ausgewählt)
   -------------------------------------------------------------------------- */

.ja-saved-job-card.selected {
    /* Rahmen anpassen */
    border-top: 1px solid #07cda7 !important;
    border-left: 4px solid #022093 !important;
    
    /* Rechts und unten transparent machen */
    border-right: 1px solid transparent !important;
    border-bottom: 1px solid transparent !important;
    
    /* Zarter Hintergrund */
    background-color: #f0fffb; 
    
    /* ZIELPOSITION (Sichtbar in den Ecken):
       Türkis fliegt von links quer nach oben rechts (100% 0)
       Blau fliegt von rechts quer nach unten links (0 100%) */
    background-position: 100% 0, 0 100%;
}

/* Der auffällige rote Rahmen für neue Jobs */
.ja-unread-frame {
    border: 2px solid #d63638 !important;
    background-color: #fff9f9; /* Ganz leichter Rot-Schimmer im Hintergrund */
    position: relative;
    transition: all 0.3s ease;
}

/* Ein kleines "Neu"-Fähnchen oben rechts auf der Karte */
.ja-unread-frame::after {
    content: "NEU VOM VERMITTLER";
    position: absolute;
    top: -12px;
    right: 15px;
    background: #d63638;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Die türkise "Bleibt stehen"-Badge für bereits gelesene Vermittler-Jobs */
.ja-assigned-read {
    position: relative; /* Wichtig als Anker für das ::after-Element */
}

.ja-assigned-read::after {
    content: "VOM VERMITTLER"; /* Ohne "NEU" */
    position: absolute;
    top: -12px;
    right: 15px;
    background: #00bfa6; /* Dein JobAssist-Türkis */
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ==========================================================================
   MODAL STYLES (Für interne Stellen)
   ========================================================================== */
.ja-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 32, 147, 0.6); /* Leicht transparentes Logo-Blau */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.ja-modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ja-modal-header {
    background: #022093;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ja-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fecc00; /* Das schicke Gelb */
}

.ja-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.ja-modal-close:hover {
    color: #07cda7; /* Türkis beim Hover */
}

.ja-modal-body {
    padding: 20px;
    max-height: 75vh;
    overflow-y: auto;
}

.ja-modal-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#ja-internal-beschreibung {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
}
#ja-internal-beschreibung:focus {
    outline: none;
    border-color: #07cda7;
}

/* Styling für die Verwaltungstabelle */
.ja-internal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ja-internal-table th {
    background: #f8f9fa;
    color: #022093;
    text-align: left;
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 2px solid #ddd;
}

.ja-internal-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.ja-internal-table tr:hover {
    background-color: #fffdf5; /* Leichter goldener Hover */
}

/* Der kleine Toggle-Schalter in der Tabelle */
.ja-status-toggle {
    cursor: pointer;
    transform: scale(1.2);
}

.ja-rate-btn {
    background: transparent;
}

.ja-rate-btn.up.active {
    background: turquoise;
    color: white;
}

.ja-rate-btn.down.active {
    background: red;
    color: white;
}

/* Das Verwaltungs-Modal (bleibt im Hintergrund offen) */
#ja-manage-internal-modal {
    z-index: 100000;
}

/* Das Edit-Modal (schiebt sich in den Vordergrund) */
#ja-internal-job-modal {
    z-index: 100010; /* Höherer Wert = liegt weiter vorne */
}