/* DiplomMatch Frontend Styles */

.diplomatch-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0px;
    font-family: Arial, sans-serif;
}

.diplomatch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e1e1;
}

.diplomatch-header h2 {
    margin: 0;
    color: #333;
}

/* Tabs */
.diplomatch-tabs {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.diplomatch-tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 14px;
}

.diplomatch-tab-button:hover {
    background-color: #f5f5f5;
}

.diplomatch-tab-button.active {
    border-bottom-color: #0073aa;
    color: #0073aa;
    font-weight: bold;
}

.diplomatch-tab-content {
    display: none;
    max-width: 1024px;
    margin: 0 auto;
    padding-top: 0;
    margin-top: 0;
}

.diplomatch-tab-content.active {
    display: block;
}

/* White background for "Mine Diplomstævner" tab */
#events-tab {
    background: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Forms */
.diplomatch-form {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.diplomatch-form h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,0.3);
}

/* Buttons */
.diplomatch-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.diplomatch-button:hover {
    background-color: #005a87;
}

.diplomatch-button.secondary {
    background-color: #666;
}

.diplomatch-button.secondary:hover {
    background-color: #444;
}

.diplomatch-form .diplomatch-button {
    width: 100%;
    margin-top: 10px;
}

/* Messages */
.diplomatch-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 3px;
    display: none;
}

.diplomatch-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.diplomatch-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.diplomatch-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading state */
.diplomatch-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.diplomatch-form.loading .diplomatch-button {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Modal */
.diplomatch-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diplomatch-modal-content {
    background: white;
    padding: 30px;
    border-radius: 5px;
    text-align: center;
    max-width: 800px;
    margin: 20px;
}

.diplomatch-modal-content h4 {
    margin-top: 0;
    color: #d63384;
}

.diplomatch-modal-content p {
    margin-bottom: 20px;
}

.diplomatch-modal-content .diplomatch-button {
    margin: 0 10px;
    width: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .diplomatch-container {
        padding: 10px;
    }
    
    .diplomatch-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .diplomatch-tabs {
        flex-direction: column;
    }
    
    .diplomatch-tab-button {
        text-align: left;
        border-bottom: 1px solid #ddd;
        border-left: 2px solid transparent;
    }
    
    .diplomatch-tab-button.active {
        border-bottom-color: #ddd;
        border-left-color: #0073aa;
    }
    
    .diplomatch-form {
        padding: 15px;
    }
    
    .diplomatch-modal-content {
        margin: 10px;
        padding: 20px;
    }
    
    .diplomatch-modal-content .diplomatch-button {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}

/* Animation for tab switching */
.diplomatch-tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Focus styles for accessibility */
.diplomatch-button:focus,
.diplomatch-tab-button:focus,
.form-group input:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Success checkmark animation */
.diplomatch-message.success::before {
    content: "✓ ";
    font-weight: bold;
}

.diplomatch-message.error::before {
    content: "⚠ ";
    font-weight: bold;
}

/* Boxer form container */
#boxer-form-container {
    margin-bottom: 2rem;
    margin-top: 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#boxer-form-container h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073aa;
}

#cancel-add-boxer {
    margin-left: 10px;
}

/* Event form container */
#event-form-container {
    margin-bottom: 2rem;
    margin-top: 0;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#event-form-container h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073aa;
}

#cancel-add-event {
    margin-left: 10px;
}

/* Registration form container */
#registration-form-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hide events list when registration form is open */
#registration-form-container:not([style*="display: none"]) ~ #events-list {
    display: none !important;
}

/* Alternative selector - hide events list when registration form is visible */
#events-tab:has(#registration-form-container:not([style*="display: none"])) #events-list {
    display: none !important;
}

.registration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073aa;
}

.registration-header h4 {
    margin: 0;
    color: #333;
}

#cancel-registration-form {
    margin: 0;
}

/* Boxer Management Styles */
.diplomatch-boxers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 0 !important;
    padding: 20px 20px 10px 20px;
    padding-top: 20px !important;
    border-bottom: 2px solid #e1e1e1;
    background: white;
    border-radius: 5px 5px 0 0;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

