/* ================================
   Base HTML & Body
   ================================ */
html {
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    line-height: 1.4;
    color: #212529;
    margin: 0;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

main {
    flex: 1;
    padding-bottom: 100px; /* prevent footer overlap */
}

footer {
    height: 60px;
    background-color: #f8f9fa;
    padding: 10px 0;
    text-align: center;
}

/* ================================
   Buttons & Focus
   ================================ */
.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;
}

.btn {
    padding: 0.35rem 0.75rem;
}


.form-label {
    /*font-size: 13px;*/
}

.form-control {
    /*font-size: 13px;*/
    line-height: 1.4;
}

::placeholder,
::-webkit-input-placeholder,
::-moz-placeholder,
:-ms-input-placeholder {
    font-style: italic;
}

/* ================================
   Navigation
   ================================ */
.navbar, .sidebar, .nav-link {
    /*font-size: 13.5px;*/
}

.dropdown-menu .dropdown-item {
    /*font-size: 13px;*/
    padding: 0.35rem 1rem;
}

/* ================================
   Litepicker
   ================================ */
.litepicker {
    font-size: 14px !important;
}

.litepicker .day-item {
    font-size: 14px !important;
}

.litepicker .day-item.is-today {
    color: #000 !important;
    background-color: #cce5ff !important;
    border-radius: 50%;
}

.litepicker .month-item-name,
.litepicker .month-item-year {
    font-size: 15px !important;
    font-weight: 600;
}

.litepicker .weekdays-row > div {
    font-size: 13px !important;
    font-weight: 500;
}

/* ================================
   Containers
   ================================ */
.container-fluid,
.container {
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

/* ================================
   Modals & Blurring for searchModal
   ================================ */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Second modal on top */
.modal.second-modal {
    z-index: 1060;
}

/* ================================
   SearchModal specific blur
   ================================ */
/* Backdrop that will be blurred */
.modal-backdrop-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1060;
    display: none;
}

/* Show backdrop when modal is open */
body.search-modal-open .modal-backdrop-blur {
    display: block;
}

/* Ensure modal appears above the backdrop */
#searchModal {
    z-index: 1070 !important;
}

/* Remove any existing blur styles */
body.search-modal-open {
    filter: none;
    pointer-events: auto;
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    background-color: rgba(216, 176, 117, 1) !important; /* Same brown-gold highlight */
    color: #fff !important;
}

/* Rounded table header corners */
.table th:first-child {
    border-top-left-radius: 0.5rem;
}

.table th:last-child {
    border-top-right-radius: 0.5rem;
}

/* Borders inside table body */
.table tbody tr td {
    border-right: 1px solid #dee2e6;
}

.table tbody tr td:last-child {
    border-right: none;
}

/* Center page input */
.centered-input {
    text-align: center;
}

/* Align numeric columns right */
.align-right {
    text-align: right !important;
}

/* Match PHP table border feel */
.table-bordered > :not(caption) > * > * {
    border-width: 1px 1px;
}

/* Make action buttons closer like PHP */
.table td .btn {
    padding: 2px 6px;
    font-size: 0.85rem;
}

/* Fix table header color to match PHP theme */
.table-dark th {
    background-color: #343a40 !important; /* PHP bootstrap 4 dark color */
    color: white !important;
}

/* Make table hover smoother */
.table-hover tbody tr {
    transition: background-color .2s ease-in-out;
}

/* Floating label input size consistency */
.form-floating > .form-control {
    height: 48px;
    padding: 1rem 0.75rem;
}


/* PHP-like search icon styling */
.input-group-text button i {
    color: #1C085D !important;
    font-size: 1rem !important;
}

/* PHP-style pagination button sizing */
.btn-pagination {
    padding: 4px 10px;
    font-size: 0.9rem;
}

/* Page input field box look */
#pageInput {
    border: 1px solid #ccc;
    height: 34px;
}

/* Remove spinner for number input (to match PHP) */
#pageInput::-webkit-inner-spin-button,
#pageInput::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#pageInput {
    -moz-appearance: textfield;
}

.custom-placeholder {
    color: #B72520 !important;
}

.input-group-text {
    display: flex;
    align-items: center;
}

#searchTable tbody tr,
#searchTable tbody td {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.table-scroll {
    max-height: 220px; /* adjust as needed */
    overflow-y: auto;
    overflow-x: hidden;
}