/* =================================================================
   Klubblag Dashboard Styles
   ================================================================= */

.klubblag-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.klubblag-dashboard .dashboard-header {
    margin-bottom: 2rem;
}

.klubblag-dashboard .club-name {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Loading & Error States */
.klubblag-dashboard .loading-container,
.klubblag-dashboard .error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 1rem;
}

.klubblag-dashboard .empty-state {
    text-align: center;
    padding: 2rem;
}

/* Section Title */
.klubblag-dashboard .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

/* Matches Section */
.klubblag-dashboard .matches-section {
    margin-bottom: 3rem;
}

/* Mobile Match Cards */
.klubblag-dashboard .match-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.klubblag-dashboard .match-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: box-shadow 0.3s ease;
}

.klubblag-dashboard .match-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.klubblag-dashboard .match-card-header {
    margin-bottom: 0.75rem;
}

.klubblag-dashboard .match-card-header h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    color: #333;
}

.klubblag-dashboard .match-date {
    font-size: 0.875rem;
    color: #666;
}

.klubblag-dashboard .match-card-teams {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f5f5f5;
    border-radius: 8px;
    font-weight: 600;
}

.klubblag-dashboard .own-team {
    color: #667eea;
    font-weight: 700;
}

.klubblag-dashboard .opponent-team {
    color: #666;
}

.klubblag-dashboard .vs {
    color: #999;
    font-weight: 400;
    font-size: 0.875rem;
}