.diplomatch-boxers-header h3 {
    margin: 0;
    color: #333;
}

.diplomatch-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: bold;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
}

.diplomatch-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    color: #000;
}

.diplomatch-filters label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: #000;
}

.diplomatch-filters select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.diplomatch-boxers-list {
    min-height: 200px;
    max-width: 1024px;
    margin: 0 auto;
}

.boxer-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 2 columns instead of 1 */
    gap: 15px;  /* Reduced gap for tighter layout */
}

.boxer-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.boxer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.boxer-card.inactive {
    opacity: 0.7;
    background: #f8f9fa;
}

.boxer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.boxer-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Boksehanske ikoner baseret på køn */
.boxer-gender-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    line-height: 20px;
    border-radius: 50%;
    margin-right: 5px;
}

.boxer-gender-icon.male {
    background-color: #4A90E2;
    color: white;
}

.boxer-gender-icon.female {
    background-color: #E74C3C;
    color: white;
}

.boxer-gender-icon::before {
    content: "🥊";
    display: inline-block;
}

.boxer-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.boxer-status.active {
    background: #d4edda;
    color: #155724;
}

.boxer-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.boxer-info {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.info-row .label {
    font-weight: bold;
    color: #666;
}

.info-row .value {
    color: #333;
}

.boxer-actions {
    display: flex;
    gap: 10px;
}

.diplomatch-button.small {
    padding: 6px 12px;
    font-size: 12px;
    flex: 1;
}

/* Modal specific for boxers */
.diplomatch-modal .diplomatch-modal-content {
    max-width: 800px;
    text-align: left;
}

/* Modal specific for registration (tilmeld boksere) */
#registration-modal .diplomatch-modal-content {
    max-width: 800px;
    text-align: left;
    color: #000;
}

/* Modal specific for events (opret/rediger diplomstævne) */
#event-modal .diplomatch-modal-content {
    max-width: 800px;
    text-align: left;
}

.diplomatch-modal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
}

.diplomatch-modal .close:hover {
    color: #333;
}

.diplomatch-modal .diplomatch-modal-content {
    position: relative;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .diplomatch-button {
    flex: 1;
    width: auto;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    background: white;
    box-sizing: border-box;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 20px;
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
}

.no-boxers {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsive adjustments for boxers */
@media (max-width: 768px) {
    .diplomatch-boxers-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .diplomatch-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .diplomatch-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .boxer-cards {
        grid-template-columns: 1fr;
    }
    
    .boxer-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .boxer-actions {
        flex-direction: column;
    }
    
    .diplomatch-modal .diplomatch-modal-content {
        margin: 20px 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .diplomatch-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        text-align: left;
    }
    
    .stat-label,
    .stat-value {
        display: inline;
    }
    
    .stat-label::after {
        content: ": ";
    }
}

/* Events management styles */
#events-tab {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#events-tab .diplomatch-boxers-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Specific targeting for the "Tilføj Diplomstævne" button */
#add-event-btn {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove any spacing from parent containers in events tab */
#events-tab > .diplomatch-boxers-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 20px !important;
}

.diplomatch-events-list {
    min-height: 200px;
    max-width: 1024px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 5px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
    margin-top: 1rem;
}

.event-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
    color: #000;
}

.event-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.event-card.past-event {
    opacity: 0.8;
    background: #f8f8f8;
}

.event-card.inactive-event {
    opacity: 0.6;
    border-color: #ccc;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.event-header h4 {
    margin: 0;
    color: #000;
    font-size: 1.1rem;
}

.event-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status.active {
    background: #d4edda;
    color: #155724;
}

.status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status.upcoming {
    background: #cce7ff;
    color: #004085;
}

.status.past {
    background: #e2e3e5;
    color: #383d41;
}

