/* AW Button style */
body div .aw-button {
    background-color: rgb(161, 111, 7);
    color: rgb(255, 255, 255);
    border: 0px none rgb(255, 255, 255);
    padding: 8px 14px;
    margin: 0px 10px 0px 10px;
    font-family: Raleway;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none solid rgb(255, 255, 255);
    cursor: pointer;
    display: inline-flex;
    position: relative;
    width: auto;
    height: 40px;
    border-radius: 50px;
    box-shadow: none;
    transition: 0.2s ease-in-out;
    overflow: hidden;
    opacity: 1;
    z-index: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    line-height: 16px;
}

/* AW Button before icon */
body div .aw-plus-button::before {
    content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" style="fill:%23ffffff;"><path d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"/></svg>');
    background-color: transparent;
    color: rgb(255, 255, 255);
    position: initial;
    height: 16px;
    width: 16px;
    opacity: 1;
    display: inline-block;
    margin: 0 8px 2px 0;
}

/* AW Button after hover effect */
body div .aw-button::after {
    content: '';
    background-color: rgb(255, 255, 255);
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    transition: 0.2s ease-in-out;
    opacity: 0;
}

/* AW Button after hover effect */
body div .aw-button:hover::after {
    opacity: 0.1;
}

/* Overlay styling */
.aw-listing-pop-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}

.aw-row-products-listing {
    z-index: 99999;
}

/* Modal container styling */
.aw-listing-pop-up-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #000000;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90vw;
    max-width: 950px;
    height: 70vh;
    max-height: 90vh;
    z-index: 9999;
    overflow: hidden;
}

/* H2 style */
.aw-listing-pop-up-modal h2 {
    font-size: 24px;
    line-height: 1em;
    margin: 0;
    padding: 0 0 20px 0;
    text-align: left;
    color: #000000;
}

/* Modal content styling */
.aw-listing-pop-up-content {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 20px;
    text-align: left;
}

/* Close button styling */
.aw-listing-pop-up-close {
    position: absolute;
    top: 5px;
    right: 20px;
    background: none;
    border: none;
    font-size: 40px;
    line-height: 1em;
    color: #000000;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
    margin: 0;
}

.aw-listing-pop-up-close:hover {
    color: #ce0c0c;
}

/* Product overview container */
.aw-add-products-overview {
    display: flex;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    height: calc(100% - 115px);
    flex-wrap: wrap;
    align-items: stretch;
    align-content: stretch;
    justify-content: flex-start;
    flex-direction: row;
    padding: 10px 0;
    margin: 0;
    gap: 15px;

    /* For Firefox */
    scrollbar-width: thin;
    scrollbar-color: black transparent;
}

/* Webkit-based browsers (Chrome, Edge, Safari) */
.aw-add-products-overview::-webkit-scrollbar {
    width: 4px;
}

.aw-add-products-overview::-webkit-scrollbar-thumb {
    background-color: #000000;
    border-radius: 2px;
}

.aw-add-products-overview::-webkit-scrollbar-thumb:hover {
    background-color: gray;
}

.aw-add-products-overview::-webkit-scrollbar-track {
    background: transparent;
}

/* Center the spinner in its container */
.aw-add-products-overview.loading .aw-loading-spinner {
    display: block;
}

/* Hide content while loading */
.aw-add-products-overview.loading .aw-product-item {
    display: none;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Products inside the pop-up (Product Item) */
.aw-product-item {
    border: 1px solid #262626;
    border-radius: 5px;
    padding: 15px;
    background-color: #262626;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    position: relative;
    width: calc(33.33% - 15px);
    box-sizing: border-box;
    color: #ffffff;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
}

.aw-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.aw-product-item h3 {
    font-size: 18px;
    line-height: 1.1;
    margin: 0;
    color: #ffffff;
    cursor: default;
}

.aw-product-item p {
    font-size: 16px;
    margin: 0;
    color: #ffffff;
}

.aw-product-item img.aw-product-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    margin: 0 0 10px 0;
    border-radius: 2px;
}

.aw-product-item .aw-add-product.aw-plus-button {
    margin: 10px 0 0 0;
}

