/*
    DEMO STYLE
*/

@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";
body {
    font-family: 'Poppins', sans-serif;
    background: #f6f6f6;
}

p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 300;
    line-height: 1.7em;
    color: #999;
}

a,
a:hover,
a:focus {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item {
    padding-left: 10px;
}

.nav-item span {
    margin-right: 5px;
}

.line {
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed #ddd;
    margin: 40px 0;
}

i,
span {
    display: inline-block;
}

.wrapper {
    z-index: 1;
    display: flex;
    align-items: stretch;
}


/* ---------------------------------------------------
    OVERLAY STYLE
----------------------------------------------------- */

#overlay {
    position: fixed;
    opacity: 0;
    transition: 200ms ease-in-out;
    z-index: 2;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.35);
}

#overlay.active {
    pointer-events: all;
    opacity: 1;
}


/* ---------------------------------------------------
    POPUPS CONTAINER STYLE
----------------------------------------------------- */

.popup {
    position: fixed;
    transform: translate(-50%, -50%) scale(0);
    transition: 200ms ease-in-out;
    z-index: 3;
    background-color: white;
    overflow: hidden;
    /* width: 400px; */
    border: none;
    outline: none;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
}

.popup table {
    max-width: 100%;
}

.popup.active {
    transform: translate(-50%, -50%) scale(1);
}


/* ---------------------------------------------------
    ALL TYPES POPUP STYLE
----------------------------------------------------- */

#all_types_popup {
    top: 45%;
    left: 50%;
}

#all_types_popup #popup_header {
    display: flex;
    padding: 6px 5px 4px 10px;
    background-color: #1a2e46;
    justify-content: space-between;
    align-items: center;
}

#all_types_popup #popup_header span {
    font-size: 14px;
    color: white;
}

#all_types_popup #popup_header button {
    cursor: pointer;
    outline: none;
    background: none;
    color: white;
    font-size: 25px;
    line-height: 15px;
    border: none;
}

#all_types_popup #popup_body {
    padding: 15px 15px 5px 15px;
}

#all_types_popup table {
    table-layout: fixed;
}


/* ---------------------------------------------------
    ERROR POPUP STYLE
----------------------------------------------------- */

#error_popup {
    top: 45%;
    left: 50%;
}

#error_popup #popup_header {
    display: flex;
    padding: 6px 5px 4px 10px;
    background-color: #1a2e46;
    justify-content: space-between;
    align-items: center;
}

#error_popup #popup_header span {
    font-size: 14px;
    color: white;
}

#error_popup #popup_header button {
    cursor: pointer;
    outline: none;
    background: none;
    color: white;
    font-size: 25px;
    line-height: 15px;
    border: none;
}

#error_popup #popup_body {
    padding: 15px 15px 5px 15px;
}

#error_popup table {
    table-layout: fixed;
}


/* ---------------------------------------------------
    PROGRESS POPUP STYLE
----------------------------------------------------- */

#progress_popup {
    top: 45%;
    left: 50%;
}

#progress_popup #popup_header {
    display: flex;
    padding: 6px 5px 4px 10px;
    background-color: #1a2e46;
    justify-content: space-between;
    align-items: center;
}

#progress_popup #popup_header span {
    font-size: 14px;
    color: white;
}

#progress_popup #popup_header button {
    cursor: pointer;
    outline: none;
    background: none;
    color: white;
    font-size: 25px;
    line-height: 15px;
    border: none;
}

#progress_popup #popup_body {
    padding: 15px 15px 5px 15px;
}

#all_types_table {
    width: auto;
    max-width: 100%;
    table-layout: auto !important;
}

#all_types_popup #popup_body {
    overflow-x: auto;
    max-width: 100%;
    padding-right: 5px; /* slight breathing room */
}

#all_types_table th,
#all_types_table td {
    min-width: 90px !important;
    white-space: nowrap; /* prevent wrapping */
    width: auto;
}
#all_types_table td:nth-child(3),
#all_types_table th:nth-child(3) {
    max-width: 100px;
    white-space: nowrap;
}
#all_types_table td:nth-child(6),
#all_types_table th:nth-child(6) {
    max-width: 250px; /* Or whatever works well in your layout */
    white-space: normal;          /* ✅ allow line breaks */
    word-break: break-word;       /* ✅ break long words if needed */
    overflow-wrap: anywhere;      /* ✅ fallback for very long strings */
    padding-right: 10px;
}
#all_types_table td:nth-child(6) {
    position: relative;
}

#all_types_table td:nth-child(6):hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 0;
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    white-space: normal;
    z-index: 10;
    max-width: 300px;
}


/* ---------------------------------------------------
    TRACKING NUMBER POPUP STYLE
----------------------------------------------------- */

#tracking_number_popup {
    top: 37%;
    left: 50%;
}

#tracking_number_popup #popup_header {
    display: flex;
    padding: 6px 5px 4px 10px;
    background-color: #097FF5;
    justify-content: space-between;
    align-items: center;
}