.status.private {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.event-details {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #000;
}

.event-info {
    margin-bottom: 1rem;
    color: #000;
}

.event-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #000;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.event-actions .diplomatch-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Fight actions styling */
.fight-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fight-actions .diplomatch-button {
    width: 100%;
    font-size: 0.8rem;
}

.referee-delete-buttons {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 5px 0;
}

.referee-delete-buttons .diplomatch-button {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.diplomatch-button.success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.diplomatch-button.danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Matchmaking styles */
#matchmaking-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.matchmaking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #28a745;
}

.matchmaking-header h4 {
    margin: 0;
    color: #333;
}

.matchmaking-controls {
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.matchmaking-controls h5 {
    margin: 0 0 1rem 0;
    color: #495057;
}

.criteria-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.match-suggestions {
    margin-bottom: 2rem;
    max-height: 500px;
    overflow-y: auto;
}

.match-suggestions-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.match-suggestions-header h5 {
    margin: 0 0 0.5rem 0;
    color: #2c5aa0;
}

.match-suggestions h5 {
    color: #28a745;
    margin-bottom: 1rem;
}

.match-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.match-suggestion-item.excellent {
    border-left: 4px solid #28a745;
    background: #f8fff9;
}

.match-suggestion-item.good {
    border-left: 4px solid #ffc107;
    background: #fffdf7;
}

.match-suggestion-item.fair {
    border-left: 4px solid #fd7e14;
    background: #fff9f5;
}

.match-details {
    flex: 1;
}

.boxer-pair {
    display: flex;
    gap: 2rem;
    margin-bottom: 0.5rem;
}

.boxer-info {
    display: flex;
    flex-direction: column;
}

.boxer-name {
    font-weight: bold;
    color: #333;
}

.boxer-club {
    font-size: 0.8rem;
    color: #0073aa;
    font-weight: 500;
    margin-bottom: 2px;
}

.boxer-stats {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 2px;
}

.boxer-coach-info {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
}

.match-score {
    text-align: center;
    padding: 0.5rem;
}

.score-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.score-badge.excellent {
    background: #d4edda;
    color: #155724;
}

.score-badge.good {
    background: #fff3cd;
    color: #856404;
}

.score-badge.fair {
    background: #f8d7da;
    color: #721c24;
}

.match-actions {
    display: flex;
    gap: 0.5rem;
}

.registered-boxers-section {
    margin-bottom: 2rem;
}

.registered-boxers-section h5 {
    margin-bottom: 1rem;
    color: #495057;
}

.boxer-card-mini {
    display: block;  /* Changed from inline-block to block for full width */
    margin: 0.25rem 0;  /* Only vertical margin for full width */
    padding: 0.75rem 1rem 0.6rem 1rem;  /* Reduced bottom padding since drag-indicator is removed */
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;  /* Use full width */
    box-sizing: border-box;
}

.boxer-card-mini .boxer-name {
    font-weight: bold;
    margin-bottom: 4px;  /* Slightly more space */
    font-size: 0.9rem;
}

.boxer-card-mini .boxer-stats-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    flex-wrap: wrap;  /* Allow wrapping on smaller screens */
    gap: 8px;
}

.boxer-card-mini .boxer-stats {
    font-size: 0.8rem;
    color: #666;
    flex: 1;  /* Take up remaining space */
}

.boxer-card-mini .boxer-coach {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
    white-space: nowrap;  /* Prevent line breaks */
}

.boxer-card-mini .drag-indicator {
    font-size: 0.7rem;
    color: #aaa;
    text-align: center;
    margin-top: 4px;
    border-top: 1px solid #eee;
    padding-top: 2px;
}

/* Visual indicators for fight status */
.boxer-card-mini.has-fights {
    border-left: 4px solid #28a745;  /* Green border for boxers with fights */
    background: #f8fff9;  /* Light green background */
}

.boxer-card-mini.no-fights {
    border-left: 4px solid #007bff;  /* Blue border for available boxers */
    background: #f8fcff;  /* Light blue background */
}

.boxer-card-mini.has-fights .boxer-name {
    color: #155724;  /* Darker green text for boxers with fights */
}

.boxer-card-mini.no-fights .boxer-name {
    color: #004085;  /* Darker blue text for available boxers */
}

/* Responsive design for boxer cards */
@media (max-width: 768px) {
    .boxer-cards,
    #matchmaking-registered-boxers {
        grid-template-columns: 1fr;  /* Single column on mobile */
        gap: 10px;
    }
    
    .boxer-card-mini .boxer-stats-line {
        flex-direction: column;  /* Stack stats and coach info vertically on mobile */
        align-items: flex-start;
        gap: 2px;
    }
    
    .boxer-card-mini .boxer-coach {
        white-space: normal;  /* Allow wrapping on mobile */
    }
}

