/* ==========================================================================
   1. ALLGEMEINE BASIS-STYLES
   ========================================================================== */

.tx_jobfair {
    box-sizing: border-box;
}

.tx_jobfair > h1,
.tx_jobfair h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #d5810e;
}

.tx_jobfair fieldset {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}


/* ==========================================================================
   2. TABELLEN-ANSICHTEN (List & Latest)
   ========================================================================== */

.tx_jobfair.table {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.tx_jobfair.table th {
    background-color: #f8f9fa;
    color: #444;
    font-weight: bold;
    padding: 15px;
    border-bottom: 2px solid #e0e0e0;
    text-align: left;
}

.tx_jobfair.table td {
    padding: 15px;
    color: #555;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.tx_jobfair.table tr:last-child td {
    border-bottom: none;
}

.tx_jobfair.table-hover tbody tr:hover {
    background-color: #fdf8f2;
}


/* ==========================================================================
   3. FILTER-BEREICH
   ========================================================================== */

#tx_jobfair_filter {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

#tx_jobfair_filter legend {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.filterForm input,
.filterForm select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-right: 10px;
    margin-bottom: 10px;
}


/* ==========================================================================
   4. DETAIL-ANSICHT (Show Layout)
   ========================================================================== */

/* Äußerer DL-Container bleibt transparent, um Karten-Optik nicht zu stören */
.tx_jobfair dl.dl-horizontal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.tx_jobfair dl.job-top-info {
    margin-bottom: 25px;
}

/* Freistehende Detail-Karten für Fließtext-Blöcke */
.tx_jobfair .job-detail-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.tx_jobfair .job-detail-card dt {
    font-weight: 700;
    color: #d5810e;
    font-size: 1.1rem;
    margin-bottom: 10px;
    border-left: 4px solid #d5810e;
    padding-left: 10px;
    letter-spacing: 0.5px;
}

.tx_jobfair .job-detail-card dd {
    margin: 0;
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.6;
}

.tx_jobfair .job-detail-card dd p {
    margin: 0 0 12px 0;
}

.tx_jobfair .job-detail-card dd p:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   5. GRID-LAYOUTS & ECKDATEN-KARTEN
   ========================================================================== */

/* 3x3 Eckdaten Grid */
.tx_jobfair .job-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

/* 2 Spalten Grid für Datumsangaben */
.tx_jobfair .job-grid-2.meta-dates {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 25px;
}

/* Einzelne Grid-Karten */
.tx_jobfair .grid-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tx_jobfair .grid-item:hover {
    border-color: #d5810e;
    box-shadow: 0 4px 10px rgba(213, 129, 14, 0.12);
    transform: translateY(-2px);
}

.tx_jobfair .grid-item dt {
    font-size: 0.8rem;
    font-weight: 700;
    color: #d5810e;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tx_jobfair .grid-item dd {
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1.3;
}


/* ==========================================================================
   6. FORMULAR (Erstellen / Bearbeiten & Dropdowns)
   ========================================================================== */

/* Formular-Hauptcontainer */
.tx_jobfair form.form-horizontal {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.tx_jobfair form.form-horizontal legend {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #d5810e;
    width: 100%;
    display: block;
    float: none;
}

/* Sektionen im Formular */
.tx_jobfair .form-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.tx_jobfair .form-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #d5810e;
    margin: 0 0 20px 0;
    border-left: 4px solid #d5810e;
    padding-left: 10px;
}

/* Bootstrap Floating Overrides */
.tx_jobfair form.form-horizontal .form-group {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 20px;
}

.tx_jobfair form.form-horizontal .col-sm-3,
.tx_jobfair form.form-horizontal .col-sm-5,
.tx_jobfair form.form-horizontal .col-sm-7,
.tx_jobfair form.form-horizontal .col-sm-9,
.tx_jobfair form.form-horizontal .col-sm-offset-3 {
    float: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
}

