// SCSS Variables for colors and sizes
// Note: Assuming these CSS variables are defined elsewhere in your project
// If not, you should replace them with fixed values (e.g., #ffffff, 16px)
$border-gray-1: var(--border-gray-1);
$border-radius-small: var(--border-radius-small);
$primary-color: var(--primary-color);
$text-color: var(--text-color);
$text-dark: var(--text-dark);
$text-gray: var(--text-gray);
$font-size-extra-small: var(--font-size-extra-small);
$font-size-small: var(--font-size-small);
$font-size-medium: var(--font-size-medium);
$font-size-xlarge: var(--font-size-xlarge);
$font-size-xxlarge: var(--font-size-xxlarge);

.page-title{
    font-size: $font-size-xlarge;
    font-weight: 600;
    color:$text-dark;
    margin-top: 0px;
    margin-bottom: 0px;
}

.table_style {
    padding-bottom: 0px;

    &.padding_bottom_table {
        padding-bottom: 30px;
    }

    .table-striped > tbody > tr:nth-of-type(odd) {
        background-color: #fff !important;
    }

    table.dataTable {
        border: 1px solid $border-gray-1;
        border-radius: $border-radius-small;
        margin-bottom: 30px;
        width: 100% !important;

        &.no-footer {
            // border-bottom: 1px solid transparent;
        }

        thead {
            th,
            td {
                border-bottom: 1px solid $border-gray-1;
            }
        }
    }

    .table {
        > tbody > tr,
        > tfoot > tr,
        > thead > tr {
            > th {
                // border-top: 1px solid transparent;
                font-weight: 500;
                font-size: $font-size-small;
                padding: 10px 15px;
            }

            > td {
                border-top: 1px solid $border-gray-1;
                vertical-align: middle;
                color: $text-gray;
                font-size: $font-size-medium;
                padding: 10px 15px;
                box-shadow: none;
            }
        }
    }

    a {
        color: $primary-color;
    }

    .responsive-row {
        margin-bottom: 15px;
        background-color: #fff;
        border-radius: 0px;
        padding: 15px 0px;
        border-bottom: 1px solid $border-gray-1;

        &:last-child {
            border-bottom: 0px;
            margin-bottom: 0px;
        }
    }

    .responsive-cell {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    div.dataTables_paginate.paging_simple_numbers {
        display: flex;
        justify-content: flex-end;
        float: none;
    }

    a.myTableButton,
    .myTableButton {
        border-radius: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        min-width: 40px;
        min-height: 40px;
        background: transparent;
        background-color: transparent;
        color: $text-dark;

        &.disbale_button {
            pointer-events: none;
            opacity: 0.07;
        }

        &:hover {
            background-color: #dad8da;
        }
    }

    a.myTableButton.disbale_button {
        // Redundant, handled above but keeping for clarity
    }

    .btn_return_click.myTableButton {
        border: 0px;
        margin-top: 20px;

        &:hover {
            background-color: #dad8da;
            text-decoration: none;
            background-image: none;
            color: #515151;
        }
    }
}

.cell-label {
    font-size: $font-size-extra-small;
    color: $text-dark;
    margin-bottom: 5px;
}

.cell-value {
    font-size: $font-size-small;
    color: $text-gray;
    font-weight: 500;
}

// Search container styles
.search-container_my {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;

    .search-input-wrapper {
        position: relative;
        flex: 1;
        min-width: 250px;
    }

    .search-input {
        width: 100%;
        padding: 10px 15px 10px 35px;
        border: 1px solid $border-gray-1;
        border-radius: 6px;
        font-size: $font-size-small;
        line-height: 1.5;
        background-color: #fff;
        transition: border-color 0.15s ease-in-out;

        &:focus {
            outline: none;
            border-color: #cbd5e0;
            box-shadow: 0 0 0 1px rgba(66, 153, 225, 0.5);
        }

        &::placeholder {
            color: $text-gray;
        }
    }

    .search-icon,
    .date-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: $text-gray;
    }

    .search-icon {
        display: flex;
    }

    .date-icon {
        display: inline-flex;
    }
}

.dataTables_length {
    display: none;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: $primary-color;
}

@media (max-width: 767px) {
    .search-container_my {
        flex-direction: column;
        gap: 10px;

        .search-input-wrapper {
            width: 100%;
        }
    }

    .table_style div.dataTables_paginate.paging_simple_numbers {
        justify-content: center !important;
    }
   .table_style .responsive-row{
        padding-left: 7px;
        padding-right: 7px;
    }
}

