/* Modern Table Styles - Common CSS for all list pages */

/* Page Header Styles */
.booking-header,
.page-header-modern {
    background: linear-gradient(135deg, #fd7e14 0%, #e66d0a 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(253, 126, 20, 0.3);
    color: white;
}

.booking-header h2,
.page-header-modern h2 {
    margin: 0;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.booking-header .d-flex {
    width: 100%;
}

.booking-header p,
.page-header-modern p {
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-size: 0.85rem;
}

/* Modern Card Styles */
.modern-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.modern-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.modern-card .card-body {
    padding: 1.5rem;
    overflow-x: auto;
    color: #000000;
}

/* Ensure all text in modern cards is black, except buttons and badges */
.modern-card {
    color: #000000;
}

/* Make all text black by default */
.modern-card p,
.modern-card div,
.modern-card span,
.modern-card td,
.modern-card label,
.modern-card .text-muted,
.modern-card th {
    color: #000000 !important;
}

/* Keep button text colors as defined in their classes */
.modern-card .btn-view-modern,
.modern-card .btn-submit-modern {
    color: white !important;
    border: 2px solid #e66d0a !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.modern-card .btn-cancel-modern {
    color: #374151 !important;
    border: 2px solid #cbd5e1 !important;
    background: white !important;
}

.modern-card .btn-cancel-modern:hover {
    color: #fd7e14 !important;
    border-color: #fd7e14 !important;
}

/* Keep badge text colors as white (they have white text on colored backgrounds) */
.modern-card .badge-success-modern,
.modern-card .badge-danger-modern,
.modern-card .badge-warning-modern,
.modern-card .badge-modern {
    color: white !important;
}

/* Spacing between action buttons in table cells */
.table-modern tbody td .btn-view-modern + button,
.table-modern tbody td .btn-view-modern + .btn,
.table-modern tbody td button + .btn-view-modern,
.table-modern tbody td .btn + .btn-view-modern,
.table-modern tbody td .btn-view-modern + .btn-view-modern,
.table-modern tbody td .btn + button,
.table-modern tbody td button + .btn {
    margin-left: 0.75rem;
}

.card-datatable {
    overflow-x: visible;
}

/* Modern Table Styles */
.table-modern {
    margin-bottom: 0;
    table-layout: auto;
}

.table-modern thead th {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe8d6 100%);
    color: #fd7e14;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 1rem 0.75rem;
    border: none;
    border-bottom: 3px solid #ffd4a8;
    white-space: nowrap;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(253, 126, 20, 0.1);
    transition: all 0.2s ease;
}

.table-modern thead th:first-child {
    width: 5%;
    text-align: center;
    border-top-left-radius: 8px;
}

.table-modern thead th:last-child {
    border-top-right-radius: 8px;
}

.table-modern thead th::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(253, 126, 20, 0.2), transparent);
}

.table-modern thead th:hover {
    background: linear-gradient(135deg, #ffe8d6 0%, #ffd4a8 100%);
    box-shadow: 0 3px 6px rgba(253, 126, 20, 0.2);
    transform: translateY(-1px);
    transition: all 0.2s ease;
    color: #e66d0a;
}

.table-modern thead th:nth-child(2) {
    width: 12%;
    text-align: center;
}

.table-modern thead th:nth-child(3) {
    width: 14%;
    text-align: center;
}

.table-modern thead th:nth-child(4) {
    width: 11%;
    text-align: center;
}

.table-modern thead th:nth-child(5) {
    width: 9%;
    text-align: center;
}

.table-modern thead th:nth-child(6) {
    width: 11%;
    text-align: center;
}

.table-modern thead th:nth-child(7) {
    width: 10%;
    text-align: center;
}

.table-modern thead th:nth-child(8) {
    width: 10%;
    text-align: center;
}

.table-modern thead th:nth-child(9) {
    width: 12%;
    text-align: center;
}

.table-modern thead th:last-child {
    width: 10%;
    min-width: 100px;
    text-align: center;
}

.table-modern tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #000000;
    text-align: center;
}

.table-modern tbody td:first-child {
    text-align: center;
}

.table-modern tbody td:nth-child(7) {
    text-align: center;
}

.table-modern tbody td:nth-child(8) {
    text-align: center;
}

.table-modern tbody td:nth-child(9) {
    text-align: center;
}

.table-modern tbody td:last-child {
    text-align: center;
    min-width: 100px;
    overflow: visible !important;
}

.table-modern tbody tr {
    transition: all 0.2s ease;
}

.table-modern tbody tr:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Modern Badge Styles */
.badge-modern {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    display: inline-block;
    text-align: center;
}

