.dt-length {
    float: left !important;
    margin: 10px;
}

.dt-paging {
    float: right !important;
    margin: 10px;
}

.rtl .dt-length {
    float: right !important;
}

.rtl .dt-paging {
    float: left !important;
}

div.dt-container.dt-empty-footer tbody > tr:last-child > * {
    border: none !important;
}

div.dt-container .dt-paging .dt-paging-button.current, div.dt-container .dt-paging .dt-paging-button.current:hover {
    padding: 0 10px;
    background-color: unset !important;
}

div.dt-container .dt-paging .dt-paging-button {
    padding: 0 10px !important;
}

.rtl .float-end {
    float: left !important;
}

.rtl .float-start {
    float: right !important;
}

.upload-container .custom-upload-ui {
    width: 100%;
    /* Ensure any buttons or areas inside also stretch */
}

.upload-area {
    width: 100%; /* full width of container */
    box-sizing: border-box; /* include padding/border in width */
}

.upload-container {
    display: block;
    background-color: white;
    border-radius: 10px;
    width: 100%;
    text-align: center;
    margin-bottom: 1rem; /* space below */
}

.upload-container h2 {
    color: #333;
    margin-bottom: 20px;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s;
    position: relative;
}

.upload-area:hover {
    border-color: #999;
}

.upload-container .upload-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.upload-button:hover {
    background-color: #45a049;
}

/*.button-icon {*/
/*    font-size: 20px;*/
/*}*/

.preview-container {
    margin-top: 20px;
    display: none;
    position: relative;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    /*margin-top: 15px;*/
    position: absolute;
    top: 0;
    right: 0;
}

.upload-container .cancel-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 0 5px;
    border-radius: 5px;
    cursor: pointer;
}

.upload-container .cancel-button:hover {
    background-color: #d32f2f;
}

.upload-container .upload-confirm-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.upload-container .upload-confirm-button:hover {
    background-color: #0b7dda;
}

.upload-container .status-message {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* Drag and drop styles */
.upload-container .upload-area.drag-over {
    background-color: #f0f0f0;
    border-color: #4CAF50;
}

.invalid-feedback {
    display: block !important;
}

.floating-sticky-btn {
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.sticky-btn-wrapper {
    position: sticky;
    bottom: 20px; /* how far from bottom when sticking */
    display: flex;
    justify-content: flex-end;
    padding-right: 20px;
}

.icon-profile-pic {
    font-size: 40px;
}

.profile-image {
    max-width: 74px;
    max-height: 74px;
}

.carousel-image {
    background-color: black;
    background-repeat: no-repeat;
    background-position: top;
    background-size: contain;
}

.custom-carousel-caption {
    background-color: #0000009e;
    width: 100%;
}

.custom-carousel-caption p {
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.language-dropdown {
    border-radius: 10px;
    background-color: #ADC30D;
    max-width: 40px;
    max-height: fit-content;
}

.language-dropdown ul {
    margin-top: 50px !important;
}

.form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

@media (max-width: 349px) {
    .sticky-btn-wrapper {
        padding-right: 0;
    }
}

@media (max-width: 575px) {
    .px-4-except-sm {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Force table layout to respect widths */
#coursesTable, #usersTable, #notifTable {
    table-layout: fixed;
    width: 100% !important;
}

/* Column specific styles */
#coursesTable th,
#coursesTable td,
#notifTable td,
#usersTable th,
#usersTable td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.datatable-media {
    max-width: 70px;
    max-height: 70px;
}

.post-loader {
    height: 100%;
    width: 100%;
    position: fixed;
    background-color: #f0f2f063;
    z-index: +99999;
    display: flex;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.post-loader > div {
    height: fit-content;
}


.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    font-size: 27px;
}

.user-item {
    transition: all 0.2s;
    border-radius: 0.5rem;
}

.user-item:hover {
    background-color: rgba(94, 114, 228, 0.05);
}

.notification-preview {
    background-color: #e8e8e8;
    border-left: 4px solid #00a213;
    border-radius: 0.5rem;
    padding: 1rem;
}

.header-title {
    font-weight: 600;
    color: #32325d;
}

.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--argon-secondary);
}

.no-results {
    text-align: center;
    padding: 1rem;
    color: var(--argon-secondary);
    font-style: italic;
}

.user-highlight {
    background-color: rgba(94, 114, 228, 0.1);
}

.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
}

#calendar {
    /*max-width: 1000px;*/
    /*margin: 20px auto;*/
}

.fc .fc-toolbar-title {
    font-size: 17px;
}

.fc .fc-toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.fc .fc-button {
    font-size: 14px;
}

@media (max-width: 500px) {
    .fc table, .fc .fc-button {
        font-size: 10px;
    }

    .fc .fc-toolbar-title {
        font-size: 15px;
    }
}

