/*
 * Compact order detail drawer.
 * Scope every rule to #order_list-panel because the Dashboard has several
 * unrelated right-panel components that still use the legacy layout.
 */
#order_list-panel {
    --order-panel-ink: #283252;
    --order-panel-muted: #8590aa;
    --order-panel-line: #e4e8ef;
    --order-panel-soft: #f5f6f8;
    --order-panel-accent: #ff596f;
    --order-panel-money-font: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

#order_list-panel .right-panel {
    width: min(520px, calc(100vw - 44px));
    border-left: 1px solid var(--order-panel-line);
    box-shadow: -14px 0 36px rgba(40, 50, 82, 0.12);
}

#order_list-panel .right-panel .right-panel-head {
    display: flex;
    align-items: center;
    min-height: 68px;
    height: auto;
    border-bottom: 1px solid var(--order-panel-line);
    padding: 10px 22px !important;
}

#order_list-panel .right-panel-head h3 {
    min-width: 0;
    margin: 0;
    line-height: 1.2;
}

#order_list-panel #orderid_text {
    color: var(--order-panel-ink);
    font-size: 1rem;
    font-weight: 800;
}

#order_list-panel #order_date {
    margin-top: 3px;
    color: var(--order-panel-muted) !important;
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
}

#order_list-panel .right-panel-head .close-panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border: 1px solid var(--order-panel-line);
    border-radius: 50%;
    background: #fff;
    color: #7d879c;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

#order_list-panel .right-panel-head .close-panel:hover,
#order_list-panel .right-panel-head .close-panel:focus {
    border-color: #f4aab4;
    background: #fff4f6;
    color: var(--order-panel-accent);
}

#order_list-panel .right-panel-head .close-panel svg {
    width: 18px;
    height: 18px;
}

#order_list-panel .right-panel .right-panel-body {
    height: calc(100% - 68px);
    padding: 0 22px 24px !important;
    color: var(--order-panel-ink);
    overscroll-behavior: contain;
}

#order_list-panel #sidebar_orderhistory_html > .container {
    width: 100%;
    max-width: none;
}

#order_list-panel #sidebar_orderhistory_html > .container > .row {
    margin: 0;
}

#order_list-panel #sidebar_orderhistory_html > .container > .row > .col-lg-12 {
    padding: 0 !important;
}

/* Legacy section bars become compact, consistent headers. */
#order_list-panel #sidebar_orderhistory_html > .container > .row > .col-lg-12 > div:first-child:not(.alert):not(.show_order_loader_area):not(.field) {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 12px 0 8px !important;
    border: 1px solid #e7eaf0;
    border-radius: 9px;
    background: var(--order-panel-soft) !important;
    padding: 8px 11px !important;
    color: var(--order-panel-ink);
    font-size: 0.88rem;
    font-weight: 800 !important;
}

#order_list-panel #sidebar_orderhistory_html > .container > .row > .col-lg-12:first-child > div:first-child {
    margin-top: 10px !important;
}

#order_list-panel #sidebar_orderhistory_html > .container > .row > .col-lg-12 > div:first-child .show_order_loader_area {
    display: flex;
    align-items: center;
    min-height: 26px !important;
    margin: 0 0 0 auto !important;
    font-size: 0.72rem !important;
    letter-spacing: 0 !important;
}

#order_list-panel #sidebar_orderhistory_html > .container > .row > .col-lg-12 > div:first-child .label,
#order_list-panel #sidebar_orderhistory_html > .container > .row > .col-lg-12 > div:first-child .tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    height: auto;
    margin: 0;
    border-radius: 7px;
    padding: 5px 9px;
    font-size: 0.72rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
}

#order_list-panel .show_order_loader_area {
    min-height: 0 !important;
}

#order_list-panel .show_order_loader_area.has-loader-active {
    min-height: 42px !important;
}

#order_list-panel .cart_tablex {
    width: 100%;
    margin: 0;
    color: var(--order-panel-ink);
    font-size: 0.8rem !important;
    line-height: 1.45;
}

#order_list-panel .cart_tablex > tbody > tr > td,
#order_list-panel .cart_tablex > tr > td {
    border-bottom-color: var(--order-panel-line) !important;
    padding: 6px 10px !important;
}

#order_list-panel #order_type_info:empty,
#order_list-panel #member_info:empty {
    display: none;
}