/* Matchmaking registered boxers container - same styling as boxer-cards */
#matchmaking-registered-boxers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 2 columns like boxer-cards */
    gap: 15px;
}

.boxer-card-mini:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.boxer-card-mini.selected {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.boxer-card-mini.selected .boxer-stats,
.boxer-card-mini.selected .boxer-coach {
    color: rgba(255, 255, 255, 0.8);
}

/* Drag and drop styling for boxers */
.draggable-boxer {
    cursor: grab;
    transition: all 0.2s ease;
}

.draggable-boxer:active {
    cursor: grabbing;
}

.draggable-boxer.dragging {
    opacity: 0.6;
    transform: scale(0.95);
    z-index: 1000;
}

.draggable-boxer.drag-over {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.drag-indicator {
    font-size: 0.7rem;
    color: #999;
    text-align: center;
    margin-top: 4px;
    font-weight: bold;
}

.draggable-boxer:hover .drag-indicator {
    color: #007bff;
}

.manual-matches {
    border-top: 2px solid #dee2e6;
    padding-top: 1.5rem;
}

.manual-matches h5 {
    margin-bottom: 1rem;
    color: #495057;
}

/* Fight Program styles */
.fight-program {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
}

.fight-program h5 {
    color: #155724;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.program-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.fight-program-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    border-left: 4px solid #28a745;
    cursor: move;
    transition: all 0.2s ease;
}

.fight-program-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.fight-program-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.fight-program-item.drag-over {
    border-color: #007cba;
    background-color: #f0f9ff;
}

.fight-program-item.club-drag-over {
    border-color: #0073aa;
    background-color: #fff8e1;
    transform: scale(1.01);
}

.drag-handle {
    color: #666;
    font-weight: bold;
    cursor: grab;
    padding: 0 8px;
    user-select: none;
    font-size: 14px;
}

.fight-program-item .fight-number {
    font-weight: bold;
    color: #28a745;
    min-width: 60px;
}

.fight-program-item .match-details {
    flex: 1;
    margin: 0 1rem;
}

.fight-program-item .fight-actions {
    display: flex;
    gap: 0.5rem;
}

.fight-program-item .fight-time {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.fight-program-item .fight-referees {
    font-size: 0.85rem;
    color: #495057;
    margin-top: 0.5rem;
    font-weight: 500;
    border-top: 1px solid #e9ecef;
    padding-top: 0.5rem;
    text-align: center;
}

.fight-program-item .referees-container {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.fight-program-item .referee-column {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    padding: 0.25rem;
}

/* Club display styles - now only used in floating panel */
.club-item {
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #f8f9fa;
    cursor: grab;
    transition: all 0.2s ease;
}

.club-item:hover {
    background: #e9ecef;
    border-color: #0073aa;
    transform: translateY(-1px);
}

.club-item.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.club-header {
    margin-bottom: 0.5rem;
}

.club-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1rem;
}

.club-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.coach-name {
    font-size: 0.9rem;
    color: #495057;
}

.coach-contact {
    font-size: 0.8rem;
    color: #6c757d;
}

.no-matches {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
    margin: 0;
}

.manual-match-area {
    min-height: 100px;
    padding: 1rem;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
}

.manual-match-pair {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

/* Hide events list when matchmaking is open */
#matchmaking-container:not([style*="display: none"]) ~ #events-list {
    display: none !important;
}

/* Floating clubs panel */
.clubs-floating-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 280px;
    max-height: 60vh;
    background: white;
    border: 2px solid #0073aa;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.clubs-floating-panel.show {
    display: flex;
    flex-direction: column;
}

.clubs-panel-header {
    background: #0073aa;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.clubs-panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.clubs-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.clubs-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Boxers Floating Panel */
#boxers-floating-panel {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 350px;
    max-height: 70vh;
    background: white;
    border: 2px solid #28a745;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    overflow: hidden;
    flex-direction: column;
}

#boxers-floating-panel.show {
    display: flex;
    flex-direction: column;
}

.floating-panel-header {
    background: #28a745;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.floating-panel-header h4 {
    margin: 0;
    font-size: 1rem;
}

.close-panel {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.close-panel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.floating-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

/* Ensure boxer cards work well in floating panel */
#floating-boxers-list .boxer-card-mini {
    margin-bottom: 0.5rem;
}

#floating-boxers-list .boxer-card-mini:last-child {
    margin-bottom: 0;
}

