.cart.table-wrapper .actions-toolbar > .action {
    background-color: #fff !important;
    color: #9aa179 !important;
}

.cart-container .cart.main.actions .action.update {
    border-color: #9aa179;
}

.checkout.methods.items.checkout-methods-items .item a.action.multicheckout {
    text-decoration: none;
}

.cart-summary > .title {
    font-size: 1.4rem;
}

.cart-container .cart-summary {
    border-radius: 15px;
    padding: 1px 20px 30px;
}

.cart.table-wrapper .product-item-name {
    padding-left: 0px;
    margin-top: 0px;
}

.cart.table-wrapper .product-item-photo img {
    max-width: 100px;
    margin: 0;
}

#discount-coupon-form
    .fieldset.coupon
    .actions-toolbar
    .primary
    .action.apply.primary {
    background: #9aa179;
}

#discount-coupon-form .fieldset.coupon .field .control input[type="text"] {
    min-width: 100%;
    padding-left: 10px;
}

.cart-container .checkout-methods-items .action.primary {
    padding: 5px;
    font-size: 12px;
}

.price-including-tax .price,
.price-excluding-tax .price {
    font-size: 13px;
}

.cart-container .cart.main.actions .action.update {
    all: unset;
    border-color: #9aa179;
    background: #9aa179;
    padding: 12px;
    color: #fff;
    cursor: pointer;
}

.cart-container .cart.main.actions .action.update:hover {
    background: #a6b177;
}

@media screen and (max-width: 480px) and (min-width: 320px) {
    .cart.table-wrapper .items thead + .item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}

@media screen and (max-width: 786px) and (min-width: 320px) {
    .cart.table-wrapper .item-actions td {
        text-align: start !important;
    }
}

/* Apply discount button full */

#discount-coupon-form .actions-toolbar .primary {
    width: 100%;
}

/* Cart page for tablet */
@media screen and (max-width: 768px) and (min-width: 320px) {
    .cart.table-wrapper .product-item-photo img {
        min-width: unset !important;
    }
    #shopping-cart-table .cart.item tr.item-info {
        display: flex;
        flex-direction: row;
        border-bottom: 1px solid #fff;
    }
    .cart-container .form-cart .actions {
        text-align: end;
    }

    .cart.table-wrapper .col.qty .input-text {
        margin-top: 5px;
    }
    .cart.table-wrapper .col.qty[data-th]:before,
    .cart.table-wrapper .col.price[data-th]:before,
    .cart.table-wrapper .col.subtotal[data-th]:before,
    .cart.table-wrapper .col.msrp[data-th]:before {
        padding-bottom: 0;
        margin-top: -5px;
    }

    #shopping-cart-table
        .cart.item
        tr.item-info
        .item
        .product-item-details
        .product-item-name
        a,
    #shopping-cart-table .cart.item tr.item-info .col.qty,
    #shopping-cart-table .cart.item tr.item-info .col.price {
        -webkit-line-clamp: 4;
        margin-left: -2px;
        margin-top: 0;
        font-weight: 500;
        font-size: 11px;
    }

    #shopping-cart-table
        .cart.item
        tr.item-info
        .item
        .product-item-details
        .product-item-name
        a {
        margin-top: -8px;
        margin-left: -10px;
    }
    #shopping-cart-table .cart.item tr.item-info .col.subtotal {
        margin-left: -2px;
    }
    .item-info .col.price .price-including-tax .price,
    .item-info .col.price .price-excluding-tax .price {
        font-size: 11px;
        font-weight: 500;
    }

    .product-item-name a {
        padding: 0 !important;
    }
}

@media screen and (max-width: 1098px) and (min-width: 769px) {
    .cart-container .form-cart {
        position: static;
        width: 100%;
    }

    .cart-container .cart-summary {
        position: static;
        width: 100%;
    }
    .cart.table-wrapper .product-item-photo img {
        max-width: 90px;
        margin-left: 0px;
    }
}

/* Zip code on cart page sidebar */
#shipping-zip-form .field[name="shippingAddress.postcode"] {
    display: none !important;
}

/* Generate quotation button on cart page */
button#generate-quote-btn {
    padding: 12px;
    width: 100%;
    border: none;
    margin-top: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

/* Updated Cart message */
.message.success {
    font-size: 0.9rem;
}

/* Generate quotation popup from cart page */
.checkout-cart-index .modal-popup .modal-inner-wrap {
    width: 50%;
}

.checkout-cart-index .modal-popup .modal-inner-wrap .modal-footer {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 10px;
    padding-bottom: 2rem;
    padding-top: 1rem;
}

.checkout-cart-index
    .modal-popup
    .modal-inner-wrap
    .modal-footer
    .action.secondary {
    padding: 9px 20px;
    border: none;
    border-radius: 1px;
}

@media screen and (max-width: 600px) and (min-width: 320px) {
    .checkout-cart-index
        .modal-popup
        .modal-inner-wrap
        .modal-footer
        .action.primary,
    .checkout-cart-index
        .modal-popup
        .modal-inner-wrap
        .modal-footer
        .action.secondary {
        width: 100%;
    }
    .checkout-cart-index .modal-popup .modal-inner-wrap {
        width: 75% !important;
    }
}

/* GENERATE QUOTATION FORM POPUP */
/* Generate Quotation Form Styling */
#generate-quote-form {
    padding: 20px;
    max-width: 400px; /* Reduced from 500px for better responsiveness */
    width: 100%;
    margin: 0 auto;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* Heading */
#generate-quote-form h3 {
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
    color: #333;
}

/* Labels and Inputs */
#generate-quote-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    color: #444;
}

#generate-quote-form input,
#generate-quote-form textarea {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 5px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

/* Textarea */
#generate-quote-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Submit Button */
#generate-quote-form button {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background-color: #9aa179;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#generate-quote-form button:hover {
    background-color: #a6b177;
}

/* Magento Modal Overrides (No background dimming) */
.modal-popup._inner-scroll {
    background: transparent !important;
}

/* Reduce the modal wrapper size */
.modal-popup .modal-inner-wrap {
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0;
    width: 25% !important;
    display: inline-block;
    box-sizing: border-box;
}

/* Hide heading */
.checkout-cart-index .modal-popup .modal-header {
    display: none;
}

/* Mobile-friendly adjustments */
@media (max-width: 480px) {
    #generate-quote-form {
        padding: 15px;
        max-width: 100%;
    }

    .checkout-cart-index .modal-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #generate-quote-form h3 {
        font-size: 16px;
    }

    #generate-quote-form button {
        font-size: 14px;
        padding: 10px;
    }

    .modal-popup .modal-inner-wrap {
        width: 100%;
    }
}

@media screen and (max-width: 1098px) and (min-width: 767px) {
    .modal-popup .modal-inner-wrap {
        width: 50% !important;
    }
}

/* Close button styling */
.close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s ease, transform 0.2s ease;
    z-index: 10;
}

.close-modal:hover {
    color: #000;
    transform: scale(1.2);
}

/* On mobile, reduce close button size slightly */
@media (max-width: 480px) {
    .close-modal {
        font-size: 20px;
        top: 10px;
        right: 12px;
    }
}

/* Hide Edit option from cart page */
.cart
    #shopping-cart-table
    .cart.item
    .item-actions
    .actions-toolbar
    .action-edit {
    display: none;
}