#order_list-panel #member_info,
#order_list-panel #pay_way_text,
#order_list-panel #shiptype,
#order_list-panel #shipaddress,
#order_list-panel #ship_schedule {
    overflow-wrap: anywhere;
}

#order_list-panel #member_info {
    display: block;
    color: #47536b;
    font-weight: 600;
    line-height: 1.55;
}

#order_list-panel #buycomment,
#order_list-panel #order_sn_warning {
    margin: 0 0 8px;
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.76rem;
    line-height: 1.4;
}

/* Product table: reserve real space for image, description and subtotal. */
#order_list-panel #product_list {
    font-size: 0.8rem;
}

#order_list-panel .order-detail-product-table > thead > tr > th:last-child {
    width: 140px;
}

#order_list-panel .order-detail-product-table .order-detail-product-image-column {
    width: 80px;
}

#order_list-panel .order-detail-product-table .order-detail-product-subtotal-column {
    width: 140px;
}

#order_list-panel #product_list > tr > td {
    height: auto;
    border-bottom: 1px solid var(--order-panel-line) !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    vertical-align: top;
}

#order_list-panel #product_list > tr > td:first-child {
    width: 80px !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

#order_list-panel #product_list > tr > td:first-child img {
    display: block;
    width: 60px !important;
    height: 60px;
    border: 1px solid #edf0f4;
    border-radius: 8px;
    background: #fff;
    object-fit: cover;
}

#order_list-panel .order-detail-product-image-link {
    display: block;
}

#order_list-panel .order-detail-image-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

#order_list-panel .order-detail-image-badges:empty {
    display: none;
}

#order_list-panel .order-detail-gift-badge,
#order_list-panel .order-detail-addon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-height: 20px;
    height: auto;
    margin: 0 !important;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 0.62rem;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

#order_list-panel #product_list > tr > td:nth-child(2) {
    width: auto;
    min-width: 0;
    padding-right: 10px !important;
    color: #4c5770;
    overflow-wrap: anywhere;
}

#order_list-panel .order-detail-product-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 3px;
}

#order_list-panel .order-detail-product-badges:empty {
    display: none;
}

#order_list-panel .order-detail-product-title {
    display: block;
    color: #3f4a63;
    font-weight: 700;
    line-height: 1.3;
}

#order_list-panel .order-detail-product-subname {
    color: #111827;
    font-weight: 850;
}

#order_list-panel #product_list > tr > td:nth-child(2) .tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 22px;
    height: auto;
    margin: 0 !important;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 0.65rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

#order_list-panel .order-detail-product-remark {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 3px;
    color: #439b75;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.28;
}

#order_list-panel .order-detail-product-remark i {
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: 0.55rem;
}

#order_list-panel .order-detail-super-option,
#order_list-panel .order-detail-package-item {
    margin-top: 3px;
    font-size: 0.72rem;
    line-height: 1.28;
}

#order_list-panel .order-detail-package-item strong {
    color: #111827;
    font-weight: 850;
}

#order_list-panel .order-detail-product-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 5px;
    row-gap: 1px;
    margin-top: 3px;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.25;
}

#order_list-panel .order-detail-stock-id,
#order_list-panel .order-detail-product-code {
    white-space: nowrap;
}

#order_list-panel .order-detail-stock-id img {
    display: inline-block;
    width: 18px !important;
    height: 18px;
    margin-right: 3px;
    border: 0;
    vertical-align: -4px;
    object-fit: contain;
}

#order_list-panel .order-detail-product-code-separator {
    color: #d1d5db;
}

#order_list-panel .order-detail-product-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 16px;
    row-gap: 2px;
    margin-top: 5px;
    font-family: var(--order-panel-money-font) !important;
    font-size: 1.06rem;
    font-weight: 500 !important;
    line-height: 1.25;
}

#order_list-panel .order-detail-product-price-value,
#order_list-panel .order-detail-product-quantity-value {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
}

#order_list-panel #product_list > tr > td.order-detail-product-subtotal {
    width: 140px !important;
    padding-right: 0 !important;
    padding-left: 4px !important;
    font-family: var(--order-panel-money-font) !important;
    font-size: 1.06rem;
    font-weight: 500 !important;
    line-height: 1.25;
    text-align: right;
}

#order_list-panel .order-detail-product-subtotal .amount {
    display: block;
    white-space: nowrap;
}

