/**
 * PFAD: /internal/turnier/css/tournaments.css
 * Version: 5.2.0
 * Datum: 27.11.2025
 * 
 * Turnierplan - Klassisches Format mit Filtern
 */

/* ============================================
   PAGE CONTAINER
   ============================================ */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-md);
    padding-bottom: 100px;
}

/* ============================================
   HEADER
   ============================================ */
.page-header {
    margin-bottom: var(--spacing-lg);
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-header h3 {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    margin: var(--spacing-xs) 0 0 0;
}

/* ============================================
   QUICK LINKS
   ============================================ */
.quick-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    padding-bottom: var(--spacing-xs);
}

.quick-link {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quick-link:active {
    transform: scale(0.97);
}

.quick-link .link-icon {
    font-size: 16px;
}

.quick-link.highlight {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-left: 40px;
    padding-right: 36px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear:hover {
    background: var(--danger-color);
    color: white;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.filter-row {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.filter-row + .filter-row {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.filter-chip {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:active {
    transform: scale(0.97);
}

.filter-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Filter Select */
.filter-select {
    flex: 1;
    min-width: 120px;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ============================================
   TURNIERPLAN
   ============================================ */
.turnierplan {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

/* Header */
.plan-header {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--success-color);
    color: white;
    font-weight: 700;
    font-size: 14px;
}

/* Row */
.plan-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.plan-row:last-child {
    border-bottom: none;
}

.plan-row:hover {
    background: var(--bg-hover);
}

.plan-row.registered {
    background: rgba(40, 167, 69, 0.05);
    border-left: 3px solid var(--success-color);
}

/* ============================================
   DATUM SPALTE
   ============================================ */
.col-datum {
    display: flex;
    align-items: flex-start;
}

.datum-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-xs) var(--spacing-sm);
    min-width: 70px;
}

.datum-monat {
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: var(--success-color);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
}

.datum-tag {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.datum-wochentag {
    font-size: 10px;
    color: var(--text-secondary);
}

/* ============================================
   VERANSTALTUNG SPALTE
   ============================================ */
.col-veranstaltung {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.turnier-titel {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.typ-badge {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
}

.typ-badge.pyramide {
    background: rgba(138, 43, 226, 0.2);
}

.typ-badge.team {
    background: rgba(255, 193, 7, 0.2);
}

.typ-badge.einzel {
    background: rgba(40, 167, 69, 0.2);
}

.turnier-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.turnier-details {
    font-size: 12px;
    color: var(--text-muted);
}

.turnier-plaetze {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 500;
}

.turnier-kapazitaet {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Action Links */
.action-row {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.action-links-left,
.action-links-right {
    display: flex;
    gap: var(--spacing-lg);
}

.action-link {
    font-size: 13px;
    color: var(--success-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.action-link:hover {
    color: var(--success-hover);
    text-decoration: underline;
}

.action-link.primary {
    font-weight: 700;
}

.action-link.edit {
    color: var(--warning-color, #f59e0b);
    font-weight: 600;
}

.action-link.edit:hover {
    color: var(--warning-hover, #d97706);
}

/* ============================================
   SPONSOR SPALTE
   ============================================ */
.col-sponsor {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.sponsor-logo {
    max-width: 60px;
    max-height: 40px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

/* Anmelden Button */
.btn-anmelden {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--success-color);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-anmelden:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.btn-anmelden:active {
    transform: scale(0.97);
}

/* Angemeldet Status */
.angemeldet-status {
    font-size: 11px;
    font-weight: 700;
    color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    text-align: center;
    gap: var(--spacing-sm);
}

.empty-icon {
    font-size: 48px;
    opacity: 0.5;
}

.empty-text {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Empty Filter State */
.empty-filter-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl);
    text-align: center;
    gap: var(--spacing-sm);
}

.btn-reset {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-reset:hover {
    background: var(--primary-hover);
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 600px) {
    .plan-header {
        display: none;
    }
    
    .plan-row {
        grid-template-columns: 70px 1fr;
        grid-template-rows: auto auto;
    }
    
    .col-sponsor {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
        padding-top: var(--spacing-sm);
        border-top: 1px dashed var(--border-color);
    }
    
    .datum-box {
        min-width: 60px;
    }
    
    .datum-tag {
        font-size: 20px;
    }
    
    .action-row {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .action-links-left,
    .action-links-right {
        justify-content: flex-start;
        gap: var(--spacing-md);
    }
    
    .filter-select {
        min-width: 100%;
    }
}

/* ============================================
   DESKTOP
   ============================================ */
@media (min-width: 768px) {
    .page-container {
        padding: var(--spacing-xl);
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .plan-header {
        grid-template-columns: 100px 1fr 120px;
    }
    
    .plan-row {
        grid-template-columns: 100px 1fr 120px;
    }
    
    .datum-box {
        min-width: 80px;
    }
    
    .sponsor-logo {
        max-width: 100px;
        max-height: 50px;
    }
}