/* Volleyball Matches */
.klubblag-dashboard .volleyball-matches {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.klubblag-dashboard .volleyball-match-item {
    padding: 0.875rem;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.klubblag-dashboard .match-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.klubblag-dashboard .match-name {
    font-weight: 600;
    color: #333;
}

.klubblag-dashboard .players-assigned-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.klubblag-dashboard .assigned-players {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
}

.klubblag-dashboard .assign-button {
    width: 100%;
}

/* Desktop Match Cards */
.klubblag-dashboard .matches-list-desktop {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.klubblag-dashboard .match-desktop-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.klubblag-dashboard .match-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.klubblag-dashboard .match-header-row h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #333;
}

.klubblag-dashboard .match-teams-text {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

.klubblag-dashboard .match-date-desktop {
    font-size: 0.875rem;
    color: #666;
    white-space: nowrap;
}

.klubblag-dashboard .no-players-text {
    color: #999;
    font-style: italic;
}

.klubblag-dashboard .matches-grid {
    margin-top: 1rem;
}

/* Tournament Section */
.klubblag-dashboard .tournaments-section {
    margin-bottom: 2rem;
}

.klubblag-dashboard .tournament-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.klubblag-dashboard .tournament-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.klubblag-dashboard .tournament-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.klubblag-dashboard .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.klubblag-dashboard .tournament-name {
    margin: 0;
    font-size: 1.125rem;
    color: #333;
    flex: 1;
}

.klubblag-dashboard .tournament-sport {
    padding: 0.25rem 0.75rem;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.klubblag-dashboard .card-body {
    margin-bottom: 1rem;
}

.klubblag-dashboard .info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.klubblag-dashboard .info-row:last-child {
    border-bottom: none;
}

.klubblag-dashboard .label {
    font-weight: 600;
    color: #666;
    font-size: 0.875rem;
}

.klubblag-dashboard .value {
    color: #333;
    font-size: 0.875rem;
}

.klubblag-dashboard .card-footer {
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.klubblag-dashboard .view-button {
    width: 100%;
}

.klubblag-dashboard .tournament-grid-container {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* =================================================================
   Assign Players to Match Mobile Styles
   ================================================================= */

.assign-players-mobile {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

/* Match Header */
.assign-players-mobile .match-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 1rem;
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    text-align: center;
}

.assign-players-mobile .match-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.assign-players-mobile .match-teams {
    margin: 0.5rem 0;
    font-size: 1rem;
    opacity: 0.95;
}

.assign-players-mobile .match-round {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

/* Info/Error Banners */
.assign-players-mobile .info-banner,
.assign-players-mobile .error-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.assign-players-mobile .info-banner {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.assign-players-mobile .error-banner {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

/* Player Count Card */
.assign-players-mobile .player-count-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.assign-players-mobile .count-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f5f5f5;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.assign-players-mobile .count-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.assign-players-mobile .count-label {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.assign-players-mobile .count-text {
    flex: 1;
}

.assign-players-mobile .count-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.assign-players-mobile .count-text p {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
}

/* Count States */
.assign-players-mobile .count-empty .count-circle {
    background: #f5f5f5;
    color: #999;
}

.assign-players-mobile .count-partial .count-circle {
    background: #fff3e0;
    color: #f57c00;
}

.assign-players-mobile .count-full .count-circle {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Players Container */
.assign-players-mobile .players-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.assign-players-mobile .section-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.assign-players-mobile .players-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
}

/* Player Cards */
.assign-players-mobile .player-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.assign-players-mobile .player-card:active {
    transform: scale(0.98);
}

.assign-players-mobile .player-card.selected {
    border-color: #667eea;
    background: #f5f7ff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.assign-players-mobile .player-card.unavailable {
    opacity: 0.6;
    background: #fafafa;
    cursor: not-allowed;
}

.assign-players-mobile .player-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.assign-players-mobile .player-checkbox {
    flex-shrink: 0;
}

.assign-players-mobile .player-number-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.assign-players-mobile .player-card.unavailable .player-number-circle {
    background: #bdbdbd;
}

.assign-players-mobile .player-info {
    flex: 1;
    min-width: 0;
}

.assign-players-mobile .player-name {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.assign-players-mobile .unavailable-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #d32f2f;
    margin-top: 0.25rem;
}

.assign-players-mobile .selected-icon {
    flex-shrink: 0;
    color: #667eea;
}

/* Loading & Empty States */
.assign-players-mobile .loading-state,
.assign-players-mobile .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: #666;
}

.assign-players-mobile .loading-state p,
.assign-players-mobile .empty-state p {
    margin-top: 1rem;
    font-size: 0.875rem;
}

.assign-players-mobile .empty-state svg {
    opacity: 0.3;
}

/* Action Buttons */
.assign-players-mobile .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid #e0e0e0;
}

.assign-players-mobile .save-button,
.assign-players-mobile .cancel-button {
    width: 100%;
}

/* Scrollbar Styling */
.assign-players-mobile .players-list::-webkit-scrollbar {
    width: 6px;
}

.assign-players-mobile .players-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.assign-players-mobile .players-list::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}

.assign-players-mobile .players-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* =================================================================
   Responsive Design
   ================================================================= */

@media (max-width: 640px) {
    .klubblag-dashboard {
        padding: 0.5rem;
    }

    .klubblag-dashboard .dashboard-header {
        margin-bottom: 1.5rem;
    }

    .klubblag-dashboard .club-name {
        font-size: 1.5rem;
    }

    .klubblag-dashboard .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .klubblag-dashboard .matches-section {
        margin-bottom: 2rem;
    }
}

@media (min-width: 641px) {
    .klubblag-dashboard {
        padding: 2rem;
    }

    .klubblag-dashboard .match-card {
        padding: 1.5rem;
    }

    .klubblag-dashboard .volleyball-matches {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1rem;
    }

    .klubblag-dashboard .volleyball-match-item {
        padding: 1rem;
    }

    .assign-players-mobile {
        padding: 1rem;
    }

    .assign-players-mobile .match-header {
        margin: -1rem -1rem 1.5rem -1rem;
        padding: 2rem 1.5rem;
    }

    .assign-players-mobile .player-count-card {
        padding: 1.25rem;
    }

    .assign-players-mobile .action-buttons {
        flex-direction: row;
        padding-top: 1.5rem;
    }

    .assign-players-mobile .save-button,
    .assign-players-mobile .cancel-button {
        width: auto;
        flex: 1;
    }
}

@media (min-width: 768px) {
    .klubblag-dashboard .tournament-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.5rem;
    }

    .klubblag-dashboard .tournament-card {
        padding: 1.5rem;
    }
}