/* On page product listing */
.aw-products-listing-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    align-items: stretch;
    align-content: stretch;
    padding: 20px 0;
    margin: 0;
}

.aw-products-listing-inner .aw-product-item {
    width: calc(33% - 15px);
    max-width: 360px;
    min-width: 300px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background-color: #ffffff;
    color: #000000;
}

.aw-products-listing-inner .aw-product-item:hover {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.aw-products-listing-inner .aw-product-item h3 {
    font-size: 18px;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    color: #000000;
    cursor: default;
    min-height: 60px;
}

.aw-products-listing-inner .aw-product-item p {
    font-size: 16px;
    margin: 0;
    color: #000000;
}

.aw-products-listing-inner .aw-product-content-inner {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    gap: 15px;
}

.aw-products-listing-inner .aw-product-item img.aw-product-image {
    margin: 0;
    padding: 0;
}

body div .aw-products-listing-inner .aw-product-item .aw-button {
    margin: 0 0 10px 0;
}

body div .aw-products-listing-inner .aw-product-item .aw-prd-fields-wrap label {
    color: #000000 !important;
    background-color: #ffffff !important;
    width: auto;
    min-width: 10px;
    max-width: 100%;
    flex: 2;
    display: inline-flex;
    position: relative;
    margin: 0;
    align-items: center;
}

body div .aw-products-listing-inner .aw-product-item .aw-prd-fields-wrap input[type="text"],
body div .aw-products-listing-inner .aw-product-item .aw-prd-fields-wrap input[type="number"] {
    border: 1px solid #000000 !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 5px !important;
    line-height: 1em;
    height: 30px;
    width: auto;
    width: 100%;
    min-width: 10px;
    max-width: 50px;
    flex: 1;
    display: block;
    position: relative;
    margin: 0;
}

body div .aw-products-listing-inner .aw-product-item .aw-prd-fields-wrap input[type="checkbox"] {
    border: 1px solid #000000 !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0;
    line-height: 1em;
    height: 20px;
    width: 20px;
    display: block;
    position: relative;
}

body div .aw-products-listing-inner .aw-product-item .aw-prd-fields-wrap input:disabled {
    background-color: #f0f0f0 !important;
    color: #a0a0a0 !important;
}

body div .aw-products-listing-inner .aw-prd-fields-wrap {
    display: flex;
    width: 100%;
    position: relative;
    gap: 10px;
    flex-direction: column;
    flex-wrap: nowrap;
}

body div .aw-products-listing-inner .aw-prd-single-field-wrap {
    display: flex;
    width: 100%;
    position: relative;
    gap: 10px;
}

body div .aw-weekdays-checkbox {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    gap: 5px;
}

body div .aw-product-item-update-message {
    display: none;

    position: absolute;
    width: 80%;
    height: 34px;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    line-height: 1em;
    margin: 10px auto;
    left: 0;
    right: 0;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
}

body div .aw-product-item-update-message.aw-success {
    display: flex;
    background-color: rgb(36, 156, 36);
    color: #ffffff;
}

body div .aw-product-item-update-message.aw-error {
    display: flex;
    background-color: rgb(198, 38, 38);
    color: #ffffff;
}

body div .aw-product-item .aw-remove-icon {
    border-radius: 50%;
    background-color: #a16f07;
    color: #ffffff;
    width: 28px;
    height: 28px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    position: absolute;
    top: 10px;
    right: 10px;
    align-items: center;
    line-height: 1em;
    text-align: center;
    justify-content: center;
    padding-bottom: 3px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 999;
}

body div .aw-product-item .aw-remove-icon:hover {
    background-color: #bb8000;
    transform: scale(1.1);
}

body div .aw-product-item .aw-expire-tag {
    display: flex;
    background-color: rgb(198, 38, 38);
    color: #ffffff;
    position: absolute;
    width: 60%;
    height: 34px;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    line-height: 1em;
    margin: 10px auto;
    left: 0;
    right: 0;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
}

body div .aw-products-listing-inner .aw-product-item.aw-expire-soon .aw-button,
body div .aw-product-item.aw-expire-soon .aw-remove-icon {
    display: none;
}

.aw-product-item.aw-expire-soon .aw-product-content-inner {
    opacity: 0.3;
}

/* Hide the product selection for the listeo theme */
body .dashboard-content .add-listing-section.store_section .form-field-_store_products-container,
body .dashboard-content .add-listing-section.store_section .label-_store_products,
body .dashboard-content .add-listing-section.store_section .select2-container {
    display: none;
}

/* FRONTEND HIDE SELL THIS ITEM AND ADD TO MY STORE BUTTONS */
.single.single-product button[name="dokan_sell_this_item"],
.single.single-product input[name="add_to_my_store"],
.single.single-product #add_to_my_store,
button[name="dokan_sell_this_item"],
input[name="add_to_my_store"],
#add_to_my_store {
    display: none !important;
}