#tracking_number_popup #popup_header span {
    font-size: 14px;
    color: white;
}

#tracking_number_popup #popup_header button {
    cursor: pointer;
    outline: none;
    background: none;
    color: white;
    font-size: 25px;
    line-height: 15px;
    border: none;
}

#tracking_number_popup #popup_body {
    padding: 5px 23px 10px 10px;
}

#tracking_number_popup #popup_body span {
    font-size: 12px;
}

#tracking_number_popup #popup_body hr {
    margin-top: 3px;
    margin-bottom: 0;
    border-bottom: 1px solid black;
}


/* ---------------------------------------------------
    SIDEBAR STYLE
----------------------------------------------------- */

#sidebar {
    position: relative;
    min-width: 250px;
    max-width: 301px;
    background: #097FF5;
    color: #fff;
    transition: all 0.3s;
    overflow: hidden;
}

#sidebar.active {
    min-width: 60px;
    max-width: 60px;
    text-align: center;
}

#sidebar.active .sidebar-header h3,
#sidebar.active .CTAs {
    display: none;
}

#sidebar.active .sidebar-header strong {
    display: block;
}

#sidebar.active .dropdown-toggle::after {
    top: auto;
    bottom: 10px;
    right: 50%;
    -webkit-transform: translateX(50%);
    -ms-transform: translateX(50%);
    transform: translateX(50%);
}

#sidebar .sidebar-header {
    display: flex;
    padding-left: 12px;
    background: #097FF5;
    padding-top: 7px;
}

#sidebar.active .sidebar-header {
    margin-top: 247px;
    margin-right: 6px;
    transform: rotate(-90deg);
}

#sidebar .sidebar-header strong {
    display: none;
    font-size: 1.8em;
}

#sidebar ul {
    padding: 2px 10px 0;
}

#sidebar ul li {
    margin-top: 9px;
}

#sidebar ul li a {
    padding: 7px 10px 8px;
    border-radius: 5px;
    font-size: 14px;
    display: block;
    color: #84bffa;
}

#sidebar ul li a i {
    font-size: 17px;
    margin-right: 10px;
}

#sidebar.active ul {
    margin-top: 133px;
}

#sidebar.active ul li a {
    padding: 8px 5px 5px;
}

#sidebar.active ul li a i {
    margin-left: auto;
    margin-right: auto;
    font-size: 19px;
}

#sidebar.active ul li a span {
    display: none;
}

#sidebar.active ul ul a {
    padding: 10px !important;
}

#sidebar ul.components {
    padding: 20px 0;
    border-bottom: 1px solid #097FF5;
}

#sidebar ul li a:hover {
    color: #097FF5;
    background: #fff;
}

#sidebar ul li.active>a,
a[aria-expanded="true"] {
    color: #fff;
    background: #0C6CCC;
}

a[data-toggle="collapse"] {
    position: relative;
}

#sidebar_toggle_btn_container {
    display: flex;
    justify-content: center;
    width: 100%;
    position: absolute;
    bottom: 0;
    padding-bottom: 15px;
}


/* The switch - the box around the slider */

.switch {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 15px;
}


/* Hide default HTML checkbox */

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}


/* The slider */

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    border: 1px solid #84bffa;
    outline: none;
    bottom: 0;
    background-color: #097ff5;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    top: 1px;
    left: 13px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}


/* Slider slide distance */

input:checked+.slider:before {
    -webkit-transform: translateX(-11px);
    -ms-transform: translateX(-11px);
    transform: translateX(-11px);
}

.dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

ul ul a {
    font-size: 0.9em !important;
    padding-left: 30px !important;
    background: #097FF5;
}

ul.CTAs {
    padding: 20px;
}

ul.CTAs a {
    text-align: center;
    font-size: 0.9em !important;
    display: block;
    border-radius: 5px;
    margin-bottom: 5px;
}

a.download {
    background: #fff;
    color: #097FF5;
}

a.article,
a.article:hover {
    background: #097FF5 !important;
    color: #fff !important;
}


/* ---------------------------------------------------
    CONTENT STYLE
----------------------------------------------------- */

#content {
    width: 100%;
    padding: 0 30px 0 38px;
    overflow-x: auto; /* Change from hidden to auto */
    min-height: 100vh;
    max-height: 100vh;
    transition: all 0.3s;
    background-color: #f6f6f6;
}

#navbar {
    display: flex;
    width: 100%;
    margin-top: 20px;
}

#navbar div {
    display: flex;
    float: right;
    margin-left: auto;
    color: #88888a;
}

#navbar span {
    margin-right: 5px;
    font-size: 16px;
}

#navbar a {
    padding: 0;
    font-size: 13px;
}

#cards_container {
    display: grid;
    grid-auto-flow: column;
    grid-gap: 1.5em;
    margin-top: 15px;
}

.status_card {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: #1a2e46;
    min-width: 180px;
    height: 80px;
    border-radius: 5px;
}

