/**
 * Moodle Face-to-Face Display - Layout & Struktur
 * Diese Datei enthält nur Layout-relevante Styles
 */

/* ========================================
   BASE LAYOUT
   ======================================== */

.mf2f-sessions {
    max-width: 1200px;
    margin: 0 auto;
}

.mf2f-empty,
.mf2f-error {
    padding: 40px 20px;
    text-align: center;
}

/* ========================================
   CARDS LAYOUT (2-Spalten Standard)
   ======================================== */

.mf2f-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 1-Spalte Variante */
.mf2f-cards.mf2f-cols-1 {
    grid-template-columns: 1fr;
    gap: 0;
}

/* 3-Spalten Variante */
.mf2f-cards.mf2f-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Card Struktur */
.mf2f-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
}

.mf2f-card .mf2f-title {
    margin: 0;
    flex: 1;
}

.mf2f-card-body {
    padding: 0 24px 24px 24px;
}

.mf2f-card .mf2f-date,
.mf2f-card .mf2f-course,
.mf2f-card .mf2f-availability,
.mf2f-card .mf2f-trainers {
    margin-bottom: 12px;
}

.mf2f-card .mf2f-custom-fields {
    margin-bottom: 16px;
}

.mf2f-card .mf2f-custom-field {
    margin-bottom: 6px;
    line-height: 1.5;
}

.mf2f-card .mf2f-action {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

/* ========================================
   TABLE LAYOUT
   ======================================== */

.mf2f-table-wrapper {
    overflow-x: auto;
}

.mf2f-table {
    width: 100%;
    border-collapse: collapse;
}

.mf2f-table th {
    padding: 14px 16px;
    text-align: left;
}

.mf2f-table td {
    padding: 16px;
    vertical-align: middle;
}

/* ========================================
   LIST LAYOUT
   ======================================== */

.mf2f-list {
    padding: 0;
}

.mf2f-session-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mf2f-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
}

.mf2f-list-date {
    flex-shrink: 0;
    white-space: nowrap;
}

.mf2f-list-title {
    flex: 1;
}

.mf2f-list-item .mf2f-status-badge {
    flex-shrink: 0;
}

/* ========================================
   BUTTONS LAYOUT
   ======================================== */

.mf2f-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    text-decoration: none;
    cursor: pointer;
}

.mf2f-button-small {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    text-decoration: none;
    white-space: nowrap;
}

.mf2f-status-badge {
    display: inline-block;
    padding: 4px 12px;
}

/* ========================================
   RESPONSIVE LAYOUT
   ======================================== */

@media (max-width: 992px) {
    .mf2f-cards.mf2f-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mf2f-cards,
    .mf2f-cards.mf2f-cols-2,
    .mf2f-cards.mf2f-cols-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .mf2f-card-header {
        padding: 16px;
    }
    
    .mf2f-card-body {
        padding: 0 16px 16px 16px;
    }
    
    .mf2f-card .mf2f-action {
        flex-direction: column;
    }
    
    .mf2f-button {
        width: 100%;
        text-align: center;
    }
    
    .mf2f-table th,
    .mf2f-table td {
        padding: 12px 10px;
    }
    
    .mf2f-list-item {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    
    .mf2f-list-date {
        width: auto;
        margin-bottom: 4px;
    }
    
    .mf2f-list-title {
        width: 100%;
        order: -1;
    }
}

/* ========================================
   PRINT LAYOUT
   ======================================== */

@media print {
    .mf2f-button,
    .mf2f-button-small,
    .mf2f-action {
        display: none;
    }
    
    .mf2f-card,
    .mf2f-table tbody tr,
    .mf2f-list-item {
        break-inside: avoid;
    }
}
