/**
 * Custom My Orders Page Styles - CLEAN VERSION
 * WooCommerce Orders Table Layout Only
 */

/* ============================================
   SEARCH ORDERS SECTION
   ============================================ */

/* Search Orders Section */
.orders-search-section {
    background: #2c3e50;
    padding: 20px 30px;
    margin-bottom: 20px;
    border-radius: 8px;
}

@media (max-width: 380px) {
    .orders-search-section {
        padding: 12px;
    }
}

.search-orders-header h3 {
    color: var(--primary-color, #2a1f4a);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px 0;
    letter-spacing: 0.5px;
}

/* Grid Layout: 2 columns */
.search-filters-grid {
    display: flex;
    justify-content: space-between;
    align-items: end;
}

@media (max-width: 1240px) {
    .search-filters-grid {
        flex-direction: column;
        align-items: start;
        row-gap: 15px;
    }
}

/* Left Column: Filters (2 rows) */
.filters-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-row label {
     color: var(--text_color-color, #58595b);
    font-size: 14px;
    font-weight: 600;
    min-width: 90px;
    flex-shrink: 0;
}

@media (max-width: 1000px) {
    .filter-row {
        gap: 0px;
    }

    .filter-row label {
        min-width: 80px;
    }
}

@media (max-width: 965px) {
    .filter-row {
        gap: 0px;
        flex-direction: column;
        align-items: start;
        row-gap: 6px;
    }
}

/* Date Range Inputs */
.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.date-input {
    background: var(--white-color, #ffffff);
    border: 1px solid var(--light_border-color, #e5e6e7);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
    outline: none;
    width: 150px;
}

.date-input:focus {
    border-color: var(--dark_link-color, #3157ce);
}

@media (max-width: 435px) {
    .date-input {
        padding: 10px 6px;
        width: 125px;
    }
}

.date-separator {
    color: var(--white-color, #ffffff);
    font-size: 14px;
    font-weight: 500;
}

/* Order Search Group (dropdown + input) */
.order-search-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

@media (max-width: 550px) {
    .order-search-group {
        flex-direction: column;
        align-items: start;
    }
}

.order-filter-dropdown {
    background: var(--white-color, #ffffff);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 43px 4px 15px;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23333' viewBox='0 0 16 16'%3e%3cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px;
    cursor: pointer;
    width: auto;
    min-width: 220px;
    flex-shrink: 0;
    line-height: 1.4;
    font-weight: 500;
}

.order-filter-dropdown:focus {
    border-color: var(--dark_link-color, #3157ce);
}

.order-filter-dropdown option {
    padding: 10px;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
    background: white;
}

.order-search-input {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
    outline: none;
    flex: 1;
    min-width: 250px;
}

.order-search-input:focus {
    border-color: var(--dark_link-color, #3157ce);
}

.order-search-input::placeholder {
    color: var(--text_color-color, #58595b);
    font-style: italic;
}

@media (max-width: 840px) and (min-width: 768px) {
    .order-search-input {
        min-width: 204px;
    }
}

@media (max-width: 605px) and (min-width: 551px) {
    .order-search-input {
        min-width: 200px;
    }
}

/* Right Column: Action Buttons */

.actions-column {
    text-align: right;
    width: 100%;
}

/* ============================================
   ORDERS CONTROLS ROW
   ============================================ */

/* Item Details Toggle and Per Page */
.orders-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 10px;
}

.item-details-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text_color-color, #58595b);
}

.show-details-btn,
.hide-details-btn {
    background: none;
    border: none;
    color: var(--dark_link-color, #3157ce);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.show-details-btn:hover,
.hide-details-btn:hover {
    color: var(--dark_link-color, #3157ce);
    text-decoration: underline;
    background: transparent;
}

.separator {
    color: var(--text_color-color, #58595b);
    font-size: 14px;
    margin: 0 5px;
}

.per-page-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.per-page-control label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text_color-color, #58595b);
}

.per-page-dropdown {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 35px 4px 12px;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 16 16'%3e%3cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
    min-width: 140px;
}

.per-page-dropdown:focus {
    border-color: var(--dark_link-color, #3157ce);
}

/* ============================================
   WOOCOMMERCE TABLE STYLES
   ============================================ */

/* WooCommerce Orders Table - Increase row height */
.woocommerce-orders-table.account-orders-table tbody tr {
    height: auto;
}

.woocommerce-orders-table.account-orders-table tbody td,
.woocommerce-orders-table.account-orders-table tbody th {
    vertical-align: middle;
    border-bottom: 0px;
}

.woocommerce-orders-table.account-orders-table thead th {
    padding: 20px 12px !important;
}

table.my_account_orders.account-orders-table {
    border-width: 0px !important;
}

tr.empty-row {
    background: var(--white-color, #ffffff);
}

tr.empty-row td {
    padding: 10px !important;
}

/* # of Items column - two-line layout */
.items-count-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.items-count {
    font-size: 16px;
    font-weight: bold;
    color: var(--text_color-color, #58595b);
}

.items-details-link {
    cursor: pointer;
}

.items-details-link .order-items-toggle {
    color: var(--dark_link-color, #3157ce);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.items-details-link .toggle-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.items-details-link .order-items-toggle:hover {
    color: var(--dark_link-color, #3157ce);
}

/* Order details column - VIEW PDF */
.view-pdf-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.pdf-icon {
    font-size: 32px;
}

.pdf-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text_color-color, #58595b);
}

.view-pdf-wrapper:hover .pdf-text {
    color: var(--dark_link-color, #3157ce);
}

/* Reorder column - REORDER button */
.reorder-button {
    background: var(--dark_link-color, #3157ce);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.reorder-button:hover {
    background: var(--dark_link-color, #3157ce);
}

.cart-icon {
    font-size: 18px;
}

.reorder-text {
    letter-spacing: 0.5px;
}

/* ============================================
   EXPANDABLE ORDER ITEMS ROW
   ============================================ */

/* Expandable order items row */
.order-items-row {
    background: #f8f9fa;
}

.order-items-cell {
    padding: 0 !important;
}

.order-items-details {
    padding: 20px;
}

/* Order line item */
.order-line-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.order-line-item:last-child {
    margin-bottom: 0;
}

/* Item product info row */
.item-product-info {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.item-id-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 100px;
}

.item-number {
    font-weight: 700;
    font-size: 16px;
    color: var(--text_color-color, #58595b);
}

.item-link a {
    color: var(--dark_link-color, #3157ce);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.item-link a:hover {
    color: var(--dark_link-color, #3157ce);
    text-decoration: underline;
}

.product-name-section {
    flex: 1;
    min-width: 200px;
}

.product-name-section h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text_color-color, #58595b);
}

.product-description {
    font-size: 14px;
    color: var(--text_color-color, #58595b);
}

.product-quantity {
    min-width: 80px;
    text-align: center;
}

.product-quantity strong {
    display: block;
    color: var(--text_color-color, #58595b);
    margin-bottom: 3px;
}

.product-quantity span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text_color-color, #58595b);
}

.product-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.item-details-grid .artwork-image img {
    width: 60px;
}

.product-total {
    min-width: 100px;
    text-align: right;
}

.product-total strong {
    display: block;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
    margin-bottom: 3px;
}

.product-total span {
    font-size: 18px;
    font-weight: 700;
    color: var(--text_color-color, #58595b);
}

.product-reorder {
    margin-left: auto;
}

.product-reorder .reorder-button {
    padding: 8px 20px;
    font-size: 14px;
    min-width: 152px;
}

/* ============================================
   ITEM DETAILS SECTION
   ============================================ */

/* Item details section */
.item-details-section {
    padding-top: 15px;
}

.item-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.item-details-left,
.item-details-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-group strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text_color-color, #58595b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-group p {
    margin: 0;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
    line-height: 1.6;
}

.product-main-image {
    width: 100%;
    max-width: 300px;
}

.product-main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.artwork-image {
    width: 100%;
    max-width: 300px;
}

.artwork-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Filtered out rows (hidden by search/date filter) */
.woocommerce-orders-table tbody tr.filtered-out {
    display: none !important;
}

/* Pagination Controls */
.orders-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.pagination-btn {
    background: var(--dark_link-color, #3157ce);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pagination-btn:hover:not([disabled]) {
    background: var(--dark_link-color, #3157ce);
}

.pagination-btn[disabled] {
    background: var(--light_background-color, #f9f8f6);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--text_color-color, #58595b);
    min-width: 120px;
    text-align: center;
}
.edit-order{
    margin-top: 10px;
}
.product-not-available{
    opacity: 0.5;
    cursor: not-allowed;
}
.product-not-available-text{
    font-size: 14px;
    font-weight: 600;
    color: var(--error_back-color, #e60000);
    text-align: center;
}

img.status-not-approve-icn {
    max-width: 16px;
    display: inline;
    vertical-align: text-bottom;
    margin-right: 3px;
}

.thankyou-sidebar img.ty-sidebar-icons {
    width: 18px;
    display: inline;
    margin-right: 6px;
}

.thankyou-sidebar p {
    margin-bottom: 5px;
    color: var(--primary-color, #2a1f4a);
    font-weight: 600;
    letter-spacing: 0px;
}

/* ============================================
   MOBILE RESPONSIVE - CARD LAYOUT
   ============================================ */

@media (max-width: 767px) {
    /* Hide table on mobile */
    .woocommerce-orders-table.account-orders-table thead {
        display: none;
    }

    .woocommerce-orders-table.account-orders-table tbody {
        display: block;
    }

    /* Convert table rows to cards */
    .woocommerce-orders-table.account-orders-table tbody tr:not(.order-items-row):not(.empty-row) {
        display: block;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    /* Hide empty rows on mobile */
    .woocommerce-orders-table.account-orders-table tbody tr.empty-row {
        display: none !important;
    }

    /* Convert table cells to block layout */
    .woocommerce-orders-table.account-orders-table tbody td,
    .woocommerce-orders-table.account-orders-table tbody th {
        display: block;
        width: 100% !important;
        text-align: left !important;
        padding: 8px 0 !important;
        border: none !important;
    }

    /* Order number - make it prominent */
    .woocommerce-orders-table__cell-order-number {
        font-size: 18px !important;
        font-weight: 700 !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        margin-bottom: 8px !important;
    }

    .woocommerce-orders-table__cell-order-number::before {
        display: block;
        margin-bottom: 5px;
        font-size: 12px;
        color: var(--text_color-color, #58595b);
    }

    /* Items count - adjust layout */
    .woocommerce-orders-table__cell-order-items {
        padding: 12px 0 !important;
    }

    .woocommerce-orders-table__cell-order-items::before {
        display: none; /* Hide label, we have custom wrapper */
    }

    .items-count-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 6px;
    }

    .items-count {
        font-size: 14px;
    }

    /* Order details - adjust layout */
    .woocommerce-orders-table__cell-order-details {
        padding: 12px 0 !important;
    }

    .woocommerce-orders-table__cell-order-details::before {
        display: none; /* Hide label */
    }

    .view-pdf-wrapper {
        flex-direction: row;
        justify-content: center;
        padding: 12px;
        background: #f0f0f0;
        border-radius: 6px;
        gap: 10px;
    }

    .pdf-icon {
        font-size: 24px;
    }

    .pdf-text {
        font-size: 14px;
    }

    /* Total amount - make it stand out */
    .woocommerce-orders-table__cell-order-total-amount {
        font-size: 20px !important;
        font-weight: 700 !important;
        color: var(--dark_link-color, #3157ce) !important;
        padding: 12px 0 !important;
    }

    /* Status - add colored badge */
    .woocommerce-orders-table__cell-order-status {
        padding: 10px 0 !important;
    }

    /* Order items expandable row - full width */
    .woocommerce-orders-table.account-orders-table tbody tr.order-items-row {
        display: block;
        margin-bottom: 15px;
        border: none;
        padding: 0;
    }

    .order-items-row .order-items-cell {
        display: block;
        padding: 0 !important;
    }

    /* Adjust item product info for mobile */
    .item-product-info {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .item-id-section {
        width: 100%;
    }

    .product-name-section {
        width: 100%;
        min-width: auto;
    }

    .product-quantity {
        width: 100%;
        text-align: left;
    }

    .product-total {
        width: 100%;
        text-align: left;
        font-size: 18px;
    }

    .product-reorder {
        width: 100%;
        margin-left: 0;
    }

    .product-reorder .reorder-button {
        width: 100%;
        justify-content: center;
    }

    .edit-order {
        margin-top: 10px;
    }

    .edit-order .reorder-button {
        width: 100%;
    }

    /* Product quantity and image combo */
    .product-qty-img-combo {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Item details grid - single column on mobile */
    .item-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Adjust controls row for mobile */
    .orders-controls-row {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .item-details-control,
    .per-page-control {
        width: 100%;
    }

    /* Pagination - stack buttons on very small screens */
    @media (max-width: 480px) {
        .orders-pagination {
            flex-direction: column;
            gap: 10px;
        }

        .pagination-btn {
            width: 100%;
        }
    }
}

/* ============================================
   VIEW ORDER PAGE (single order + accordions)
   ============================================ */

.view-order-page {
    max-width: 100%;
}

/* View-order page: My Orders button at top – dark purplish-blue, white text, rounded */
.view-order-clean .view-order-back {
    margin: 0 0 20px 0;
}

.view-order-clean .view-order-back .woocommerce-button {
    background: #382361;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
}

.view-order-clean .view-order-back .woocommerce-button:hover {
    background: #2a1a4a;
    color: #fff;
}

/* View-order page: order detail block – match orders.php table row font sizes */
.view-order-clean .view-order-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px 24px;
    margin-bottom: 24px;
    font-size: 16px;
    color: var(--text_color-color, #58595b);
}

.view-order-clean .view-order-header-item {
    white-space: nowrap;
}

/* Order number – match orders table order-number cell (18px bold) */
.view-order-clean .view-order-header-item:first-child {
    font-size: 18px;
    font-weight: 700;
}

/* Total – match orders table total cell (20px bold, blue) */
.view-order-clean .view-order-header-item.view-order-total {
    font-size: 20px;
    font-weight: 700;
    color: #00a0d2;
    margin-left: auto;
}

/* Use same font sizes as orders list (order-line-item, detail-group already in this file) */
.view-order-clean .view-order-items.order-items-details {
    padding: 0;
}

.view-order-clean .order-line-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.view-order-clean .item-details-heading {
    margin: 20px 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

@media (max-width: 768px) {
    .view-order-clean .view-order-header-item.view-order-total {
        margin-left: 0;
    }
}

/* ============================================
   VIEW ORDER — summary card (order meta + lines + invoice)
   ============================================ */

.view-order-detail-page-wrapper {
    max-width: 100%;
    margin-bottom: 20px;
}

.view-order-detail-page-header {
    margin-bottom: 24px;
}

.view-order-detail-page-breadcrumb p {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color, #2a1f4a);
}

.view-order-detail-page-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
}

.view-order-detail-page-summary-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px 32px;
    padding: 28px 32px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    margin-bottom: 28px;
    color: var(--primary-color, #2a1f4a);
    font-family: inherit;
}

.view-order-summary-col--meta {
    flex: 1 1 200px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.view-order-summary-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
    font-size: 15px;
    line-height: 1.45;
}

.view-order-summary-label {
    font-weight: bold;
    color: var(--primary-color, #2a1f4a);
    font-size: 14px;
}

.view-order-summary-value {
    font-weight: 400;
    color: var(--primary-color, #2a1f4a);
    font-size: 14px;
}

.view-order-summary-col--lines {
    flex: 1 1 280px;
    min-width: 260px;
    max-width: 420px;
}

.view-order-summary-heading {
    margin: 0 0 14px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
}

.view-order-summary-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.view-order-summary-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: baseline;
    font-size: 14px;
    color: var(--primary-color, #2a1f4a);
}

.view-order-summary-line-name {
    font-weight: 400;
    text-align: left;
}

.view-order-summary-line-price {
    font-weight: 400;
    text-align: right;
    white-space: nowrap;
    color: var(--primary-color, #2a1f4a);
}

.view-order-summary-line-price .woocommerce-Price-amount {
    font-weight: 400;
    color: var(--primary-color, #2a1f4a);
}

.view-order-summary-line--muted .view-order-summary-line-name,
.view-order-summary-line--muted .view-order-summary-line-price {
    font-weight: 400;
}

.view-order-summary-total-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: baseline;
    margin-top: 4px;
    font-size: 16px;
    font-weight: 400;
    color: var(--primary-color, #2a1f4a);
}

.view-order-summary-total-label,
.view-order-summary-total-value {
    font-weight: 400;
}

.view-order-summary-total-value .woocommerce-Price-amount {
    font-weight: 400;
    color: var(--primary-color, #2a1f4a);
}

.view-order-summary-col--action {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.view-order-summary-invoice-btn {
    display: inline-block;
   /*padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
    background: transparent;
    border: 2px solid var(--primary-color, #2a1f4a);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    line-height: 1.3;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap; */
}
/*
.view-order-summary-invoice-btn:hover,
.view-order-summary-invoice-btn:focus {
    background: var(--primary-color, #2a1f4a);
    color: #ffffff;
    text-decoration: none;
} */

@media (max-width: 900px) {
    .view-order-detail-page-summary-card {
        flex-direction: column;
        align-items: stretch;
    }

    .view-order-summary-col--lines {
        max-width: none;
    }

    .view-order-summary-col--action {
        margin-left: 0;
        justify-content: flex-start;
    }

    .view-order-summary-invoice-btn {
        width: 100%;
        white-space: normal;
    }
}

/* ============================================
   VIEW ORDER — status tracker + item detail cards
   ============================================ */

.view-order-notes-title {
    margin: 24px 0 12px;
    font-size: 18px;
    color: var(--primary-color, #2a1f4a);
}

.view-order-items-area {
    margin-top: 32px;
    padding: 28px 24px 40px;
    border-radius: 8px;
}

.view-order-item-section {
    margin-bottom: 40px;
}

.view-order-item-section .view-order-item-grid,
.view-order-item-section .version_detail_actions{
    max-width: 800px;
    display: flow-root;
}

.view-order-item-section .version_detail_actions{
    padding-top: 10px;
}

.view-order-item-section:last-child {
    margin-bottom: 0;
}

.view-order-item-section__title {
    margin: 0 0 20px;
    font-size: 26px !important;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
}

/* Horizontal stepper — ref. design: thick pink line, bullseye nodes, hollow gray upcoming */
.sprink-order-tracker {
    margin-bottom: 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.sprink-order-tracker__rail {
    display: flex;
    align-items: flex-start;
    min-width: min(100%, 1280px);
}

.sprink-order-tracker__step {
    /* flex: 1 1 0; */
    min-width: 52px;
    max-width: 118px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sprink-order-tracker__dot-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 22px;
}

/* Node ≈4–5× connector thickness; line ≈4px */
.sprink-order-tracker__dot {
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 2px solid var(--light_border-color, #e5e6e7);
    background: var(--white-color, #ffffff);
}

/* Active / completed: bullseye — pink center, white ring, pink outer ring */
.sprink-order-tracker__dot.is-done,
.sprink-order-tracker__dot.is-current {
    border: none;
}

.sprink-order-tracker__dot.is-upcoming {
    border: 2px solid #c8c8ce;
    background: #ffffff;
}

.sprink-order-tracker__connector {
    flex: 1 1 8px;
    min-width: 4px;
    height: 4px;
    margin-top: 9px;
    background: #d8d8dc;
    border-radius: 2px;
    align-self: flex-start;
}

.sprink-order-tracker__connector.is-active {
    background: var(--secondary-color, #91206c);
}

.sprink-order-tracker__connector.is-active-half {
    background: linear-gradient(to right, var(--secondary-color, #91206c) 50%, #d8d8dc 50%);
}

.sprink-order-tracker__label {
    margin: 12px 0 0;
    padding: 0 4px;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text_color-color, #58595b);
    text-wrap: balance;
}

@media (min-width: 1100px) {
    .sprink-order-tracker__label {
        font-size: 11px;
    }

    .sprink-order-tracker__rail {
        min-width: min(100%, 1380px);
    }
}

/* Two-column item layout (~1/3 + ~2/3) */

.view-order-item-details-heading {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
}

.view-order-item-meta-block {
    margin-bottom: 18px;
    font-size: 15px;
    color: var(--primary-color, #2a1f4a);
}

.view-order-item-meta-line {
    margin: 0 0 8px;
    line-height: 1.45;
}

.view-order-item-meta-label {
    font-weight: 700;
    margin-right: 6px;
    color: var(--text_color-color, #58595b);
}

.view-order-item-meta-value {
    color: var(--text_color-color, #58595b);
}


.view-order-item-meta-value--status.product_detail_status {
    font-weight: 500;
    color: var(--text_color-color, #58595b);
}

.view-order-item-meta-value--status.product_detail_status.waiting-on-artwork,
.view-order-item-meta-value--status.product_detail_status.pending-production-sample-approval {
    font-weight: 600;
    color: var(--error_back-color, #e60000);
}

.view-order-item-meta-value--status.product_detail_status.delivered, 
.view-order-item-meta-value--status.product_detail_status.shipped {
    font-weight: 600;
    color: var(--success_back-color, #0F6F6A);
}

.view-order-item-address-card {
    background: var(--white-color, #ffffff);
    border: 1px solid var(--light_border-color, #e5e6e7);
    border-radius: 8px;
    padding: 16px 18px;
}

.view-order-item-address-card__title {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
}

.view-order-item-address-card__body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text_color-color, #58595b);
}

.view-order-product-card {
    background: var(--white-color, #ffffff);
    border: 1px solid var(--light_border-color, #e5e6e7);
    border-radius: 8px;
    padding: 20px 22px;
}

.view-order-product-card__title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
}

.view-order-product-card__body {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 24px;
    align-items: flex-start;
    justify-content: flex-start;
}

.view-order-product-card__media {
    flex: 0 0 160px;
    max-width: 100px;
}

.view-order-product-card__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--light_background-color, #f9f8f6);
}

.view-order-product-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    padding: 16px;
    background: var(--dark_link-color, #3157ce);
    color: var(--white-color, #ffffff);
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    border-radius: 4px;
}

.view-order-product-card__summary {
    flex: 1 1 220px;
    min-width: 200px;
}

.view-order-product-card__hardcoded-samples {
    width: auto;
    margin-left: 120px;
}

.view-order-hardcoded-samples__divider {
    height: 1px;
    background: #d9d9df;
    margin: 10px 0 12px;
}

.view-order-hardcoded-samples__title {
    margin: 0 0 12px;
    line-height: 1.1;
    font-weight: 700;
    color: #221c46;
    letter-spacing: -0.02em;
}

.view-order-hardcoded-samples__row {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
}

.view-order-hardcoded-samples__meta {
    flex: 1 1 auto;
    min-width: 280px;
}

.view-order-hardcoded-samples__line {
    margin: 0 0 6px;
    line-height: 1.2;
    color: var(--primary-color, #2a1f4a);
    font-weight: 400;
}

.view-order-hardcoded-samples__line:last-child {
    margin-bottom: 0;
}

.view-order-hardcoded-samples__label {
    font-weight: bold;
    font-size: 14px;
}

.view-order-hardcoded-samples__label--spaced {
    margin-left: 28px;
}

.view-order-hardcoded-samples__value {
    font-weight: 400;
    font-size: 14px;
}

.view-order-hardcoded-samples__value--pending {
    color: var(--error_back-color, #e60000);
    font-weight: 700;
}

.view-order-hardcoded-samples__value--success {
    color: var(--success_back-color, #0F6F6A);
    font-weight: 700;
}

.view-order-hardcoded-samples__tracking-link {
    color: #3e57cf;
    text-decoration: underline;
    font-weight: 600;
}

.view-order-hardcoded-samples__tracking-link:hover,
.view-order-hardcoded-samples__tracking-link:focus {
    color: #3043a0;
}

.view-order-hardcoded-samples__action-wrap {
    flex: 0 0 auto;
}

.view-order-hardcoded-samples__action-btn {
    border: 0;
    border-radius: 14px;
    background: #221c46;
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    font-weight: 700;
    padding: 22px 36px;
    min-width: 330px;
    cursor: pointer;
}

.view-order-hardcoded-samples__action-btn:hover,
.view-order-hardcoded-samples__action-btn:focus {
    background: #1a1538;
}

.view-order-hardcoded-samples__alert {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--error_back-color, #e60000);
    line-height: 1.2;
    font-weight: 600;
}

.view-order-hardcoded-samples__select-all {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.view-order-hardcoded-samples__select-all input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.view-order-hardcoded-samples__select-box {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #221c46;
    position: relative;
    flex-shrink: 0;
}

.view-order-hardcoded-samples__select-box::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 4px;
    width: 7px;
    height: 13px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.view-order-hardcoded-samples__select-text {
    color: #3b355d;
    line-height: 1.2;
    font-weight: 500;
}

@media (max-width: 1200px) {
    .view-order-hardcoded-samples__title {
        font-size: 30px;
    }

    .view-order-hardcoded-samples__line,
    .view-order-hardcoded-samples__select-text {
        font-size: 24px;
    }

    .view-order-hardcoded-samples__action-btn {
        font-size: 28px;
        min-width: 250px;
        padding: 16px 24px;
    }

    .view-order-hardcoded-samples__alert {
        font-size: 30px;
    }
}

@media (max-width: 991px) {
    .view-order-hardcoded-samples__row {
        flex-direction: column;
    }

    .view-order-hardcoded-samples__meta {
        min-width: 0;
    }
}

/* Shipping box on the right of image + summary (Figma item row) */
.view-order-product-card__shipping {
    flex: 0 0 auto;
    width: 100%;
    max-width: 280px;
    min-width: 200px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.view-order-item-address-card--inline {
    margin: 0;
    height: 100%;
}

.view-order-product-summary-heading {
    margin: 0 0 0px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
}

.view-order-product-summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.view-order-product-summary-row {
    display: grid;
    grid-template-columns: minmax(100px, 38%) 1fr;
    gap: 10px 16px;
    align-items: baseline;
    font-size: 14px;
    line-height: 1.45;
    color: var(--primary-color, #2a1f4a);
}

.view-order-product-summary-term {
    font-weight: 700;
}

.view-order-product-summary-desc {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 16px;
    font-weight: 400;
}

.view-order-product-summary-desc.is-highlight .view-order-product-summary-value {
    font-weight: 700;
    color: #1a9b8a;
}

.view-order-product-summary-extra {
    font-weight: 700;
    white-space: nowrap;
}

.view-order-product-summary-empty {
    margin: 0;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
}

/* Design versions table (view order item card) */
.version_details_section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--light_border-color, #e5e6e7);
    margin-left: 120px;
}

.version-details__title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color, #2a1f4a);
}

.version-details__toolbar {
    margin-bottom: 14px;
}

.version-details__select-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color, #2a1f4a);
    user-select: none;
}

.version-details__checkbox {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.version-details__row-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
}

.version-details__checkbox-face {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--primary-color, #2a1f4a);
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s ease;
}

.version-details__checkbox:checked + .version-details__checkbox-face::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid var(--white-color, #ffffff);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.version-details__checkbox:not(:checked) + .version-details__checkbox-face {
    background: var(--white-color, #ffffff);
    border: 2px solid var(--primary-color, #2a1f4a);
}

.version-details__checkbox:not(:checked) + .version-details__checkbox-face::after {
    display: none;
}

.version-details__table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.version_detail_actions .btn-primary{
    width: auto;
    float: right;
    text-align: center;
}
.version-details__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--primary-color, #2a1f4a);
}

.version-details__th {
    text-align: left;
    font-weight: 700;
    padding: 10px 14px 12px 0;
    border-bottom: 1px solid var(--light_border-color, #e5e6e7);
    white-space: nowrap;
    text-transform: capitalize;
    font-size: 14px;
}

.version-details__th--select {
    width: 1%;
    padding-right: 8px;
}

.version-details__th--preview {
    text-align: center;
}

.version-details__td {
    padding: 16px 14px 16px 0;
    vertical-align: middle;
    border-bottom: 1px solid var(--light_border-color, #e5e6e7);
}

.version-details__td--select {
    width: 1%;
    padding-right: 8px;
}

.version-details__td--preview {
    text-align: center;
}

.version-details__preview-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.version-details__preview-download {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    margin: 0;
    color: var(--text_color-color, #58595b);
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.version-details__preview-download:hover,
.version-details__preview-download:focus-visible {
    color: var(--dark_link-color, #3157ce);
    background-color: var(--light_background-color, #f9f8f6);
    outline: none;
}

.version-details__preview-download-icon {
    display: block;
}

.version-details__preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    max-width: 160px;
    min-height: 72px;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
    color: var(--white-color, #ffffff);
    word-break: break-word;
}

.version-details__preview--img {
    padding: 0;
    min-height: 0;
    background: var(--light_background-color, #f9f8f6);
}

.version-details__preview-img {
    display: block;
    width: 120px;
    height: auto;
    max-height: 88px;
    object-fit: contain;
    border-radius: 6px;
}

.version-details__preview--tone-0 {
    background: #6eb3e8;
}

.version-details__preview--tone-1 {
    background: #1e4a8a;
}

.version-details__preview--tone-2 {
    background: #d946a8;
}

.version-details__preview--tone-3 {
    background: #f0a020;
}

.version-details__preview--tone-4 {
    background: #2a9d6a;
}

@media (max-width: 782px) {
    .view-order-item-grid {
        grid-template-columns: 1fr;
    }

    .view-order-product-card__media {
        flex: 1 1 100%;
        max-width: none;
    }

    .view-order-product-card__shipping {
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
    }

    .view-order-product-summary-row {
        grid-template-columns: 1fr;
    }

    .view-order-product-summary-desc {
        justify-content: flex-start;
    }
}
.order_item_total_section_row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color, #2a1f4a);
}

.order_item_total_section_row.order_item_total_section_row--discount .order_item_total_section_value,
.order_item_total_section_row.order_item_total_section_row--discount .order_item_total_section_value .amount{
color: var(--success_back-color, #0F6F6A);
}

.order_item_total_section_row .amount{
        font-weight: bold;
    color: var(--primary-color, #2a1f4a);
}

.order_item_total_section{
    line-height: 12px;
    margin: 0px auto;
    margin-left: 120px;
}
.sprink-order-tracker {
    width: 100%;
    padding: 30px 20px;
    overflow-x: auto;
}

/* RAIL */
.sprink-order-tracker__rail {
    display: flex;
    min-width: 900px;
    padding-left: 10px;
}

/* STEP */
.sprink-order-tracker__step {
    text-align: center;
    position: relative;
    width: 100px;
    flex-shrink: 0;
}

/* DOT WRAP */
.sprink-order-tracker__dot-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* OUTER CIRCLE */
.sprink-order-tracker__dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid var(--light_border-color, #e5e6e7);
    background: var(--white-color, #ffffff);
    position: relative;
}

/* INNER DOT */
.sprink-order-tracker__dot::after {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* DONE */
.sprink-order-tracker__dot.is-done {
    border: 2px solid var(--secondary-color, #91206c);
}

.sprink-order-tracker__dot.is-done::after {
    background: var(--secondary-color, #91206c);
    border: 2px solid var(--white-color, #ffffff);
}

/* CURRENT */
.sprink-order-tracker__dot.is-current {
    border-color: var(--secondary-color, #91206c);
    border: 2px solid var(--secondary-color, #91206c);
}

.sprink-order-tracker__dot.is-current::after {
    background: var(--secondary-color, #91206c);
    border: 2px solid var(--white-color, #ffffff);
}

/* UPCOMING */
.sprink-order-tracker__dot.is-upcoming {
    border-color: var(--light_border-color, #e5e6e7);
}

/* CONNECTOR */
.sprink-order-tracker__connector {
    flex: 1;
    height: 4px;
    background: var(--light_background-color, #f9f8f6);
}

/* ACTIVE CONNECTOR */
.sprink-order-tracker__connector.is-active {
    background: var(--secondary-color, #91206c);
}

.sprink-order-tracker__connector.is-active-half {
    background: linear-gradient(
        to right,
        var(--secondary-color, #91206c) 50%,
        var(--light_background-color, #f9f8f6) 50%
    );
}

.sprink-order-tracker__connector.is-active-white {
    background: var(--white-color, #ffffff);
}

/* LABEL */
.sprink-order-tracker__label {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text_color-color, #58595b);
    line-height: 1.4;
    margin-left: -80px;
    font-weight: 400;
}

/* MOBILE */
@media (max-width: 768px) {
    .sprink-order-tracker__rail {
        min-width: 800px;
    }
}