/* Custom styles for modal */
.modal {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1050;
}

.modal-dialog {
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 1rem 1.5rem;
}

/* Table Styles */
.table {
    margin-bottom: 0;
    background: #fff;
    /* allow tables to grow beyond the container when needed so horizontal scrolling works
       while keeping a sensible minimum width */
    width: auto;
    min-width: 100%;
}

.table-responsive {
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-radius: 0.5rem;
    /* allow horizontal scrolling for wide tables while keeping rounded corners */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table thead th {
    background: rgba(0,0,0,0.02);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    white-space: nowrap;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* DataTables specific styles */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length select {
    min-width: 60px;
    margin: 0 0.5rem;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(0,0,0,0.1);
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dt-buttons {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dt-buttons .btn {
    margin-right: 0.5rem;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 1rem;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin-left: 2px;
    border-radius: 0.375rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #fff !important;
}

/* Dropdown Styles */
.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background-color: rgba(111,66,193,0.05);
}

/* Fix for Bootstrap components */
.collapse:not(.show) {
    display: none;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}