
/* --------------------------------------------------
   Global Styles
   Keep the existing font family and font size.
-------------------------------------------------- */

html, body {
    font-family: Verdana;
    font-size: 0.9rem;
}

/* ----- Common Buttons Dark blue theme for application buttons. ------------------------ */
.card-header {
    background: #192e3d;
    color: white;
}

.btn.forbtn {
    background-color: #192e3d;
    font-weight: bold;
    color: white;
    border-color: #192e3d;
}

    .btn.forbtn:hover {
        background-color: #243f50;
        border-color: #243f50;
        color: white;
    }

/* ---------- Bottom Button Container Existing positioning is retained. --------------------- */

.tab-button {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* ----------- Input Fields Keep the existing font size. ----------------- */

.forinpt {
    font-size: 0.9rem;
}

/* ---------- Scrollable Tables Horizontal and vertical scrolling. ------------------------ */

.table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    height: 30vh;
    border: 1px solid #dee2e6;
}

/* Table Header */

.table thead.sticky-header th {
    position: sticky;
    top: 0;
    background-color: #192e3d;
    z-index: 10;
    color: white;
}

/* Wide Table */

.table.wide-table {
    width: 180%;
    border-collapse: collapse;
    table-layout: auto;
}

/* Sticky Table Footer */

.table tfoot.sticky-footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
}

    .table tfoot.sticky-footer td {
        background-color: #f1f3f5;
    }

/* Table Cell Alignment */

td {
    text-align: left;
}

/* --------------------------------------------------
   Active Elements
   Consistent primary color for selected items.
-------------------------------------------------- */

.active {
    background: #192e3d !important;
    color: white !important;
}

/* --------------------------------------------------
   Mobile Responsive Styles
   Existing responsive behavior is retained.
-------------------------------------------------- */

@media (max-width: 768px) {

    .table.wide-table {
        width: 800%;
    }

    .tab-button {
        position: static !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        display: flex;
        justify-content: center;
        gap: 8px;
        flex-direction: column !important;
        align-items: stretch;
    }

    .button-container {
        flex-direction: column !important;
        align-items: stretch;
    }
}

/* --------------------------------------------------
   Filter Popup
   Centered popup with white background.
-------------------------------------------------- */

.filter-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1100;
    width: 90vw;
    max-width: 68rem;
    height: 68vh;
    background-color: white;
    border: 1px solid #cbd5dc;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);
    padding: 0.625rem;
}

    /* Show popup when the show class is applied */

    .filter-popup.show {
        display: block;
    }

    /* Popup table */

    .filter-popup table {
        width: 100%;
    }

    /* Highlight popup row on hover */

    .filter-popup tr:hover {
        background-color: #eef3f6;
        cursor: pointer;
    }

    /* Selected popup row */

    .filter-popup tr.table-active {
        background-color: #dce7ed;
    }

/* --------------------------------------------------
   Popup Overlay
   Dark background behind the popup.
-------------------------------------------------- */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(23, 43, 58, 0.5);
    z-index: 1099;
}

    .popup-overlay.show {
        display: block;
    }

/* --------------------------------------------------
   Popup Labels
-------------------------------------------------- */

.popup-label {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.1rem;
    display: block;
}

/* Message displayed when popup has no records */

.no-data-message {
    text-align: center;
    padding: 1rem;
    color: #666;
    font-weight: 500;
}

/* --------------------------------------------------
   Popup Close Button
-------------------------------------------------- */

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 0;
    color: #243f50;
    cursor: pointer;
    z-index: 9999;
}

/* ------- Mobile Popup Adjustments ---------------- */

@media (max-width: 768px) {

    .filter-popup {
        width: 95vw;
        max-width: none;
        max-height: 70vh;
        padding: 0.5rem;
    }
}