/* HIDE THE DASHBOARD ADMIN MENU PRODUCTS */
body div .dokan-dashboard-menu li.products {
    display: none !important;
}

/* HIDE INVINDUAL PRODUCT SALE TAG */
body div .wc-block-cart-item__product .wc-block-cart-item__wrap .wc-block-components-product-badge {
    display: none;
}

/* PRICE INS */
body .listeo-products-slider ins,
body .product .price ins {
    background-color: #a16f07;
    color: #ffffff;
    display: inline-flex;
    padding: 5px 8px 5px 6px;
    height: 24px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

/* New category selector in pop-up */
.aw-listing-pop-up-content .aw-cat-selector {
    height: 50px;
    width: 100%;
    display: flex;
    margin: 0 0 10px 0;
    padding: 0;
    position: relative;
    box-sizing: border-box;
}

.aw-listing-pop-up-content .aw-cat-selector select {
    width: calc(33% - 15px);
    height: 46px;
    line-height: 1em;
    font-size: 16px;
    padding: 5px 15px;
    border-radius: 5px;
    margin: 0;
    display: inline-block;
    position: relative;
}

/* REMOVE THE IMAGE IN THE PRODCUTS FROM THE BACKEND [TEMP?] */
body div .aw-products-listing-inner .aw-product-item img,
body div .aw-product-item img.aw-product-image {
    display: none;
}

/* REMOVE THE IMAGE IN THE PRODCUTS FROM THE BACKEND [TEMP?] - Need extra padding now */
body div .aw-products-listing-inner .aw-product-item .aw-product-content-inner h3 {
    padding-right: 45px;
}

/* Loading Spinner */
.aw-loading-spinner {
    display: none;
    margin: 20px auto;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #000000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Loading spinner keyframes */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Max width tablet */
@media(max-width: 991px) {
    .dashboard-content {
        padding: 40px 5%;
        padding-bottom: 0;
        height: auto;
        margin-left: 0px;
        box-sizing: border-box;
        width: 90%;
    }
}

/* Max width mobile */
@media(max-width: 767px) {
    .aw-add-products-overview {
        height: calc(100% - 135px);
    }

    .aw-listing-pop-up-modal {
        height: 90vh;
        width: 90vw;
    }

    .aw-listing-pop-up-content {
        padding: 10px;
    }

    .aw-product-item {
        width: calc(50% - 15px);
    }

    .aw-product-item img.aw-product-image {
        height: 80px;
        width: 100%;
        object-fit: cover;
        margin: 0 0 10px 0;
        border-radius: 2px;
    }

    body div .aw-products-listing .aw-plus-button {
        background-color: rgb(161, 111, 7);
        color: rgb(255, 255, 255);
        border: 0px none rgb(255, 255, 255);
        padding: 8px 14px;
        margin: 5px 0;
        font-family: Raleway;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none solid rgb(255, 255, 255);
        cursor: pointer;
        display: inline-flex;
        position: relative;
        height: 40px;
        border-radius: 50px;
        box-shadow: none;
        transition: 0.2s ease-in-out;
        overflow: hidden;
        opacity: 1;
        z-index: auto;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        line-height: 16px;
        width: 200px;
        text-align: center;
        clear: both;
    }
}