#order_list-panel .order-detail-product-deposit {
    display: block;
    margin-top: 3px;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.25;
    white-space: normal;
}

#order_list-panel .order-detail-product-deposit-label {
    font-size: 70%;
}

#order_list-panel .order-detail-product-discount-amount {
    margin-top: 3px;
    font-size: inherit;
    line-height: 1.25;
    white-space: normal;
}

#order_list-panel .order-detail-subtotal-badges {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

#order_list-panel .order-detail-subtotal-badges .tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    height: auto;
    margin: 0 !important;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

#order_list-panel #ship_info_status_print {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
}

#order_list-panel #ship_info_status_print:empty {
    display: none;
}

#order_list-panel .order-detail-print-button {
    display: inline-flex !important;
    float: none !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 28px;
    margin: 0 !important;
    border: 1px solid #a9d9b3;
    border-radius: 7px;
    background: #fff;
    padding: 4px 9px;
    color: #278a3d;
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1;
    letter-spacing: 0;
    vertical-align: middle;
}

#order_list-panel .order-detail-print-button:hover,
#order_list-panel .order-detail-print-button:focus {
    border-color: #69b67a;
    background: #effaf2;
    color: #1f7532;
}

#order_list-panel .order-detail-print-button i {
    color: inherit;
    font-size: 15px;
}

#order_list-panel #product_list .currencySymbol,
#order_list-panel #product_list .currencySymbol_cart,
#order_list-panel #productlistfooter .currencySymbol,
#order_list-panel #productlistfooter .currencySymbol_cart,
#order_list-panel .order-detail-money-prefix,
#order_list-panel .order-detail-money-decimal {
    font-size: 70%;
}

#order_list-panel .order-detail-money-prefix,
#order_list-panel .order-detail-money-integer,
#order_list-panel .order-detail-money-decimal {
    font-weight: inherit;
}

#order_list-panel .order-detail-money-integer {
    font-size: 100%;
}

#order_list-panel #productlistfooter {
    border-top: 1px solid #d9dee7;
}

#order_list-panel #productlistfooter > tr > td {
    border: 0 !important;
    padding: 1px 0 1px 8px !important;
    font-family: var(--order-panel-money-font) !important;
    font-size: 1.06rem !important;
    font-weight: 500 !important;
    line-height: 1.2;
}

#order_list-panel #productlistfooter > tr:first-child > td {
    padding-top: 4px !important;
}

#order_list-panel #productlistfooter > tr > td:first-child {
    width: 66%;
    font-size: 0.848rem !important;
}

#order_list-panel #productlistfooter > tr > td:last-child {
    width: 34%;
    font-size: 1.06rem !important;
    white-space: nowrap;
}

#order_list-panel .order-detail-negative-amount {
    color: #991b1b !important;
}

#order_list-panel #productlistfooter > tr.order-detail-total-row > td:last-child,
#order_list-panel #productlistfooter #alltotal {
    font-size: 1.38rem !important;
    font-weight: 700 !important;
}

#order_list-panel #productlistfooter > tr.order-detail-total-row > td:first-child,
#order_list-panel #productlistfooter > tr.order-detail-total-row > td:first-child strong {
    font-size: 1.104rem !important;
    font-weight: 700 !important;
}

#order_list-panel #productlistfooter > tr.order-detail-total-row > td {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

#order_list-panel #pay_way_text,
#order_list-panel #shiptype,
#order_list-panel #shipaddress,
#order_list-panel #ship_schedule {
    display: block;
    color: #3f4a63;
    font-size: 0.8rem;
    line-height: 1.5;
}

#order_list-panel #pay_way_text > br:first-child {
    display: none;
}

#order_list-panel #pay_way_text table {
    margin-top: 6px !important;
    font-size: 0.75rem;
}

#order_list-panel #shiptype {
    padding-right: 4px;
    font-weight: 750 !important;
}

#order_list-panel #shiptype img {
    max-width: 104px;
    max-height: 30px;
    object-fit: contain;
}

#order_list-panel .ebuy_create,
#order_list-panel .ebuy_label,
#order_list-panel .shipany_create2,
#order_list-panel .shipany_print,
#order_list-panel .shipany_pickup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    margin: 3px 0 3px 5px !important;
    border: 0;
    border-radius: 7px;
    padding: 5px 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.68rem !important;
    line-height: 1.25;
    letter-spacing: 0 !important;
    white-space: normal;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

