/* KlubblagLagSpelare Page Styles - Global Fallback */
/* Include this in app.css if scoped CSS doesn't work */

.klubblag-spelare-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.klubblag-spelare-container .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 1rem;
}

.klubblag-spelare-container .error-container {
    text-align: center;
    padding: 2rem;
}

/* Page Header */
.klubblag-spelare-container .page-header {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.klubblag-spelare-container .page-header h2 {
    margin: 0.5rem 0;
    font-size: 1.5rem;
    color: #333;
}

.klubblag-spelare-container .page-header .subtitle {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Player Count Indicator */
.klubblag-spelare-container .player-count-indicator {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 1.1rem;
}

.klubblag-spelare-container .player-count-indicator.count-valid {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.klubblag-spelare-container .player-count-indicator.count-invalid {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.klubblag-spelare-container .count-label {
    font-weight: 600;
}

.klubblag-spelare-container .count-value {
    font-weight: 700;
    font-size: 1.3rem;
}

.klubblag-spelare-container .count-info {
    margin-left: auto;
    font-size: 0.9rem;
    color: #666;
}

/* Section Containers */
.klubblag-spelare-container .section {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.klubblag-spelare-container .section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

/* Players Grid - Modern Design */
.klubblag-spelare-container .players-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.klubblag-spelare-container .player-card-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.klubblag-spelare-container .player-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: #007bff;
}

.klubblag-spelare-container .player-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.klubblag-spelare-container .player-number-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.klubblag-spelare-container .player-details {
    flex: 1;
    min-width: 0;
}

.klubblag-spelare-container .player-name-large {
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.klubblag-spelare-container .player-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.klubblag-spelare-container .player-tag .k-icon {
    font-size: 0.85rem;
}

.klubblag-spelare-container .global-tag {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.klubblag-spelare-container .custom-tag {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.klubblag-spelare-container .player-actions {
    flex-shrink: 0;
}

.klubblag-spelare-container .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.klubblag-spelare-container .empty-state .k-icon-64 {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.klubblag-spelare-container .empty-state p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.klubblag-spelare-container .empty-state-hint {
    font-size: 0.9rem !important;
    color: #adb5bd !important;
}

/* Add Player Action Buttons */
.klubblag-spelare-container .add-player-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.klubblag-spelare-container .action-button {
    width: 100%;
    justify-content: center;
}

/* Manual Entry Section */
.klubblag-spelare-container .manual-entry {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.klubblag-spelare-container .form-group {
    margin-bottom: 1.25rem;
}

.klubblag-spelare-container .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.klubblag-spelare-container .form-control {
    width: 100%;
}

.klubblag-spelare-container .add-button {
    width: 100%;
    margin-top: 1rem;
    min-height: 50px;
}

/* Info Messages */
.klubblag-spelare-container .info-message {
    padding: 1rem;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    color: #0c5460;
    margin: 1rem 0;
}

.klubblag-spelare-container .info-message.warning {
    background: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

/* Actions Bar */
.klubblag-spelare-container .actions-bar {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem;
    margin: 1rem -1rem -1rem -1rem;
    border-top: 2px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.klubblag-spelare-container .save-button {
    width: 100%;
    min-height: 50px;
    font-size: 1.1rem;
    font-weight: 600;
}

.klubblag-spelare-container .validation-message {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    text-align: center;
    font-size: 0.9rem;
}

/* Add Players Window */
.add-players-window .k-window-content {
    padding: 0;
}

.klubblag-spelare-container .dialog-content {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.klubblag-spelare-container .available-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.klubblag-spelare-container .available-player-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.klubblag-spelare-container .available-player-card:hover,
.klubblag-spelare-container .available-player-card:active {
    background: #f8f9fa;
    border-color: #007bff;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.klubblag-spelare-container .available-player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.klubblag-spelare-container .available-player-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.klubblag-spelare-container .available-player-details {
    flex: 1;
    min-width: 0;
}

.klubblag-spelare-container .available-player-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
    margin-bottom: 0.35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.klubblag-spelare-container .available-player-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.klubblag-spelare-container .available-player-meta .k-icon {
    font-size: 0.85rem;
}

.klubblag-spelare-container .available-player-action {
    flex-shrink: 0;
}

/* Responsive grid for dialog */
@media (max-width: 768px) {
    .klubblag-spelare-container .available-players-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .klubblag-spelare-container {
        padding: 0.5rem;
    }

    .klubblag-spelare-container .page-header {
        padding: 0.75rem;
    }

    .klubblag-spelare-container .page-header h2 {
        font-size: 1.3rem;
    }

    .klubblag-spelare-container .section {
        padding: 0.75rem;
    }

    .klubblag-spelare-container .player-card-modern,
    .klubblag-spelare-container .available-player-card {
        padding: 1rem;
    }

    .klubblag-spelare-container .player-number-badge {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .klubblag-spelare-container .player-name-large,
    .klubblag-spelare-container .available-player-name {
        font-size: 1rem;
    }
}

/* Touch-friendly targets */
@media (hover: none) and (pointer: coarse) {
    .klubblag-spelare-container .player-card-modern,
    .klubblag-spelare-container .available-player-card {
        min-height: 70px;
    }

    .klubblag-spelare-container .player-number-badge {
        width: 48px;
        height: 48px;
    }
}

/* Loading and fade animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.klubblag-spelare-container .player-card-modern,
.klubblag-spelare-container .available-player-card {
    animation: fadeIn 0.3s ease-out;
}
