/* Draft System Styles */
.draft-order-container {
    margin-bottom: 30px;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

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

.draft-order-header h4 {
    margin: 0;
    color: #2c3e50;
}

.draft-order-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.draft-order-list.editing {
    border: 2px dashed #007bff;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
}

.draft-order-item.editing {
    cursor: move;
    background-color: white;
    border: 1px solid #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
    position: relative;
}

.draft-order-item.editing:hover {
    background-color: #e3f2fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.draft-order-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.draft-order-item.drag-over {
    border-color: #28a745;
    background-color: #d4edda;
}

.draft-order-item .reorder-controls {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    gap: 4px;
}

.draft-order-item.editing .reorder-controls {
    display: flex;
}

.reorder-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.reorder-btn:hover {
    background-color: #e9ecef;
    color: #2c3e50;
}

.reorder-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.penalty-btn {
    color: #dc3545 !important;
    font-weight: bold;
}

.penalty-btn:hover {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

.draft-order-item .player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    margin-right: 40px;
}

.draft-order-item .player-stats {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: auto;
}

.draft-order-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.draft-order-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #e9ecef;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.draft-order-item.current {
    background-color: #007bff;
    color: white;
}

.draft-order-item.completed {
    background-color: #28a745;
    color: white;
}

.draft-order-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.team-selection-container {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 20px;
}

.current-picker {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.picker-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.picker-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.picker-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #6c757d;
}

.available-teams {
    margin-bottom: 25px;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.team-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.team-card:hover {
    background-color: #e9ecef;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.team-card.selected {
    background-color: #d4edda;
    border-color: #28a745;
    cursor: not-allowed;
}

.team-card.unavailable {
    background-color: #f8d7da;
    border-color: #dc3545;
    cursor: not-allowed;
    opacity: 0.6;
}

.team-card.unavailable:hover {
    transform: none;
    box-shadow: none;
}

.team-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 4px;
    object-fit: contain;
}

.team-name {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.team-status {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.team-status.available {
    background-color: #d4edda;
    color: #155724;
}

.team-status.selected {
    background-color: #cce5ff;
    color: #004085;
}

.team-status.unavailable {
    background-color: #f8d7da;
    color: #721c24;
}

.selection-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Draft State Indicators */
.draft-state {
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

.draft-state.not-started {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.draft-state.in-progress {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.draft-state.completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Draft Manager Layout */
.draft-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.draft-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.draft-section.full-width {
    grid-column: 1 / -1;
}

.draft-section {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 20px;
}

.draft-section h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Draft Header */
.draft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.draft-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Draft List */
.drafts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.draft-item {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.draft-item:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.draft-item.selected {
    border-color: #007bff;
    background-color: #e3f2fd;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.draft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.draft-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.draft-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.draft-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.draft-status.in_progress {
    background-color: #d1ecf1;
    color: #0c5460;
}

.draft-status.completed {
    background-color: #d4edda;
    color: #155724;
}

.draft-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Draft Details */
.draft-details {
    min-height: 200px;
}

.draft-info h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.draft-meta p {
    margin: 8px 0;
    font-size: 0.9rem;
}

.draft-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-pending {
    color: #856404;
    font-weight: 600;
}

.status-in_progress {
    color: #0c5460;
    font-weight: 600;
}

.status-completed {
    color: #155724;
    font-weight: 600;
}

/* Draft Order */
.draft-order-container {
    min-height: 300px;
}

.draft-progress {
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
}

.team-selection {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.team-name {
    font-weight: 600;
    color: #2c3e50;
}

.penalty-badge {
    background-color: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Postponed Fixtures */
.postponed-fixtures-container {
    min-height: 150px;
}

.postponed-fixtures-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.postponed-fixture-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.fixture-info h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.fixture-info p {
    margin: 2px 0;
    font-size: 0.85rem;
    color: #6c757d;
}

.fixture-actions {
    display: flex;
    gap: 8px;
}

/* Teams Grid in Modal */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px 0;
}

.team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 120px;
    justify-content: center;
}

.team-card:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.team-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.team-card .team-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    line-height: 1.2;
    word-break: break-word;
}

/* No Data States */
.no-data, .no-draft-selected {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.no-data p, .no-draft-selected p {
    margin: 0;
    font-size: 1rem;
}

/* Draft Selection Modal */
.draft-selection-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.draft-selection-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.available-months-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.month-card {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
    position: relative;
}

.month-card:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.month-card.selected {
    border-color: #007bff;
    background-color: #e3f2fd;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.month-card.unavailable {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #f8d7da;
    border-color: #dc3545;
}

.month-card.unavailable:hover {
    transform: none;
    box-shadow: none;
    border-color: #dc3545;
    background-color: #f8d7da;
}

.month-card .month-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.month-card .year {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.month-card .status {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.month-card .status.available {
    background-color: #d4edda;
    color: #155724;
}

.month-card .status.unavailable {
    background-color: #f8d7da;
    color: #721c24;
}

.month-card .status.completed {
    background-color: #cce5ff;
    color: #004085;
}

.month-card .status.in-progress {
    background-color: #fff3cd;
    color: #856404;
}

.month-card .reason {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Large Modal */
.large-modal {
    max-width: 600px;
    width: 90%;
}

/* Reorder Players */
.reorder-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.reorder-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.reorder-players-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.reorder-player-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
    gap: 15px;
}

.reorder-player-item:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reorder-controls {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reorder-controls .btn {
    padding: 2px 6px;
    font-size: 0.75rem;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reorder-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.player-stats {
    font-size: 0.85rem;
    color: #6c757d;
}

.reorder-number {
    background-color: #007bff;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Admin Complete Button */
.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

/* Outline Buttons */
.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* Pick Actions */
.pick-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.pick-actions .btn {
    padding: 2px 6px;
    font-size: 0.75rem;
    min-width: auto;
}

.team-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.team-selection .team-name {
    flex: 1;
}

/* Small buttons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .draft-sections {
        grid-template-columns: 1fr;
    }
    
    .draft-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .draft-controls {
        justify-content: center;
    }
    
    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .team-card {
        min-height: 100px;
        padding: 10px 5px;
    }
    
    .team-logo {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }
    
    .team-card .team-name {
        font-size: 0.8rem;
    }
    
    .postponed-fixture-item {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .fixture-actions {
        justify-content: center;
    }
    
    .available-months-container {
        grid-template-columns: 1fr;
    }
}

/* Draft Scheduling Styles */
.draft-scheduled {
    margin: 15px 0;
    padding: 15px;
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
}

.draft-scheduled p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #0066cc;
}

.countdown-timer {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0066cc;
    text-align: center;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    border: 2px solid #0066cc;
}

.countdown-time {
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.countdown-expired {
    color: #28a745;
    font-weight: 700;
    font-size: 1.1rem;
}