.floating-club-item {
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 0.75rem;
    margin: 0.25rem 0;
    background: #f8f9fa;
    cursor: grab;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.floating-club-item:hover {
    background: #e9ecef;
    border-color: #0073aa;
    transform: translateX(-2px);
}

.floating-club-item.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.floating-club-header {
    margin-bottom: 0.5rem;
}

.floating-club-name {
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9rem;
}

.floating-club-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.floating-coach-name {
    font-size: 0.8rem;
    color: #495057;
}

.floating-coach-contact {
    font-size: 0.75rem;
    color: #6c757d;
}

.clubs-panel-instruction {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 0.75rem;
    margin: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #856404;
    text-align: center;
}

/* Responsive adjustments for matchmaking */
@media (max-width: 768px) {
    .matchmaking-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .criteria-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .boxer-pair {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .match-suggestion-item {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .match-actions {
        justify-content: center;
    }
    
    /* Adjust floating panel for mobile */
    .clubs-floating-panel {
        position: fixed;
        top: auto;
        right: 10px;
        bottom: 20px;
        left: 10px;
        transform: none;
        width: auto;
        max-height: 40vh;
    }
}

/* Event forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
}

/* Ensure address field takes full width */
#event-adresse {
    width: 100% !important;
    box-sizing: border-box;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.form-group input[readonly],
.form-group input[disabled] {
    background-color: #f8f9fa;
    color: #666;
    cursor: not-allowed;
}

/* Registration modal styles */
.event-summary {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    color: #000;
}

.event-summary h5 {
    margin: 0 0 0.5rem 0;
    color: #000;
}

.event-summary p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #000;
}

.registration-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    color: #000;
}

.available-boxers,
.registered-boxers {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    color: #000;
}

.available-boxers h5,
.registered-boxers h5 {
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    color: #000;
}

.boxer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #000;
}

.boxer-item.registered {
    background: #d4edda;
    color: #000;
}

.boxer-item:last-child {
    margin-bottom: 0;
}

.all-registrations {
    border-top: 2px solid #dee2e6;
    padding-top: 1.5rem;
    color: #000;
}

.all-registrations h5 {
    margin: 0 0 1rem 0;
    color: #000;
}

.registration-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    color: #000;
}

.registration-item:last-child {
    margin-bottom: 0;
}

.registration-item strong {
    color: #000;
}

.registration-item .registration-details {
    color: #000;
    font-size: 0.9rem;
    margin: 0.25rem 0;
    display: block;
}

.registration-item small {
    color: #000;
    display: block;
    margin-top: 0.25rem;
}

/* Responsive adjustments for events */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .registration-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .event-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .event-status {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Section header with toggle button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h5 {
    margin: 0;
    flex-grow: 1;
}

.section-header .small {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin-left: 1rem;
    white-space: nowrap;
}

/* Registered boxers content visibility */
.registered-boxers-content {
    transition: all 0.3s ease;
}

.registered-boxers-content.hidden {
    display: none !important;
}