// Return details UI styles
.return_details_ui {
    .order-details-body {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-right: 15px;

        .order-item {
            &:not(:last-child) {
                padding-bottom: 20px;
                border-bottom: 1px solid $border-gray-1;
            }
        }
    }

    .order-item {
        display: flex;
        flex-direction: column;
        gap: 15px;

        .product-thumbnail-img {
            border: 1px solid $border-gray-1;
            border-radius: $border-radius-small;
            overflow: hidden;
            display: flex;
            align-items: center;

            img {
                width: 100%;
                height: auto;
            }
        }
    }

    .product-thumbnail {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }

    .product_item_des_tr {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .product_item_des_td {
        display: flex;
        flex: 1;
        flex-direction: row;
        gap: 10px;
        justify-content: space-between;

        .product-label {
            font-size: $font-size-small;
            font-weight: 600;
        }

        .product-price,
        .product-quantity,
        .product-Subtotal,
        .product-GST,
        .product-Total,
        .product-subtotal {
            font-size: $font-size-medium;
            font-weight: 600;
        }
    }

    .title-box {
        .product-code {
            font-size: $font-size-extra-small;
            font-weight: 500;
            margin-bottom: 10px;
            color: $text-gray;
            .product_href_ui {
                color: inherit;
                text-decoration: none;
                &:hover {
                    color: $primary-color;
                }
            }
        }

        .product-code-title {
            font-size: $font-size-small;
            color: $text-dark;
            font-weight: 600;
            margin-bottom: 10px;
            .product_href_ui {
                color: inherit;
                text-decoration: none;
                &:hover {
                    color: $primary-color;
                }
            }
        }
    }

    .product_item_des_td {
        .product-subtotal,
        .product-price,
        .product-Total {
            color: $primary-color;
        }
    }

    .order-details-wrapper {
        border-right: 1px solid $border-gray-1;
        max-height: calc(100vh - 250px);
        overflow-y: auto;
    }
}

.order-item {
    .product_item_des_td {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 10px;
    }
    .product_item_des_tr {
        flex-direction: row;
    }
}

.product_right_side_box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    .address-box{
        font-size: 14px;
        color: #666;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

// Modal styling
.modal-backdrop {
    background: #161616 !important;
    &.in {
        opacity: 0.2 !important;
    }
}

.Forgot_modal_design_UI,
.Order_Case_Modal_UI,
.Order_modal_design_UI,
.Request_Assistance_Modal_UI {
    .modal-content {
        border-radius: 16px;
        box-shadow: none;
        border: 0px;
        margin: auto;
        width: 100%;
    }

    .modal-header {
        border-bottom: 0px;
        padding: 30px;
    }

    .modal-title {
        font-size: $font-size-xlarge;
        font-weight: 600;
        color: $text-dark;
    }

    .my_close_button {
        display: inline-flex;
        width: 35px;
        height: 35px;
        justify-content: center;
        align-items: center;
        color: $text-dark;
        border: 1px solid transparent;
        border-radius: 100%;
        opacity: 1;
        position: absolute;
        right: 20px;
        top: 20px;
        background: transparent;
        padding: 0;
    }
}

.Forgot_modal_design_UI,
.Order_Case_Modal_UI,
.Request_Assistance_Modal_UI {
    .modal-body {
        padding: 0px 30px 30px;
    }
}

.Order_modal_design_UI {
    .return_details_ui {
        padding: 30px;
        padding-top: 0px;
    }
}

.Request_Assistance_Modal_UI {
    .modal-footer {
        padding: 15px;
        display: flex;
        gap: 15px;
    }
}

// Vertical centering for modals
.Forgot_modal_design_UI,
.Order_Case_Modal_UI,
.Order_modal_design_UI,
.Request_Assistance_Modal_UI {
    .modal-dialog {
        display: flex;
        align-items: center;
        min-height: calc(100% - 60px);
    }
}

.Order_Case_Modal_UI {
    .info-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0;
        justify-content: center;
        list-style: none;
    }
}

// App download section
.app-download-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;

    .app-download-card {
        background: white;
        border-radius: 12px;
        padding: 24px;
        box-shadow: none;
        flex: 1;
        min-width: 300px;
        border: 1px solid $border-gray-1;

        &__title {
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 20px;
            color: #333;
        }

        .app-btn-download {
            background: $primary-color;
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 6px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;

            &.focus,
            &:focus,
            &:hover {
                background: #0056b3;
                color: white !important;
            }
        }
    }
}

.app-download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;

    &:last-child {
        border-bottom: none;
    }

    &:hover {
        text-decoration: none;
        color: $primary-color;
    }
}

.app-download-icon {
    color: $primary-color;
}

.app-form-control {
    height: 44px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    margin-bottom: 15px;

    &:focus {
        border-color: $primary-color;
        box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25);
    }
}

.app-download-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.app-download-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #333;
    font-weight: 500;
    text-align: left;
    transition: all 0.3s ease;

    &:hover {
        background-color: #f8f9fa;
        border-color: $primary-color;
        color: $primary-color;
    }
}

