/* ==========================================================================
   rcl-modal.css — Modern modal styles for e-booking
   Based on rcl-eservice-fe design system (Headless UI Dialog patterns)
   
   Usage: Add class "rcl-modal" to any Bootstrap .modal element to activate.
   Example: <div class="modal rcl-modal" id="myModal">
   
   This file is loaded globally via commonInclude.jsp and can be reused
   across all e-booking pages.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BACKDROP OVERLAY
   -------------------------------------------------------------------------- */
.rcl-modal-backdrop.modal-backdrop {
    background-color: rgb(107, 114, 128);
    opacity: 0.75 !important;
}

/* --------------------------------------------------------------------------
   2. MODAL PANEL (content wrapper)
   -------------------------------------------------------------------------- */
.rcl-modal .modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.rcl-modal .modal-body {
    padding: 28px 32px;
    background-color: #FFFFFF !important;
}

/* --------------------------------------------------------------------------
   3. CLOSE BUTTON
   -------------------------------------------------------------------------- */
.rcl-modal .rcl-modal-close {
    color: #9CA3AF;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rcl-modal .rcl-modal-close:hover {
    color: #6B7280;
    text-decoration: none;
}

.rcl-modal .rcl-modal-close .fa-close {
    font-size: 18px;
}

/* --------------------------------------------------------------------------
   5. ORDER SUMMARY / ROUTING HEADER SECTIONS
   -------------------------------------------------------------------------- */
.rcl-modal .card-modal {
    background-color: #FFF !important;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-top: 12px;
    padding: 20px;
}

.rcl-modal .card-modal h5 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.rcl-modal .card-modal hr {
    border-top: 1px solid #D1D5DB;
    margin: 12px 0;
}

.rcl-modal .card-modal .text-muted {
    color: #4B5563 !important;
}

.rcl-modal .card-modal .text-small {
    font-size: 13px;
    color: #111827;
    word-break: break-word;
    overflow-wrap: break-word;
}

.rcl-modal .card-modal .border-left {
    border-left: 2px solid #E5E7EB !important;
}


/* --------------------------------------------------------------------------
   6. CARDS (Customer Details, Routing & Schedule, Equipment)
   -------------------------------------------------------------------------- */
.rcl-modal .card {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: none;
    overflow: hidden;
}

.rcl-modal .card-body {
    padding: 16px 20px;
}

.rcl-modal .card-modal .card-body {
        padding: 0 !important;
}

.rcl-modal .card-secondary-content {
    margin-top: 4px;
}

.rcl-modal .card-secondary-content .text-muted {
    color: #111827 !important;
    font-size: 13px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.rcl-modal .card-secondary-content .text-small {
    font-size: 13px;
    color: #111827;
}

/* --------------------------------------------------------------------------
   7. STEPPER (Confirm → Received → Loaded → On Board)
   -------------------------------------------------------------------------- */
.rcl-modal .bg-light {
    background-color: #FFFFFF !important;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-top: 12px;
}



/* --------------------------------------------------------------------------
   8. TABLE (Equipment & Commodity Details)
   -------------------------------------------------------------------------- */
.rcl-modal .rcl-table-wrapper {
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}

.rcl-modal .rcl-table {
    margin-bottom: 0;
}

.rcl-modal .rcl-table thead.tab_head {
    background-color: #F9FAFB;
}

.rcl-modal .rcl-table thead.tab_head th {
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 10px 12px;
    border-bottom: 2px solid #E5E7EB;
    white-space: nowrap;
}

.rcl-modal .rcl-table tbody td {
    font-size: 13px;
    color: #111827;
    padding: 10px 12px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: top;
    word-break: break-word;
}

.rcl-modal .rcl-table tbody tr:last-child td {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .rcl-modal .modal-body {
        padding: 20px 16px;
    }

    .rcl-modal .distance-details {
        padding: 12px 14px;
    }

    .rcl-modal .distance-details .col-md {
        padding-bottom: 8px;
        margin-bottom: 8px;
        border-left: none !important;
        border-bottom: 1px solid #E5E7EB;
    }

    .rcl-modal .distance-details .col-md:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .rcl-modal .card-modal {
        padding: 14px;
    }
    

    .rcl-modal .card-body {
        padding: 12px 14px;
    }


    .rcl-modal .card-secondary-content .col-md-3 {
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid #F3F4F6;
    }

    .rcl-modal .card-secondary-content .col-md-3:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .rcl-modal .rcl-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* --------------------------------------------------------------------------
   10. ANIMATION (fade + scale for modern feel)
   -------------------------------------------------------------------------- */
.rcl-modal.fade .modal-dialog {
    transform: scale(0.95);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.rcl-modal.show .modal-dialog {
    transform: scale(1);
}

/* --------------------------------------------------------------------------
   11. UTILITY: Button styles (available for future use across project)
   -------------------------------------------------------------------------- */
.rcl-modal-btn-primary {
    border-radius: 8px;
    border: 1px solid #01158a;
    background-color: #01158a;
    padding: 8px 40px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    min-width: 150px;
    cursor: pointer;
    outline: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.rcl-modal-btn-primary:hover {
    border-color: #021bab;
    background-color: #021bab;
}

.rcl-modal-btn-secondary {
    border-radius: 8px;
    border: 1px solid #01158a;
    background-color: #ffffff;
    padding: 8px 40px;
    font-size: 14px;
    font-weight: 600;
    color: #01158a;
    min-width: 150px;
    cursor: pointer;
    outline: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rcl-modal-btn-secondary:hover {
    border-color: #021bab;
    background-color: #EEF0FF;
    color: #021bab;
}