.selectable-card p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-media {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
    border: 0;
}

.selected {
    background-color: #eeeeee;
}

#courseSelection, #coachSelection {
    max-height: 300px;
    overflow: auto;
}

/* Add to your CSS */
.membership-status-card {
    border-left: 4px solid #17a2b8;
    transition: all 0.3s ease;
}

.membership-status-card.alert-warning {
    border-left-color: #ffc107;
}

.membership-status-card.alert-danger {
    border-left-color: #dc3545;
}

.quick-duration-buttons .btn {
    transition: all 0.2s ease;
}

.quick-duration-buttons .btn:hover {
    transform: translateY(-1px);
}

.input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.membership-date-field {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.membership-date-field[style*="display: block"] {
    opacity: 1;
    height: auto;
}

.fit-content-height {
    height: fit-content !important;
}

/* Context Menu Styles */
#eventContextMenu {
    min-width: 180px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

#eventContextMenu .dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#eventContextMenu .dropdown-item:hover {
    background-color: #f8f9fa;
}

#eventContextMenu .dropdown-item:active {
    background-color: #e9ecef;
}

/* Prevent text selection */
.fc-event {
    user-select: none;
    -webkit-user-select: none;
}

.reservation-div {
    min-height: 28vh;
    max-height: 50vh;
    overflow: auto;
}

.color-input {
    height: 40px;
}

#toggleAddFormBtn {
    height: fit-content;
}

.carousel-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 0;
}

.carousel-image-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 0;
}

.carousel-item {
    height: 100%;
    position: relative;
}

.h-36-vh {
    height: 36vh !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
    z-index: 10000 !important;
}

.date-range-container {
    position: relative;
    max-width: 300px;
}

.date-range-input {
    padding-left: 40px;
    padding-right: 40px;
    background-color: white !important;
    border: 1px solid #cad1d7;
    border-radius: 0.375rem;
    height: 40px;
    cursor: pointer;
    width: 34vh;
}

.date-range-input:focus {
    border-color: var(--argon-primary);
    box-shadow: 0 0 0 0.2rem rgba(94, 114, 228, 0.25);
}

.date-range-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--argon-secondary);
    z-index: 5;
}

.date-range-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--argon-secondary);
    cursor: pointer;
    z-index: 5;
    display: none;
}

.date-range-clear:hover {
    color: var(--argon-danger);
}

.date-range-input.has-value + .date-range-clear {
    display: block;
}

.seating-grid {
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.seat-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 8px;
    flex-wrap: nowrap;
}

.row-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    min-width: 30px;
    text-align: center;
}

.seat {
    width: 35px;
    min-width: 25px;
    height: 35px;
    margin: 0 2px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.seat:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.seat.available {
    /*background-color: #d4edda;*/
    border-color: #28a745;
    color: #155724;
}

.seat.available:hover {
    /*background-color: #c3e6cb;*/
    border-color: #1e7e34;
}

.seat.unavailable {
    /*background-color: #f8d7da;*/
    border-color: #dc3545;
    color: #721c24;
}

.seat.unavailable:hover {
    /*background-color: #f1b0b7;*/
    border-color: #bd2130;
}

.seat.occupied {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    cursor: not-allowed;
}

.seat.reserved {
    /*background-color: #d1ecf1;*/
    border-color: #17a2b8;
    color: #0c5460;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .seat {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
        margin: 0 1px;
    }

    .row-label {
        font-size: 0.8rem;
        min-width: 25px;
    }
}

/* Loading state */
.seating-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.seating-grid.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Capacity mode toggle */
.form-check-switch .form-check-input {
    width: 2.5em;
}

/* Seating preview container */
#seatingPreview, #editSeatingPreview, #duplicateSeatingPreview {
    position: relative;
    min-height: 120px;
}

#seatingPreview h6, #editSeatingPreview h6, #duplicateSeatingPreview h6 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Legend */
.seating-legend {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.legend-item .seat {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    font-size: 0.7rem;
}

/* Planning form adjustments */
.modal-lg .seating-grid {
    max-width: calc(100% - 20px);
}

/* Animation for mode switching */
#eventSeatingControls, #editSeatingControls, #duplicateSeatingControls {
    transition: all 0.3s ease;
}

/* Capacity input readonly state */
input[readonly].form-control {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.seat.available.selected {
    border-color: gray;
    background-color: #eaeaea;
}

div:where(.swal2-container) {
    z-index: 106000 !important;
}

.rtl .btn-group>.btn:nth-child(n+3) {
    border-radius: 0.5rem 0 0 0.5rem;
}

.rtl .btn-group>.btn:not(:last-child):not(:nth-child(2)):not(.dropdown-toggle) {
    border-radius: 0 0.5rem 0.5rem 0;
}