#order_list-panel .ebuy_create:hover,
#order_list-panel .ebuy_create:focus-visible,
#order_list-panel .ebuy_label:hover,
#order_list-panel .ebuy_label:focus-visible,
#order_list-panel .shipany_create2:hover,
#order_list-panel .shipany_create2:focus-visible,
#order_list-panel .shipany_print:hover,
#order_list-panel .shipany_print:focus-visible,
#order_list-panel .shipany_pickup:hover,
#order_list-panel .shipany_pickup:focus-visible {
    filter: brightness(0.92);
    box-shadow: 0 5px 12px rgba(20, 155, 215, 0.22);
    outline: none;
    transform: translateY(-1px);
}

#order_list-panel .ebuy_create:focus-visible,
#order_list-panel .ebuy_label:focus-visible,
#order_list-panel .shipany_create2:focus-visible,
#order_list-panel .shipany_print:focus-visible,
#order_list-panel .shipany_pickup:focus-visible {
    box-shadow: 0 0 0 3px rgba(20, 155, 215, 0.2), 0 5px 12px rgba(20, 155, 215, 0.22);
}

#order_list-panel .ebuy_create:active,
#order_list-panel .ebuy_label:active,
#order_list-panel .shipany_create2:active,
#order_list-panel .shipany_print:active,
#order_list-panel .shipany_pickup:active {
    box-shadow: none;
    transform: translateY(0);
}

#order_list-panel .ebuy_create.is-disabled,
#order_list-panel .ebuy_label.is-disabled,
#order_list-panel .shipany_create2.is-disabled,
#order_list-panel .shipany_print.is-disabled,
#order_list-panel .shipany_pickup.is-disabled {
    cursor: not-allowed;
    filter: none;
    opacity: 0.55;
    transform: none;
}

#order_list-panel a[href],
#order_list-panel button,
#order_list-panel [role="button"] {
    cursor: pointer;
}

#order_list-panel .view_warranty_terms_order {
    border-radius: 4px;
    padding: 2px 3px;
    transition: background-color 0.16s ease, color 0.16s ease;
}

#order_list-panel .view_warranty_terms_order:hover,
#order_list-panel .view_warranty_terms_order:focus-visible {
    background: #edf9f3;
    color: #247451 !important;
    outline: none;
    text-decoration: none;
}

#order_list-panel .order-detail-product-image-link img {
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

#order_list-panel .order-detail-product-image-link:hover img,
#order_list-panel .order-detail-product-image-link:focus-visible img {
    border-color: #f3a6b1;
    box-shadow: 0 4px 10px rgba(40, 50, 82, 0.12);
    transform: translateY(-1px);
}

/* ShipAny modal opened from the order-detail drawer. */
.order-detail-shipany-modal .modal-background {
    background: rgba(25, 28, 38, 0.68);
    backdrop-filter: blur(2px);
}

.order-detail-shipany-modal .modal-content {
    width: min(540px, calc(100vw - 32px));
    max-width: 540px;
    max-height: none;
    margin: 16px auto;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.order-detail-shipany-modal .modal-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100vh - 32px);
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(22, 29, 48, 0.24);
    overflow: hidden;
}

.order-detail-shipany-modal .modal-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    border-bottom: 1px solid #e7eaf0;
    background: #fff;
    padding: 16px 20px;
}

.order-detail-shipany-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff1f3;
    color: #ff596f;
}

.order-detail-shipany-modal-icon svg {
    width: 23px;
    height: 23px;
}

.order-detail-shipany-modal-heading {
    min-width: 0;
}

.order-detail-shipany-modal-heading h3 {
    margin: 0;
    color: #283252;
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.25;
}

.order-detail-shipany-modal-heading p {
    margin: 3px 0 0;
    color: #8590aa;
    font-size: 0.76rem;
    line-height: 1.35;
}

.order-detail-shipany-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f5f6f8;
    color: #7d879c;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.order-detail-shipany-modal-close:hover,
.order-detail-shipany-modal-close:focus-visible {
    background: #fff1f3;
    color: #ff596f;
    outline: none;
    transform: rotate(4deg);
}

.order-detail-shipany-modal-close svg {
    width: 18px;
    height: 18px;
}

.order-detail-shipany-modal .modal-card-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 188px);
    background: #f5f7fa;
    padding: 20px;
    overflow-y: auto;
}

