/**
 * Moodle Face-to-Face Display - Theme & Design
 * Diese Datei enthält alle visuellen Styles (Farben, Schriften, etc.)
 * Kann vom Kunden angepasst werden ohne Layout zu beeinflussen
 */

/* ========================================
   VARIABLEN (für einfache Anpassung)
   ======================================== */

:root {
    /* Hauptfarben */
    --mf2f-primary: #1a365d;
    --mf2f-text: #1a1a1a;
    --mf2f-text-light: #555;
    --mf2f-text-muted: #666;
    
    /* Hintergründe */
    --mf2f-bg: #f5f5f5;
    --mf2f-bg-hover: #efefef;
    --mf2f-bg-white: #fff;
    
    /* Rahmen */
    --mf2f-border: #e5e5e5;
    --mf2f-border-dark: #ccc;
    
    /* Status-Farben */
    --mf2f-status-open-bg: #d4edda;
    --mf2f-status-open-text: #155724;
    --mf2f-status-full-bg: #f8d7da;
    --mf2f-status-full-text: #721c24;
    --mf2f-status-waitlist-bg: #fff3cd;
    --mf2f-status-waitlist-text: #856404;
    --mf2f-status-finished-bg: #e2e3e5;
    --mf2f-status-finished-text: #383d41;
    
    /* Fehler */
    --mf2f-error-bg: #fff5f5;
    --mf2f-error-text: #c00;
    
    /* Schriften */
    --mf2f-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    
    /* Radien */
    --mf2f-radius: 8px;
    --mf2f-radius-button: 25px;
    --mf2f-radius-badge: 20px;
}

/* ========================================
   BASE STYLES
   ======================================== */

.mf2f-sessions {
    font-family: var(--mf2f-font);
}

.mf2f-empty {
    color: var(--mf2f-text-muted);
    font-size: 16px;
    background: var(--mf2f-bg);
    border-radius: 4px;
}

.mf2f-error {
    color: var(--mf2f-error-text);
    background: var(--mf2f-error-bg);
    font-size: 16px;
    border-radius: 4px;
}

/* ========================================
   CARDS THEME
   ======================================== */

.mf2f-card {
    background: var(--mf2f-bg);
    border: 1px solid var(--mf2f-border);
    border-radius: var(--mf2f-radius);
    transition: background-color 0.2s ease;
}

.mf2f-card:hover {
    background: var(--mf2f-bg-hover);
}

/* 1-Spalte Variante: Rahmen anpassen */
.mf2f-cards.mf2f-cols-1 .mf2f-card {
    border-radius: 0;
    border-left: 1px solid var(--mf2f-border);
    border-right: 1px solid var(--mf2f-border);
    border-bottom: 1px solid var(--mf2f-border);
    border-top: none;
}

.mf2f-cards.mf2f-cols-1 .mf2f-card:first-child {
    border-top: 1px solid var(--mf2f-border);
}

/* Card Titel */
.mf2f-card .mf2f-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--mf2f-text);
}

/* Card Inhalt */
.mf2f-card .mf2f-date {
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.mf2f-card .mf2f-course {
    font-size: 14px;
}

.mf2f-card .mf2f-course a {
    color: var(--mf2f-primary);
    text-decoration: none;
}

.mf2f-card .mf2f-course a:hover {
    text-decoration: underline;
}

.mf2f-card .mf2f-availability {
    font-size: 14px;
    color: var(--mf2f-text-light);
}

.mf2f-card .mf2f-custom-field {
    font-size: 14px;
}

.mf2f-card .mf2f-field-label {
    font-weight: 700;
    color: var(--mf2f-text);
}

.mf2f-card .mf2f-field-value {
    color: #333;
}

.mf2f-card .mf2f-trainers {
    font-size: 14px;
    color: var(--mf2f-text-light);
}

/* Status-spezifische Card Styles */
.mf2f-card.mf2f-status-full {
    opacity: 0.7;
}

.mf2f-card.mf2f-status-full .mf2f-button {
    pointer-events: none;
    opacity: 0.5;
}

/* ========================================
   TABLE THEME
   ======================================== */

.mf2f-table {
    font-size: 14px;
    margin-bottom: 0;
}

.mf2f-table thead {
    background: var(--mf2f-primary);
    color: var(--mf2f-bg-white);
}

.mf2f-table th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: none;
    border-right: none;
}

