/* =========================
   Base Layout
   ========================= */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* =========================
   Power BI Report Cards
   ========================= */
.report-card {
    border-radius: 14px;
    transition: transform .12s ease, box-shadow .12s ease;
    height: 100%;
}

    .report-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.12) !important;
    }

a .btn {
    pointer-events: none;
}

/* =========================
   SweetAlert Dark Theme
   ========================= */
.swal-dark-bg {
    background-color: #2c3e50;
    color: #ecf0f1;
    border-radius: 0.5rem;
    font-family: 'Segoe UI', sans-serif;
}

    .swal-dark-bg .swal2-title {
        color: #ecf0f1;
        font-weight: 600;
    }

    .swal-dark-bg .swal2-html-container {
        color: #bdc3c7;
    }

    .swal-dark-bg .swal2-icon {
        color: #f1c40f;
        border-color: #f1c40f;
    }

    .swal-dark-bg .swal2-success-ring {
        border-color: #2ecc71;
    }

    .swal-dark-bg .swal2-error {
        color: #e74c3c;
    }

/* =========================
   DataTables Styling
   ========================= */
#tblData thead th {
    white-space: nowrap;
    border-bottom: 1px solid rgba(0,0,0,.1) !important;
}

#tblData td {
    vertical-align: middle;
}

.dataTables_wrapper .pagination .page-link,
.dt-container .pagination .page-link {
    border-radius: .5rem;
}

/* Ensure pagination controls are fully visible and not cut off */
.table-responsive {
    overflow: visible;
    padding-bottom: .5rem;
}

/* Optional sticky header */
#tblData thead th {
    background: #f8f9fa;
}

/* DataTables 2 footer spacing */
div.dt-container div.dt-layout-row:last-child {
    padding-right: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

div.dt-container .dt-paging {
    margin-right: 8px;
}

/* Fallback for older DataTables */
.dataTables_wrapper .row:last-child {
    padding-right: 24px;
}

.dataTables_wrapper .dataTables_paginate {
    margin-right: 24px;
}

/* =========================
   Sessions Pagination (ALTIMS)
   ========================= */
.altims-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
}

.altims-page {
    min-width: 40px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #d9e2ef;
    background: #fff;
    color: #0b5ed7;
    font-weight: 600;
    line-height: 36px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
}

    .altims-page:hover:not(.is-active):not(.is-disabled) {
        background: #f3f7ff;
    }

    .altims-page:active:not(.is-disabled) {
        transform: translateY(1px);
    }

    .altims-page.is-active {
        background: #0b5ed7;
        color: #fff;
        border-color: #0b5ed7;
        box-shadow: 0 6px 16px rgba(11, 94, 215, .22);
        cursor: default;
    }

.altims-page--nav {
    min-width: 84px;
}

.altims-page.is-disabled {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
    box-shadow: none;
}

.altims-ellipsis {
    padding: 0 6px;
    color: #6c757d;
    font-weight: 700;
}

/* =========================
   Select2 + Bootstrap floating labels
   ========================= */
.form-floating .select2-container .select2-selection--single {
    height: calc(3.5rem + 2px);
    padding: 1.625rem .75rem .625rem .75rem;
    border: 1px solid #ced4da;
    border-radius: .375rem;
}

.form-floating .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.25;
    padding-left: 0;
}

.form-floating .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(3.5rem + 2px);
    right: .5rem;
}

.form-floating.has-value > label {
    opacity: .65;
    transform: scale(.85) translateY(-0.5rem) translateX(0.15rem);
}