.order-detail-shipany-modal .inner-content,
.order-detail-shipany-modal .modal-form,
.order-detail-shipany-modal .fieldset {
    margin: 0;
    padding: 0;
}

.order-detail-shipany-modal .fieldset {
    border: 0;
}

.order-detail-shipany-modal .errmsg_area {
    margin: 0 0 14px;
    border-radius: 8px;
}

.order-detail-shipany-fields {
    display: grid !important;
    gap: 16px;
    margin: 0 !important;
}

.order-detail-shipany-fields > .order-detail-shipany-field {
    width: 100% !important;
    padding: 0 !important;
}

.order-detail-shipany-label {
    display: block;
    margin-bottom: 6px;
    color: #3f4a63;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.order-detail-shipany-modal .field {
    margin-bottom: 0;
}

.order-detail-shipany-modal #shipany_wt {
    width: 200px;
}

.order-detail-shipany-modal .input,
.order-detail-shipany-modal .select,
.order-detail-shipany-modal .select select {
    height: 42px;
}

.order-detail-shipany-modal .input,
.order-detail-shipany-modal .select select {
    border-color: #dfe3ea;
    border-radius: 8px;
    color: #283252;
    font-size: 0.86rem;
    box-shadow: none;
}

.order-detail-shipany-modal .input:focus,
.order-detail-shipany-modal .select select:focus {
    border-color: #ff8b9a;
    box-shadow: 0 0 0 3px rgba(255, 89, 111, 0.12);
}

.order-detail-shipany-rate-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.order-detail-shipany-rate-button,
.order-detail-shipany-cancel,
.order-detail-shipany-submit {
    min-height: 38px;
    border-radius: 8px !important;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.order-detail-shipany-rate-button {
    border-color: #ffb2bc;
    background: #fff;
    color: #df4056;
}

.order-detail-shipany-rate-button:hover,
.order-detail-shipany-rate-button:focus-visible {
    border-color: #ff596f;
    background: #fff3f5;
    color: #ca3045;
    outline: none;
}

.order-detail-shipany-helper {
    margin: 5px 0 0;
    color: #9aa2b4;
    font-size: 0.68rem;
    line-height: 1.35;
}

.order-detail-shipany-modal .modal-card-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #e7eaf0;
    background: #fff;
    padding: 12px 20px;
}

.order-detail-shipany-cancel {
    border-color: #dfe3ea;
    background: #fff;
    color: #5d6780;
}

.order-detail-shipany-cancel:hover,
.order-detail-shipany-cancel:focus-visible {
    border-color: #bfc6d2;
    background: #f7f8fa;
    color: #3f4a63;
    outline: none;
}

.order-detail-shipany-submit {
    min-width: 104px;
    border-color: #ff596f !important;
    background: #ff596f !important;
    color: #fff !important;
}

.order-detail-shipany-submit:hover,
.order-detail-shipany-submit:focus-visible {
    border-color: #ed4058 !important;
    background: #ed4058 !important;
    box-shadow: 0 6px 14px rgba(255, 89, 111, 0.24);
    outline: none;
    transform: translateY(-1px);
}

.order-detail-shipany-modal .button.is-disabled,
.order-detail-shipany-modal .button[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

/* eBuy order modal: the same single-card pattern with a two-column desktop form. */
.order-detail-ebuy-modal .modal-background {
    background: rgba(25, 28, 38, 0.68);
    backdrop-filter: blur(2px);
}

.order-detail-ebuy-modal .modal-content {
    width: min(720px, calc(100vw - 32px));
    max-width: 720px;
    max-height: none;
    margin: 16px auto;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.order-detail-ebuy-modal .modal-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(22, 29, 48, 0.24);
}

.order-detail-ebuy-modal .modal-card-head {
    display: flex;
    align-items: center;
    flex: 0 0 78px;
    gap: 12px;
    min-height: 78px;
    border-bottom: 1px solid #e7eaf0;
    background: #fff;
    padding: 16px 20px;
}

.order-detail-ebuy-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff1f3;
    color: #ff596f;
}

.order-detail-ebuy-modal-icon svg {
    width: 23px;
    height: 23px;
}

.order-detail-ebuy-modal-heading {
    min-width: 0;
}

.order-detail-ebuy-modal-heading h3 {
    margin: 0;
    color: #283252;
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.25;
}