.app-download-section .bootstrap-select {
    .btn {
        height: 44px;
        border-radius: 8px;
        border: 1px solid #e2e8f0;
        background: white;
        padding: 8px 12px;

        &:focus {
            outline: none !important;
        }
    }
}

.custom-select-my {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: white;
    color: #666;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;

    &:focus {
        outline: none;
        border-color: $primary-color;
    }
}

.select-wrapper {
    margin-bottom: 16px;
}

// Custom styling for multiselect
.custom-multiple-select-my {
    .btn-group {
        width: 100%;

        .multiselect {
            display: flex;
            width: 100%;
            padding: 12px 16px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            background-color: white;
            color: #666;
            background-image: none;
            align-items: center;
            justify-content: space-between;
        }
    }

    .btn-default.active,
    .btn-default:active,
    .open > .dropdown-toggle.btn-default {
        background-image: none !important;
        background-color: white !important;
        box-shadow: none !important;
        border-color: $primary-color !important;
    }

    .input-group-btn .btn {
        display: flex;
        align-items: center;
        height: 34px;
    }

    .dropdown-menu > .active > a,
    .dropdown-menu > .active > a:focus,
    .dropdown-menu > .active > a:hover {
        background-image: none !important;
        background-color: white !important;
        box-shadow: none !important;
        background: $primary-color !important;
    }
}

.text-error {
    color: red;
    font-size: $font-size-small;
}

// Quantity button box
.quantity_btn_box {
    display: flex;
    gap: 0px;
    align-items: center;
    border: 1px solid $border-gray-1;
    border-radius: $border-radius-small;
    justify-content: space-between;

    span {
        background: transparent;
        border: none;
        padding: 0px;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 30px;
        height: 30px;
    }

    input {
        border: none;
        text-align: center;
        width: 50px;
    }

    svg {
        width: 16px;
        height: 16px;
    }
}

// Product items list
.product_items_list {
    .product-thumbnail {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }

    .product-thumbnail-wrapper {
        border-radius: $border-radius-small;
        overflow: hidden;

        img {
            width: 100% !important;
        }
    }

    .title-box {
        .product-code {
            font-size: $font-size-extra-small;
            font-weight: 500;
            margin-bottom: 0px;
            color: $text-gray;
        }
        .product-code-title {
            font-size: $font-size-small;
            color: $text-dark;
            font-weight: 600;
        }
    }
}

.fixed_after_issue_and_position {
    display: grid;
    grid-template-columns: 1fr 1fr;

    &::before,
    &::after {
        display: none;
    }
}

.text_error {
    color: red;
    font-size: $font-size-small;
}

.my_heading_border_new {
    margin: 0px;
    padding: 0px;
    position: relative;
    margin-bottom: 20px;

    &::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 1px;
        background: var(--ast-border-color);
    }

    span {
        background: white;
        padding-right: 10px;
        font-size: $font-size-xlarge;
        z-index: 1;
        position: relative;
    }
}

abbr.required {
    text-decoration: none;
    border: none;
    color: red;
}

// WooCommerce cart styles
.woocommerce,
.my_cart_collaterals {
    a.button.alt,
    a.checkout-button,
    .btn {
        background-color: $primary-color;
        background-image: $primary-color;
        color: $text-color;
        margin: 0px;
        min-height: 40px;
        min-width: 140px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid $primary-color;
        padding: 0px 20px;
        font-weight: 500;
        font-size: $font-size-medium;
        box-shadow: none !important;

        &.outline_btn {
            background-color: transparent;
            background-image: transparent;
            color: $primary-color;
        }

        &.outline_btn:focus {
            outline: none;
        }
    }
}

.my_cart_collaterals {
    .cart-subtotal {
        margin-bottom: 20px;
    }
}

// Thank you page styles
.thank-you-container {
    max-width: 600px;
    margin: 50px auto;
    text-align: center;

    .lead {
        font-size: $font-size-xlarge;
        font-weight: 500;
        margin-bottom: 20px;
    }

    .contact-info_thank_ {
        margin-top: 30px;
        display: flex;
        flex-direction: column;
        text-align: center;
        justify-content: center;
        gap: 10px;
        align-items: center;

        a {
            margin: 10px 0;
            color: $primary-color;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: $font-size-medium;
            margin: auto;

            &:hover {
                text-decoration: underline;
            }

            span {
                display: inline-flex;
                align-items: center;
            }
        }
    }

    .panel {
        border: 0px;
        box-shadow: none;

        &-body {
            padding: 0px;
        }
    }
}