.card_icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 55px;
    width: 55px;
    min-width: 55px;
    border: 1px solid #415266;
}

.card_icon span {
    color: #bbc1c8;
    font-size: 28px;
}

.card_info {
    display: grid;
    padding-top: 5px;
    padding-left: 8px;
    height: 55px;
    width: 100%;
}

.card_primary_text {
    color: white;
    font-size: 30px;
    line-height: 25px;
}

.card_secondary_text {
    color: white;
    font-size: 14px;
    margin-top: 2px;
}

#utility_container {
    display: flex;
    align-items: center;
    margin-top: 35px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 10px; /* Space between wrapped items */
}

#utility_container_text {
    color: #88888a;
    font-size: 18px;
    font-weight: bold;
}

#utility_wrapper {
    display: flex;
    align-items: center;
    float: right;
    margin-left: auto;
}


#search_box_container {
    display: flex;
    border-radius: 5px;
    border: 1px solid #88888a;
    width: 300px;
    padding: 2px 5px;
    background: transparent;
}

#search_box_container form {
    display: flex;
    width: 100%;
}

input[type=text] {
    font-size: 11px;
    width: 100%;
    margin-right: 5px;
    outline: none;
    border: none;
    background: transparent;
}

#search_order_btn {
    padding: 0;
    border: none;
    cursor: pointer;
    outline: none;
    background: transparent;
}

#search_order_btn i {
    color: #88888a;
}

.change_orders_btn {
    color: #88888a;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 5px;
    border: 1px solid #88888a;
    background: transparent;
    cursor: pointer;
}

.change_orders_btn i {
    font-size: 15px;
}

#select_all_btn {
    margin-right: 10px;
    margin-left: 10px;
    outline: none;
}

#reopen_btn {
    margin-right: 10px;
    outline: none;
}

#send_all_btn {
    outline: none;
}

#select_all_btn:hover,
#reopen_btn:hover {
    color: white;
    background: #097FF5;
    border: 1px solid #097FF5;
}

#select_all_btn:active,
#reopen_btn:active {
    color: white;
    background: #0864c9;
    border: 1px solid #0864c9;
}

#send_all_btn:hover {
    color: white;
    background: #48b32f;
    border: 1px solid #48b32f;
}

#send_all_btn:active {
    color: white;
    background: #3a8d26;
    border: 1px solid #3a8d26;
}

#table_container {
    max-height: calc(100vh - 230px);
    overflow: auto;
    margin-top: 15px;
    margin-bottom: 50px;
    width: 100%;
}

.table {
    width: 100%;
}

.table thead th {
    color: white;
    font-size: 11px;
    /* TODO: RED ONLY FOR STAGING */
    background: #097FF5;
    /* background: red; */
    padding: 6px 0 8px 10px;
    /* width: 100%; */
    white-space: nowrap;
}

.table thead th:first-child {
    border-top-left-radius: 5px;
}

.table thead th:last-child {
    border-top-right-radius: 5px;
}

.table tbody td {
    min-width: 90px;
    font-size: 10px;
    padding: 7px 0 7px 10px;
    vertical-align: middle;
    line-height: 18px;
}

.table tbody th:nth-child(1),
.table tbody td:nth-child(1) {
    min-width: 50px;
}
.table tbody th:nth-child(3),
.table tbody td:nth-child(3) {
    min-width: 100px;
}

#update_order_checkbox {
    float: right;
    margin-right: 20px;
}


/* Background color for even rows */

.table-striped>tbody>tr:nth-child(odd)>td {
    background-color: #fcfcfc;
}


/* ---------------------------------------------------
    MEDIAQUERIES
----------------------------------------------------- */

@media (max-width: 768px) {
    #sidebar {
        min-width: 40px;
        max-width: 80px;
        text-align: center;
        margin-left: -80px !important;
    }
    .dropdown-toggle::after {
        top: auto;
        bottom: 10px;
        right: 50%;
        -webkit-transform: translateX(50%);
        -ms-transform: translateX(50%);
        transform: translateX(50%);
    }
    #sidebar.active {
        margin-left: 0 !important;
    }
    #sidebar .sidebar-header h3,
    #sidebar .CTAs {
        display: none;
    }
    #sidebar .sidebar-header strong {
        display: block;
    }
    #sidebar ul li a {
        padding: 20px 10px;
    }
    #sidebar ul li a span {
        font-size: 0.85em;
    }
    #sidebar ul li a i {
        margin-right: 0;
        display: block;
    }
    #sidebar ul ul a {
        padding: 10px !important;
    }
    #sidebar ul li a i {
        font-size: 1.3em;
    }
    #sidebar {
        margin-left: 0;
    }
    #sidebarCollapse span {
        display: none;
    }
}

#shipment-upload-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.input-group {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.input-group label {
    margin-right: 10px;
    font-size: 15px;
}

#shipment-upload-container input[type="text"] {
    border: 1px solid #ccc;
    padding: 10px;
    width: 80%;
}
