/* ==========================================================
   RCL E-Booking — Shared Table + Pagination Styles
   Version: 1.0.0

   Usage:
     <link rel="stylesheet" href="<%=contextPath%>/css/rcl-table.css">

   Add class="rcl-table" to your <table> element.
   Wrap the table in <div class="rcl-table-wrapper">.
   Wrap pagination in <div class="rcl-pagination">.
   ========================================================== */


/* ===== Table Wrapper ===== */
.rcl-table-wrapper {
    border: 1px solid #dde2ef !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: 788px !important;
}


/* ===== Table Base ===== */
.rcl-table {
    border-collapse: separate !important;
    border-spacing: 0;
    min-width: 100%;
    width: auto;
}


/* ===== Header Row 1 — main column headers ===== */
.rcl-table thead.tab_head tr:nth-child(1)>th {
    position: sticky !important;
    top: 0;
    z-index: 2;
    background-color: #011589;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 20px 12px;
    vertical-align: middle;
    white-space: nowrap;
    border: none;
    text-align: center;
}


/* ===== Header Row 2 — sub-column headers (e.g. Origin / Destination) ===== */
.rcl-table thead.tab_head tr:nth-child(2)>th {
    position: sticky !important;
    top: 60px;
    z-index: 1;
    background-color: #011589;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    vertical-align: middle;
    text-align: center;
    border-bottom: none !important;
}


/* ===== Body Cells ===== */
.rcl-table tbody td {
    vertical-align: middle;
    padding: 10px;
    color: #333;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    font-size: .7rem;
    font-weight: normal;
}

.rcl-table tbody td span {
    color: #1e3a8a;
    font-size: 1rem;
    font-weight: 600;
}


/* ===== Striped Rows ===== */
.rcl-table tbody tr:nth-child(odd)>td {
    background-color: #fff;
}

.rcl-table tbody tr:nth-child(even)>td {
    background-color: #f8f9fc;
}

/* ===== Row Hover Highlight ===== */
.rcl-table tbody tr:hover>td {
    background-color: #e8ecf8;
}


/* ===== Form controls inside table — prevent bold/oversized text ===== */
.rcl-table tbody td .form-control,
.rcl-table tbody td .custom-select,
.rcl-table tbody td .input-group-text,
.rcl-table tbody td .select2-selection__rendered {
    font-weight: normal;
    font-size: 0.875rem;
    color: #111827;
}


/* ===== Cell Content Helpers ===== */

/* Bold code / booking number */
.rcl-cell-code {
    display: block;
    font-weight: 700;
    color: #011589 !important;
    font-size: 1rem !important;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

/* Small descriptive name below the code */
.rcl-cell-name {
    display: block;
    font-size: 11px !important;
    color: #000 !important;
    margin-top: 3px;
    font-weight: normal;
    text-transform: uppercase;
}

.rcl-cell-name.rcl-cel-name-sub {
    color: #555;
    font-size: .7rem;
}

/* Regular body text */
.rcl-cell-text {
    color: #000 !important;
    font-size: 0.7rem !important;
    font-weight: normal;
    line-height: 1rem !important;
}

/* Dash / empty placeholder */
.rcl-cell-dash {
    color: #000 !important;
    font-size: 14px !important;
}

/* Status text (normal weight) */
.rcl-cell-status {
    font-weight: normal !important;
    font-size: 14px !important;
    color: #000 !important;
}


/* ===== Sort Icons ===== */
.th-sort-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.th-sort-icon {
    width: 10px;
    height: 10px;
    fill: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: transform 0.2s, fill 0.2s;
}

.rcl-table thead th[data-sort-key] {
    cursor: pointer;
    user-select: none;
}

.rcl-table thead th[data-sort-key]:hover {
    background-color: #0a1fa0;
}

.rcl-table thead th[data-sort-key]:hover .th-sort-icon {
    fill: rgba(255, 255, 255, 0.9);
}

.rcl-table thead th.th-sort-asc .th-sort-icon,
.rcl-table thead th.th-sort-desc .th-sort-icon {
    fill: #fff;
    opacity: 1;
}

.rcl-table thead th.th-sort-desc .th-sort-icon {
    transform: rotate(180deg);
}


/* ===== Pagination ===== */
.rcl-pagination {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    padding: 4px 4px;
}

.pg-ul .page-link {
    font-size: .7rem;
    padding: 0.375rem 0.75rem;
    color: #000;
    font-weight: normal !important;
    /* border-color: #dde2ef; */
    border: none !important;
    border-radius: 0.375rem !important;
}

.pg-ul .page-item.active .page-link {
    background-color: #215cde;
    border-color: transparent;
    color: #fff;
}

.pg-ul .page-item.disabled .page-link {
    color: #aaa;
    cursor: not-allowed;
}

.pg-ul .page-link:hover {
    background-color: #e8ecf8;
    color: #011589;
}

.arrow-style {
    color: #fff !important;
    background-color: #011589 !important;
}

.custom-page-item {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
}

.custom-page-item.disabled {
    color: #aaa !important;
    cursor: not-allowed !important;
}

.custom-page-color {
    border-color: #dde2ef !important;
}

/* --------------------------------------------------------------------------
   12. PAGINATION — restyle jQuery paginationjs inside modal
   -------------------------------------------------------------------------- */



/* ===== Responsive ===== */
@media screen and (max-width: 1450px) and (min-width: 1000px) {
    .rcl-table thead.tab_head tr:nth-child(1)>th {
        font-size: 11px !important;
        padding: 14px 8px;
    }

    .rcl-table thead.tab_head tr:nth-child(2)>th {
        font-size: 10px !important;
    }
}