.order-detail-ebuy-modal-heading p {
    margin: 3px 0 0;
    color: #8590aa;
    font-size: 0.76rem;
    line-height: 1.35;
}

.order-detail-ebuy-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f5f6f8;
    color: #7d879c;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.order-detail-ebuy-modal-close:hover,
.order-detail-ebuy-modal-close:focus-visible {
    background: #fff1f3;
    color: #ff596f;
    outline: none;
    transform: rotate(4deg);
}

.order-detail-ebuy-modal-close svg {
    width: 18px;
    height: 18px;
}

.order-detail-ebuy-modal .modal-card-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 172px);
    overflow-y: auto;
    background: #f5f7fa;
    padding: 20px;
}

.order-detail-ebuy-modal .inner-content,
.order-detail-ebuy-modal .modal-form {
    margin: 0;
    padding: 0;
}

.order-detail-ebuy-modal .errmsg_area {
    margin: 0 0 14px;
    border-radius: 8px;
}

.order-detail-ebuy-fields {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    margin: 0 !important;
}

.order-detail-ebuy-fields > .order-detail-ebuy-field {
    width: auto !important;
    padding: 0 !important;
}

.order-detail-ebuy-field--full {
    grid-column: 1 / -1;
}

.order-detail-ebuy-field--half {
    grid-column: span 1;
}

.order-detail-ebuy-label {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    margin-bottom: 6px;
    color: #3f4a63;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.order-detail-ebuy-label .required {
    color: #ef3340;
}

.order-detail-ebuy-modal .field {
    margin-bottom: 0;
}

.order-detail-ebuy-modal .control.select,
.order-detail-ebuy-modal .select,
.order-detail-ebuy-modal .select select {
    width: 100%;
}

.order-detail-ebuy-modal .input,
.order-detail-ebuy-modal .select,
.order-detail-ebuy-modal .select select {
    height: 42px;
}

.order-detail-ebuy-modal .input,
.order-detail-ebuy-modal .select select {
    border-color: #dfe3ea;
    border-radius: 8px;
    background: #fff;
    color: #283252;
    font-size: 0.86rem;
    box-shadow: none;
}

.order-detail-ebuy-modal .input:focus,
.order-detail-ebuy-modal .select select:focus {
    border-color: #ff8b9a;
    box-shadow: 0 0 0 3px rgba(255, 89, 111, 0.12);
}

.order-detail-ebuy-default {
    height: auto;
    margin-left: 3px;
    border: 0;
    border-radius: 999px;
    background: #fff0f3;
    padding: 2px 7px;
    color: #e34258;
    cursor: pointer;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.3;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.order-detail-ebuy-default:hover,
.order-detail-ebuy-default:focus-visible {
    background: #ffdde2;
    color: #c92f44;
    outline: none;
}

.order-detail-ebuy-modal .modal-card-foot {
    display: flex;
    flex: 0 0 62px;
    justify-content: flex-end;
    gap: 8px;
    min-height: 62px;
    border-top: 1px solid #e7eaf0;
    background: #fff;
    padding: 12px 20px;
}

.order-detail-ebuy-cancel,
.order-detail-ebuy-submit {
    min-height: 38px;
    border-radius: 8px !important;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.order-detail-ebuy-cancel {
    border-color: #dfe3ea;
    background: #fff;
    color: #5d6780;
}

.order-detail-ebuy-cancel:hover,
.order-detail-ebuy-cancel:focus-visible {
    border-color: #bfc6d2;
    background: #f7f8fa;
    color: #3f4a63;
    outline: none;
}

.order-detail-ebuy-submit {
    min-width: 104px;
    border-color: #ff596f !important;
    background: #ff596f !important;
    color: #fff !important;
}

.order-detail-ebuy-submit:hover,
.order-detail-ebuy-submit:focus-visible {
    border-color: #ed4058 !important;
    background: #ed4058 !important;
    box-shadow: 0 6px 14px rgba(255, 89, 111, 0.24);
    outline: none;
    transform: translateY(-1px);
}

.order-detail-ebuy-modal .button.is-disabled,
.order-detail-ebuy-modal .button[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

#order_list-panel .field.has-textarea-addon {
    margin-top: 8px;
}

#order_list-panel #msgtext {
    min-height: 64px;
    border-color: var(--order-panel-line);
    border-radius: 8px 8px 0 0;
    font-size: 0.8rem;
}

#order_list-panel .field.has-textarea-addon .control.is-textarea-addon {
    min-height: 40px;
    padding: 5px 7px;
}

