/* Form Styles */
/* Form validation errors */
.invalid-feedback,
.form-error-message,
.text-danger {
    color: red !important;
    font-size: 0.875em;
    margin-top: 0.25rem;
    display: block;
}

/* Dropdown styles */
select option {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

select option::before {
    content: attr(data-emoji);
    margin-right: 8px;
}

/* Make sure emojis are properly aligned */
select option span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Style for optgroups */
optgroup {
    font-weight: 600;
    color: #495057;
    padding: 4px 0;
}

/* Style for options within optgroups */
optgroup option {
    font-weight: normal;
    padding-left: 20px;
}

/* Stereo link section spacing */
.stereo-link-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #6a11cb;
    box-shadow: 0 0 0 0.25rem rgba(106, 17, 203, 0.15);
}

/* Select2 Customization */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 48px;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    border-color: #e0e0e0;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background: #f0f0f0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    margin: 0;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 8px;
    border-color: #e0e0e0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Form Buttons */
.btn-save {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 117, 252, 0.3);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.py-4 {
    padding-top: 0rem !important;
    padding-bottom: 0rem !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .form-container {
        padding: 1rem;
    }
    
    .btn-save {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Table styles */
.table {
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tbody tr:nth-of-type(even) {
    background-color: rgb(235 235 235);
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

table tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

table tbody tr:nth-of-type(odd) {
    background-color: transparent;
}

/* Responsive table */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Make buttons stack on small screens */
@media (max-width: 576px) {
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Filtres de groupe */
.btn-group-mobile {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.btn-group-mobile .btn {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
}

/* Channel number column */
.table thead th.channel-number {
    width: 8% !important;
    min-width: 30px; /* Ensure it's not too narrow */
}

/* Table cell styles */
.table td {
    white-space: normal !important;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 200px;
    vertical-align: middle;
    line-height: 1.3;
}

/* Ensure inputs column has enough space */
.table td:nth-child(2) {
    min-width: 120px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .table thead th.channel-number {
        width: 3% !important;
        min-width: 25px;
    }
    
    .table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.9em;
    }
    
    .card {
        margin: 0 -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .btn-group-mobile {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.table th {
    background-color: #e9ecef !important;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

/* Channel number column */
.channel-number {
    font-weight: bold;
    background-color: #e9ecef;
    text-align: center;
}

/* Empty track styling */
.empty-track {
    background-color: #ffebee !important;
    color: #c62828 !important;
    font-style: italic;
}

.empty-track td {
    background-color: #ffebee !important;
    color: #c62828 !important;
}

/* Deactivated track styling */
.deactivated-track {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-left: 3px solid red !important;
    font-weight: 500;
}

.deactivated-track td {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* Replaced instrument styling */
.replaced-instrument {
    background-color: #e7f3ff;
    border-left: 3px solid blue;
}

/* Old instrument text */
.old-instrument {
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 5px;
}

/* Text muted style - only for old instruments */
.old-instrument.text-muted {
    color: #6c757d;
}

/* Responsive table */
.table-responsive {
    overflow-x: auto;
}

/* Group column styling */
.group-column {
    transition: opacity 0.3s ease;
}

.group-column.hidden {
    display: none;
}

.group-column i {
    width: 1.2em;
    text-align: center;
    color: #6c757d;
}

/* Alternating row colors */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Hover effect */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Different instrument styling */
.different-instrument {
    background-color: #fff3cd;
    border-left: 3px solid #ffc107;
    font-weight: 500;
}

/* Empty channel styling */
/* Drag and drop styles */
.draggable-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 4px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.draggable-item.dragging {
    opacity: 0.5;
    background: #f8f9fa;
}

.draggable-item.over {
    border-top: 2px solid blue;
    padding-top: 8px;
}

.drag-handle {
    cursor: grab;
    color: #6c757d;
    margin-right: 8px;
    font-size: 16px;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Drop indicator */
.drop-indicator {
    position: relative;
}

.drop-indicator::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: blue;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.drop-indicator.top::after {
    top: -1px;
    transform: scaleX(1);
}

.drop-indicator.bottom::after {
    bottom: -1px;
    transform: scaleX(1);
}

/* Empty channel styling */
.empty-channel {
    background-color: #f8f9fa;
    color: #6c757d;
    font-style: italic;
}

/* Empty track styling */
.empty-track {
    background-color: #ffebee !important;
    color: #c62828 !important;
    font-style: italic;
}

.empty-track td {
    background-color: #ffebee !important;
    color: #c62828 !important;
}

/* Deactivated track styling */
.deactivated-track {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-left: 3px solid red !important;
    font-weight: 500;
}

.deactivated-track td {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* Replaced instrument styling */
.replaced-instrument {
    background-color: #e7f3ff;
    border-left: 3px solid blue;
}

/* Old instrument text */
.old-instrument {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.85em;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.85em;
    }
    
    .table td, .table th {
        overflow: hidden;
        white-space: normal;
        word-wrap: break-word;
        word-break: break-word;
        max-width: 200px; /* Prevent cells from becoming too wide */
        vertical-align: middle; /* Align content vertically */
    }
    
    .table td {
        padding: 0.5rem;
        line-height: 1.2;
    }
    
    /* Set specific width for Venue column on mobile */
    .table th:nth-child(2),
    .table td:nth-child(2) {
        width: 19%;
    }
    
    .channel-number {
        min-width: 40px;
        max-width: 40px;
    }
}

/* File upload styles */
.file-collection {
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
}