/* TT Turniere Frontend Styles */

.tt-turniere-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tt-tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tt-tournament-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.tt-tournament-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tt-tournament-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.tt-tournament-date {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.tt-tournament-location {
    font-size: 14px;
    color: #777;
    margin-bottom: 12px;
}

.tt-tournament-description {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 15px;
}

.tt-tournament-meta {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.tt-tournament-deadline {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.tt-tournament-classes {
    margin-bottom: 15px;
}

.tt-tournament-classes-label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.tt-class-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #555;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.tt-tournament-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tt-tournament-link {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.tt-tournament-link:hover {
    background: #005a87;
    color: #fff;
}

.tt-tournament-link.tt-registration-link {
    background: #e74c3c;
    font-weight: bold;
}

.tt-tournament-link.tt-registration-link:hover {
    background: #c0392b;
}

.tt-tournament-link.tt-results-link {
    background: #46b450;
}

.tt-tournament-link.tt-results-link:hover {
    background: #399b44;
}

.tt-tournament-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    float: right;
    margin-top: -5px;
}

.tt-status-aktiv {
    background: #46b450;
    color: #fff;
}

.tt-status-abgesagt {
    background: #dc3232;
    color: #fff;
}

.tt-status-beendet {
    background: #ffb900;
    color: #333;
}

.tt-no-tournaments {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.tt-filter-bar {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.tt-filter-bar select,
.tt-filter-bar input {
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Registration Form Styles */

.tt-registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.tt-tournament-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #0073aa;
}

.tt-tournament-info h3 {
    margin-top: 0;
    color: #0073aa;
}

.tt-registration-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tt-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tt-form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tt-form-section h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.tt-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.tt-form-field {
    display: flex;
    flex-direction: column;
}

.tt-form-field label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

.tt-form-field input,
.tt-form-field select,
.tt-form-field textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.tt-form-field input:focus,
.tt-form-field select:focus,
.tt-form-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.tt-participant {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.tt-participant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.tt-participant-header h5 {
    margin: 0;
    color: #495057;
    font-size: 16px;
}

.tt-remove-participant {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tt-remove-participant:hover {
    background: #c82333;
}

.tt-button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tt-button-primary {
    background: #0073aa;
    color: white;
}

.tt-button-primary:hover {
    background: #005a87;
}

.tt-button-secondary {
    background: #6c757d;
    color: white;
    margin-top: 10px;
}

.tt-button-secondary:hover {
    background: #5a6268;
}

.tt-button:disabled {
    background: #95a5a6 !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.tt-form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tt-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-weight: bold;
}

.tt-message.tt-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tt-message.tt-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tt-klassen-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.tt-klasse-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.tt-klasse-checkbox:hover {
    background: #e9ecef;
}

.tt-klasse-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.tt-klasse-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    color: #555;
    font-size: 0.9em;
}

.tt-klasse-checkbox input[type="checkbox"]:checked + label {
    font-weight: 600;
    color: #0073aa;
}

@media screen and (max-width: 768px) {
    .tt-tournament-grid {
        grid-template-columns: 1fr;
    }
    
    .tt-tournament-links {
        flex-direction: column;
    }
    
    .tt-tournament-link {
        text-align: center;
    }
    
    .tt-filter-bar {
        padding: 15px;
    }
    
    .tt-filter-bar select,
    .tt-filter-bar input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .tt-registration-container {
        padding: 15px;
    }
    
    .tt-registration-form {
        padding: 20px;
    }
    
    .tt-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tt-participant {
        padding: 15px;
    }
    
    .tt-participant-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tt-klassen-checkboxes {
        grid-template-columns: 1fr;
    }
}