#order_list-panel .timeline-wrapper .timeline-wrapper-inner {
    padding-top: 8px !important;
}

#order_list-panel .timeline-wrapper .timeline-wrapper-inner .timeline-container .timeline-item {
    padding-bottom: 14px;
}

body.is-dark #order_list-panel .right-panel,
body.is-dark #order_list-panel .right-panel-head {
    border-color: #3d3d43;
    background: #28282c;
}

body.is-dark #order_list-panel {
    --order-panel-ink: #e1e1e6;
    --order-panel-muted: #9999a5;
    --order-panel-line: #3d3d43;
    --order-panel-soft: #323237;
}

body.is-dark #order_list-panel .right-panel-head .close-panel,
body.is-dark #order_list-panel #product_list > tr > td:first-child img {
    border-color: #45454c;
    background: #323237;
}

body.is-dark #order_list-panel #sidebar_orderhistory_html > .container > .row > .col-lg-12 > div:first-child:not(.alert):not(.show_order_loader_area):not(.field) {
    border-color: #424249;
}

body.is-dark #order_list-panel #member_info,
body.is-dark #order_list-panel #pay_way_text,
body.is-dark #order_list-panel #shiptype,
body.is-dark #order_list-panel #shipaddress,
body.is-dark #order_list-panel #ship_schedule,
body.is-dark #order_list-panel #product_list > tr > td:nth-child(2),
body.is-dark #order_list-panel .order-detail-product-title {
    color: #c8c8d0;
}

body.is-dark #order_list-panel .order-detail-product-subname,
body.is-dark #order_list-panel .order-detail-package-item strong {
    color: #f1f1f4;
}

body.is-dark #order_list-panel .order-detail-product-code-separator {
    color: #565660;
}

body.is-dark #order_list-panel .order-detail-print-button {
    border-color: #426e4c;
    background: #303a32;
    color: #8ed49d;
}

body.is-dark #order_list-panel .order-detail-negative-amount {
    color: #f87171 !important;
}

body.is-dark .order-detail-shipany-modal .modal-card,
body.is-dark .order-detail-shipany-modal .modal-card-head,
body.is-dark .order-detail-shipany-modal .modal-card-body,
body.is-dark .order-detail-shipany-modal .modal-card-foot {
    border-color: #424249;
    background: #28282c;
}

body.is-dark .order-detail-shipany-modal-heading h3,
body.is-dark .order-detail-shipany-modal .order-detail-shipany-label {
    color: #e1e1e6;
}

body.is-dark .order-detail-shipany-modal-heading p,
body.is-dark .order-detail-shipany-modal .order-detail-shipany-helper {
    color: #9999a5;
}

body.is-dark .order-detail-shipany-modal-icon {
    background: #493137;
    color: #ff7c8d;
}

body.is-dark .order-detail-shipany-modal-close {
    background: #35353b;
    color: #b4b4bd;
}

body.is-dark .order-detail-shipany-modal-close:hover,
body.is-dark .order-detail-shipany-modal-close:focus-visible {
    background: #493137;
    color: #ff8b9a;
}

body.is-dark .order-detail-shipany-modal .input,
body.is-dark .order-detail-shipany-modal .select select {
    border-color: #4a4a52;
    background: #323237;
    color: #e1e1e6;
}

body.is-dark .order-detail-shipany-rate-button,
body.is-dark .order-detail-shipany-cancel {
    border-color: #52525b;
    background: #323237;
    color: #d0d0d7;
}

body.is-dark .order-detail-shipany-rate-button:hover,
body.is-dark .order-detail-shipany-rate-button:focus-visible {
    border-color: #ff7c8d;
    background: #493137;
    color: #ff9ca9;
}

body.is-dark .order-detail-ebuy-modal .modal-card,
body.is-dark .order-detail-ebuy-modal .modal-card-head,
body.is-dark .order-detail-ebuy-modal .modal-card-foot {
    border-color: #424249;
    background: #28282c;
}

body.is-dark .order-detail-ebuy-modal .modal-card-body {
    background: #242429;
}