.card_empty_box {
    text-align: center;
    img {
        max-width: max-content;
        margin-bottom: 30px;
    }

    .cart-empty {
        font-size: $font-size-xxlarge;
        margin-bottom: 30px;
    }

    .btn {
        background-color: $primary-color;
        color: $text-color;
        border: none;
        margin: 0px;
        font-size: $font-size-medium;
        min-height: 40px;
        min-width: 165px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.remove-product-row {
    background-color: transparent;
    background: transparent;
    border: none;
}

.quick-order-container {
    margin-bottom: 30px;
}

.quick_order_product {
    display: grid;
    grid-template-columns: 1fr 45px;
}

.quick-order-product-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.content_flex_01 {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.remove_from_wishlist {
    background: transparent;
    border: none;
    cursor: pointer;
}

.woocommerce nav.woocommerce-pagination {
    ul {
        li {
            a,
            span {
                color: $text-dark;

                &:focus,
                &:hover,
                &.current {
                    background-color: $primary-color;
                    border-color: $primary-color;
                    color: white;
                }
            }
        }
    }
}

.cart-totals-row {
    display: flex;
    margin-bottom: 15px;
    justify-content: space-between;
}

.cart-totals-cell {
    font-size: $font-size-medium;

    &:first-child {
        font-weight: 700;
    }

    &:nth-child(2) {
        font-weight: 800;
        color: $text-dark;
        strong {
            font-weight: 800;
        }
    }
}

.size_220 {
    max-width: 220px;
}

.size_220_min {
    min-width: 220px;
}

.size_90 {
    max-width: 90px;
    min-width: 90px;
}

#my_account_quotes + .dataTables_paginate {
    margin-bottom: 30px;
}

.cart-collaterals{
    .cart_totals {
        padding-left: 0;
        padding-right: 0;
        border-color: transparent;
        h2{
            display: none;
        }
        .shop_table{
            tr{
                border-color: transparent;
                th{
                    padding-left: 0;
                    padding-right: 0;
                    border-color: transparent;
                }
                td{
                    padding-left: 0;
                    padding-right: 0;
                    border-color: transparent;
                    &:last-child{
                        text-align: right;
                    }
                }
            }
        }
    }
}

#card_table_dataTable{
    .product-remove{
        a{
            border: 0px;
            color: black;
           
        }
        a.remove:before{
                border: 0px !important;

        }
    }
}


@media screen and (max-width: 1199px) {
    .table_style {
        .table > tbody > tr > th,
        .table > tfoot > tr > th,
        .table > thead > tr > th {
            font-size: $font-size-extra-small;
        }
        .table > tbody > tr > td,
        .table > tfoot > tr > td,
        .table > thead > tr > td {
            font-size: $font-size-small;
        }
    }

    .custom-select-my {
        font-size: $font-size-extra-small;
        padding: 7px 35px 7px 15px;
    }

    .product_items_list {
        .product-thumbnail {
            grid-template-columns: 40px 1fr;
            gap: 8px;
        }
        .title-box {
            .product-code-title {
                font-size: $font-size-extra-small;
            }
        }
    }

    .fixed_after_issue_and_position {
        grid-template-columns: 1fr;
    }

    .search-container_my {
        gap: 7px;
        .search-input {
            font-size: $font-size-extra-small;
            padding: 7px 15px 7px 35px;
        }
        .search-icon {
            left: 10px;
            display: inline-flex;
        }
    }

    .my_heading_border_new span {
        font-size: $font-size-medium;
    }

    .my_cart_collaterals {
        margin-top: 50px;
    }

    .return_details_ui .order-details-wrapper {
        border-right: 0px;
    }
    .order-details-wrapper {
        margin-bottom: 30px;
    }

    .Forgot_modal_design_UI,
    .Order_Case_Modal_UI,
    .Order_modal_design_UI,
    .Request_Assistance_Modal_UI {
        .modal-header {
            padding: 15px;
        }
        .my_close_button {
            right: 5px;
            top: 5px;
        }
        .modal-title {
            font-size: $font-size-medium;
        }
    }

    .Order_modal_design_UI .return_details_ui {
        padding: 15px;
        padding-top: 0px;
    }

    .heading_user_det {
        font-size: $font-size-small;
        font-weight: 600;
    }

    .cell-label {
        font-weight: 600;
        margin-bottom: 10px;
    }

    // .responsive-row.row-my.gap-rows-3 {
    //     row-gap: 24px;
    // }

    .app-download-section {
        .app-download-card {
            padding: 0;
            border: 0;
            .app-download-card__title {
                margin: 0;
                font-size: $font-size-medium;
                font-weight: 600;
                margin-bottom: 10px;
            }
            .app-download-button {
                border-color: transparent;
                margin: 0px -15px;
            }
        }
        .app-download-form {
            gap: 0;
        }
    }
}

@media screen and (max-width: 1199px) and (orientation: landscape) {
    .return_details_ui .order-details-wrapper {
        max-height: calc(100vh - 57px);
    }
}