.mf2f-table td {
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: none;
}

.mf2f-table-wrapper {
    border: 1px solid var(--mf2f-border);
    border-radius: var(--mf2f-radius);
    overflow-x: auto;
    overflow: hidden;
}

.mf2f-table tbody tr {
    background: var(--mf2f-bg);
    border-bottom: 1px solid var(--mf2f-border);
    transition: background-color 0.2s ease;
}

.mf2f-table tbody tr:hover {
    background: var(--mf2f-bg-hover);
}

.mf2f-table td a {
    color: var(--mf2f-primary);
    text-decoration: none;
}

.mf2f-table td a:hover {
    text-decoration: underline;
}

/* ========================================
   LIST THEME
   ======================================== */

.mf2f-list-item {
    background: var(--mf2f-bg);
    border-bottom: 1px solid var(--mf2f-border);
    transition: background-color 0.2s ease;
}

.mf2f-list-item:first-child {
    border-top: 1px solid var(--mf2f-border);
}

.mf2f-list-item:hover {
    background: var(--mf2f-bg-hover);
}

.mf2f-list-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--mf2f-primary);
}

.mf2f-list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--mf2f-text);
    text-decoration: none;
}

a.mf2f-list-title:hover {
    color: var(--mf2f-primary);
}

/* ========================================
   BUTTONS THEME
   ======================================== */

.mf2f-button {
    font-size: 14px;
    font-weight: 500;
    color: var(--mf2f-text-light);
    background: transparent;
    border: 1px solid var(--mf2f-border-dark);
    border-radius: var(--mf2f-radius-button);
    transition: all 0.2s ease;
}

.mf2f-button:hover {
    color: var(--mf2f-text);
    border-color: var(--mf2f-text);
    background: var(--mf2f-bg-white);
}

.mf2f-button-secondary {
    background: transparent;
    color: var(--mf2f-text-muted);
    border-color: var(--mf2f-border);
}

.mf2f-button-disabled {
    background: var(--mf2f-bg);
    color: var(--mf2f-text-muted);
    border-color: var(--mf2f-border);
    cursor: not-allowed;
    opacity: 0.6;
}

.mf2f-button-disabled::after {
    content: none;
}

.mf2f-button::after {
    content: " ›";
    margin-left: 4px;
    font-size: 16px;
}

.mf2f-button-small {
    font-size: 13px;
    font-weight: 500;
    color: var(--mf2f-text-light);
    background: transparent;
    border: 1px solid var(--mf2f-border-dark);
    border-radius: var(--mf2f-radius-badge);
    transition: all 0.2s ease;
}

.mf2f-button-small:hover {
    color: var(--mf2f-text);
    border-color: var(--mf2f-text);
    background: var(--mf2f-bg-white);
}

.mf2f-button-small::after {
    content: " ›";
    margin-left: 2px;
}

/* ========================================
   STATUS BADGES THEME
   ======================================== */

.mf2f-status-badge {
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--mf2f-radius-badge);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mf2f-status-badge.mf2f-status-open {
    background: var(--mf2f-status-open-bg);
    color: var(--mf2f-status-open-text);
}

.mf2f-status-badge.mf2f-status-full {
    background: var(--mf2f-status-full-bg);
    color: var(--mf2f-status-full-text);
}

.mf2f-status-badge.mf2f-status-waitlist {
    background: var(--mf2f-status-waitlist-bg);
    color: var(--mf2f-status-waitlist-text);
}

.mf2f-status-badge.mf2f-status-finished {
    background: var(--mf2f-status-finished-bg);
    color: var(--mf2f-status-finished-text);
}

/* ========================================
   RESPONSIVE THEME ANPASSUNGEN
   ======================================== */

@media (max-width: 768px) {
    .mf2f-cards .mf2f-card {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--mf2f-border);
    }
    
    .mf2f-cards .mf2f-card:first-child {
        border-top: 1px solid var(--mf2f-border);
    }
    
    .mf2f-card .mf2f-title {
        font-size: 16px;
    }
    
    .mf2f-table th,
    .mf2f-table td {
        font-size: 13px;
    }
}