body.is-dark .order-detail-ebuy-modal-heading h3,
body.is-dark .order-detail-ebuy-modal .order-detail-ebuy-label {
    color: #e1e1e6;
}

body.is-dark .order-detail-ebuy-modal-heading p {
    color: #9999a5;
}

body.is-dark .order-detail-ebuy-modal-icon {
    background: #493137;
    color: #ff7c8d;
}

body.is-dark .order-detail-ebuy-modal-close {
    background: #35353b;
    color: #b4b4bd;
}

body.is-dark .order-detail-ebuy-modal-close:hover,
body.is-dark .order-detail-ebuy-modal-close:focus-visible {
    background: #493137;
    color: #ff8b9a;
}

body.is-dark .order-detail-ebuy-modal .input,
body.is-dark .order-detail-ebuy-modal .select select {
    border-color: #4a4a52;
    background: #323237;
    color: #e1e1e6;
}

body.is-dark .order-detail-ebuy-default {
    background: #493137;
    color: #ff9ca9;
}

body.is-dark .order-detail-ebuy-cancel {
    border-color: #52525b;
    background: #323237;
    color: #d0d0d7;
}

@media (max-width: 767px) {
    #order_list-panel .right-panel {
        width: 100%;
        max-width: 100%;
        border-left: 0;
    }

    #order_list-panel .right-panel .right-panel-head {
        min-height: 62px;
        padding: 8px 16px !important;
    }

    #order_list-panel .right-panel .right-panel-body {
        height: calc(100% - 62px);
        padding: 0 14px 20px !important;
    }

    #order_list-panel #product_list > tr > td:first-child {
        width: 80px !important;
        padding-right: 0 !important;
    }

    #order_list-panel #product_list > tr > td:first-child img {
        width: 50px !important;
        height: 50px;
        border-radius: 7px;
    }

    #order_list-panel #product_list > tr > td:nth-child(2) {
        padding-right: 6px !important;
        font-size: 0.76rem;
    }

    #order_list-panel #product_list > tr > td.order-detail-product-subtotal {
        width: 108px !important;
        font-size: 1.06rem;
    }

    #order_list-panel .order-detail-product-table > thead > tr > th:last-child {
        width: 108px;
    }

    #order_list-panel .order-detail-product-table .order-detail-product-subtotal-column {
        width: 108px;
    }

    #order_list-panel .order-detail-product-price {
        font-size: 1.06rem;
    }

    .order-detail-shipany-modal .modal-content {
        width: calc(100vw - 20px);
        margin: 10px auto;
    }

    .order-detail-shipany-modal .modal-card {
        max-height: calc(100vh - 20px);
    }

    .order-detail-shipany-modal .modal-card-head {
        min-height: 70px;
        padding: 13px 14px;
    }

    .order-detail-shipany-modal-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .order-detail-shipany-modal .modal-card-body {
        max-height: calc(100vh - 170px);
        padding: 16px 14px;
    }

    .order-detail-shipany-modal #shipany_wt {
        width: 100%;
    }

    .order-detail-shipany-rate-row {
        grid-template-columns: 1fr;
    }

    .order-detail-shipany-rate-button {
        width: 100%;
    }

    .order-detail-shipany-modal .modal-card-foot {
        padding: 10px 14px;
    }

    .order-detail-shipany-cancel,
    .order-detail-shipany-submit {
        flex: 1 1 0;
    }

    .order-detail-ebuy-modal .modal-content {
        width: calc(100vw - 20px);
        margin: 10px auto;
    }

    .order-detail-ebuy-modal .modal-card {
        max-height: calc(100vh - 20px);
    }

    .order-detail-ebuy-modal .modal-card-head {
        flex-basis: 70px;
        min-height: 70px;
        padding: 13px 14px;
    }

    .order-detail-ebuy-modal-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .order-detail-ebuy-modal .modal-card-body {
        max-height: calc(100vh - 152px);
        padding: 16px 14px;
    }

    .order-detail-ebuy-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .order-detail-ebuy-field--full,
    .order-detail-ebuy-field--half {
        grid-column: 1;
    }

    .order-detail-ebuy-modal .modal-card-foot {
        padding: 10px 14px;
    }

    .order-detail-ebuy-cancel,
    .order-detail-ebuy-submit {
        flex: 1 1 0;
    }
}

@media (min-width: 1200px) {
    #order_list-panel .right-panel {
        width: 620px;
    }
}