/* Formular Labels */
.tx_jobfair form.form-horizontal label,
.tx_jobfair form.form-horizontal .control-label {
    display: block !important;
    text-align: left !important;
    font-weight: bold;
    color: #444;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

/* Inputs, Textareas & Controls */
.tx_jobfair .form-control,
.tx_jobfair form.form-horizontal input[type="text"],
.tx_jobfair form.form-horizontal input[type="email"],
.tx_jobfair form.form-horizontal textarea {
    width: 100% !important;
    max-width: 100% !important;
    background-color: #fcfcfc !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 6px !important;
    color: #333333 !important;
    padding: 10px 14px !important;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}

.tx_jobfair .form-control:focus,
.tx_jobfair form.form-horizontal input:focus,
.tx_jobfair form.form-horizontal textarea:focus {
    background-color: #ffffff !important;
    border-color: #d5810e !important;
    box-shadow: 0 0 0 3px rgba(213, 129, 14, 0.15) !important;
    outline: none !important;
}

/* Dropdown-Selects (Multiple) */
.tx_jobfair select.tx_jobfair-new-select,
.tx_jobfair form.form-horizontal select {
    width: 100% !important;
    background-color: #f9f9f9 !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 6px !important;
    padding: 6px !important;
    outline: none;
}

.tx_jobfair form.form-horizontal select[multiple] {
    height: 120px;
}

.tx_jobfair select.tx_jobfair-new-select option {
    padding: 8px 12px;
    margin-bottom: 2px;
    border-radius: 4px;
    color: #4a5568;
    background-color: transparent;
}

.tx_jobfair select.tx_jobfair-new-select option:checked {
    background-color: #d5810e !important;
    color: #ffffff !important;
    background: #d5810e linear-gradient(0deg, #d5810e 0%, #d5810e 100%) !important;
}

.tx_jobfair select.tx_jobfair-new-select option:hover {
    background-color: #f0f0f0;
}

/* Formular Grid (Eckdaten) */
.tx_jobfair form.form-horizontal .form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.tx_jobfair form.form-horizontal .form-grid-3 .grid-item {
    background: #fcfcfc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    box-shadow: none;
}

.tx_jobfair form.form-horizontal .form-grid-3 .grid-item:hover {
    transform: none;
    border-color: #e2e8f0;
}

.tx_jobfair form.form-horizontal .form-grid-3 .form-group {
    margin-bottom: 0;
}


/* ==========================================================================
   7. BUTTONS & AKTIONEN
   ========================================================================== */

#tx_jobfair-show-actionlist,
#tx_jobfair-list-actionlist,
#tx_jobfair-latest-actionlist {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.tx_jobfair a.btn,
.tx_jobfair button.btn,
.tx_jobfair input[type="submit"],
.tx_jobfair #jobfair_item_submit {
    display: inline-block;
    padding: 10px 24px;
    background-color: #d5810e !important;
    border: 1px solid #d5810e !important;
    color: #ffffff !important;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
}

.tx_jobfair a.btn:hover,
.tx_jobfair button.btn:hover,
.tx_jobfair input[type="submit"]:hover,
.tx_jobfair #jobfair_item_submit:hover {
    background-color: #b86e0b !important;
    border-color: #b86e0b !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(213, 129, 14, 0.25);
    transform: translateY(-1px);
}

.tx_jobfair a.btn-primary {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.tx_jobfair a.btn-primary:hover {
    background-color: #218838 !important;
    border-color: #218838 !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}


/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES (Alles zentral geregelt)
   ========================================================================== */

/* Tablets / Mittlere Bildschirme (< 992px) */
@media (max-width: 992px) {
    .tx_jobfair form.form-horizontal .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets / Smartphones (< 768px) */
@media (max-width: 768px) {
    .tx_jobfair form.form-horizontal,
    #tx_jobfair_filter {
        padding: 20px;
    }

    .tx_jobfair .form-section {
        padding: 15px !important;
    }

    .tx_jobfair.table {
        display: block;
        overflow-x: auto;
    }

    .tx_jobfair .job-grid-3x3,
    .tx_jobfair .job-grid-2.meta-dates {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tx_jobfair form.form-horizontal .form-grid-3 {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px;
    }

    .tx_jobfair select.tx_jobfair-new-select {
        min-height: 120px;
        font-size: 1rem;
    }
}

/* Tabellen-Karten für Mobile View (< 600px) */
@media (max-width: 600px) {

    #tx_jobfair-list-actionlist {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .tx_jobfair a.btn {
        width: 100%;
        text-align: center; /* Zentriert den Text INNERHALB des Breiten-Buttons */
        box-sizing: border-box; /* Verhindert Ungenauigkeiten beim Padding */
    }
    
    .table-responsive {
        border: none !important;
        overflow: visible !important;
    }

    .tx_jobfair.table thead {
        display: none !important;
    }

    .tx_jobfair.table,
    .tx_jobfair.table tbody {
        display: block !important;
        width: 100% !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .tx_jobfair.table tbody tr {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: #ffffff !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 8px !important;
        padding: 14px 16px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04) !important;
    }

    .tx_jobfair.table td {
        display: none !important;
        padding: 0 !important;
        border: none !important;
    }

    /* Spalte 1: Jobtitel */
    .tx_jobfair.table td:nth-child(1) {
        display: block !important;
        flex: 1 !important;
        padding-right: 10px !important;
    }

    .tx_jobfair.table td:nth-child(1) a {
        font-weight: bold;
        font-size: 1.1rem;
        color: #d5810e;
        text-decoration: none;
    }

    /* Spalte 6: Kategorie Badge */
    .tx_jobfair.table td:nth-child(6) {
        display: block !important;
        flex-shrink: 0 !important;
        background-color: #f0f0f0;
        color: #555;
        font-size: 0.85rem;
        font-weight: 600;
        padding: 4px 10px !important;
        border-radius: 6px;
        text-align: right;
    }
}

/* Sehr kleine Smartphones (< 576px) */
@media (max-width: 576px) {
    .tx_jobfair form.form-horizontal .form-grid-3 {
        grid-template-columns: 1fr;
    }
}