.badge-success-modern {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.badge-danger-modern {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.badge-warning-modern {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    font-size: 10px;
}

/* Modern Button Styles */
.btn-view-modern {
    background: linear-gradient(135deg, #fd7e14 0%, #e66d0a 100%);
    border: 2px solid #e66d0a;
    color: white !important;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
    text-decoration: none;
    visibility: visible;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-view-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: white !important;
    border-color: #d9770a;
}

.btn-view-modern i {
    margin-right: 0.25rem;
}

.btn-cancel-modern {
    background: white;
    border: 2px solid #cbd5e1;
    color: #374151 !important;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-cancel-modern:hover {
    border-color: #fd7e14;
    color: #fd7e14 !important;
    background: #fff5eb;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.2);
}

/* Link Styles */
.booking-link,
.modern-link {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-block;
    text-align: center;
    font-size: 12px;
}

.booking-link:hover,
.modern-link:hover {
    color: #fd7e14;
    text-decoration: underline;
}

/* DataTables Filter and Length Styles */
#datatable_filter input,
.dataTables_filter input {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    color: #000000;
}

#datatable_filter input:focus,
.dataTables_filter input:focus {
    border-color: #fd7e14;
    box-shadow: 0 0 0 3px rgba(253, 126, 20, 0.1);
    outline: none;
    color: #000000;
}

#datatable_length select,
.dataTables_length select {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    color: #000000;
    /* width: 100px; */
    width: 100px !important;
    height: 38px !important;
}

#datatable_length select:focus,
.dataTables_length select:focus {
    border-color: #fd7e14;
    box-shadow: 0 0 0 3px rgba(253, 126, 20, 0.1);
    outline: none;
    color: #000000;
}

.dataTables_filter label,
.dataTables_length label {
    color: #000000;
}

/* Modern Pagination Styling */
.dataTables_wrapper .dataTables_paginate {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 12px;
    margin: 0;
    padding: 0.75rem 1.25rem;
    border: 2px solid transparent;
    background: white;
    color: #fd7e14 !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.15);
    min-width: 48px;
    height: 48px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid #ffe8d6;
}

.dataTables_wrapper .dataTables_paginate .paginate_button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover::before {
    left: 100%;
}

.dataTables_wrapper .dataTables_paginate .paginate_button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #fd7e14, #e66d0a, #fd7e14);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover::after {
    opacity: 1;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: linear-gradient(135deg, #fd7e14 0%, #e66d0a 100%);
    border-color: #fd7e14;
    color: white !important;
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 20px rgba(253, 126, 20, 0.5);
    z-index: 1;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #fd7e14 0%, #e66d0a 100%);
    border: 2px solid #fd7e14;
    color: white !important;
    box-shadow: 0 6px 18px rgba(253, 126, 20, 0.6), 
                0 0 0 4px rgba(253, 126, 20, 0.1);
    font-weight: 700;
    transform: scale(1.15);
    z-index: 2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 18px rgba(253, 126, 20, 0.6), 
                    0 0 0 4px rgba(253, 126, 20, 0.1);
    }
    50% {
        box-shadow: 0 6px 18px rgba(253, 126, 20, 0.8), 
                    0 0 0 6px rgba(253, 126, 20, 0.15);
    }
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current::before,
.dataTables_wrapper .dataTables_paginate .paginate_button.current::after {
    display: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled::before,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled::after {
    display: none;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 1rem;
    color: #000000;
    font-weight: 500;
}

/* Custom Pagination Styling (for non-DataTables pagination) */
.pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    border: 1px solid #ffe8d6;
    background: white;
    color: #fd7e14 !important;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(253, 126, 20, 0.12);
    min-width: 38px;
    height: 38px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #fd7e14 0%, #e66d0a 100%);
    border: 1px solid #fd7e14;
    color: white !important;
    box-shadow: 0 3px 10px rgba(253, 126, 20, 0.35),
                0 0 0 3px rgba(253, 126, 20, 0.08);
    font-weight: 700;
    transform: scale(1.05);
    z-index: 2;
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #fd7e14 0%, #e66d0a 100%);
    border-color: #fd7e14;
    color: white !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 5px 12px rgba(253, 126, 20, 0.35);
    z-index: 1;
    text-decoration: none;
}

/* DataTables Loader Styles */
.table-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    border-radius: 16px;
}

.table-loader-overlay.show {
    display: flex;
}

.table-loader {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top-color: #fd7e14;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.table-loader-text {
    margin-top: 1rem;
    color: #fd7e14;
    font-weight: 500;
    font-size: 0.9rem;
}

.card-datatable {
    position: relative;
}

