.order-now-btn {
    background: #ff6600;
    color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 5px;
    width: 100%;
}

.order-now-btn:hover {
    background: #e65c00;
}

.quick-order-popup .qo-section:last-child {
    border-bottom: none;
}

.quick-order-popup .qo-section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: left;
}

.qo-cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-top: 10px;
}
.swal2-title {
    color: #000000 !important;
    font-size: 23px;
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 10px;
}

.qo-cart-item:last-child {
    border-bottom: none;
}

.qo-cart-item img {
    max-width: 45px;
    margin-right: 15px;
    border-radius: 5px;
}

.qo-cart-item-details {
    flex: 1;
    text-align: left;
}

.qo-cart-item-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
}

.qo-cart-item-price-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.qo-cart-item-price {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.qo-quantity-control {
    display: flex;
    align-items: center;
}

.qo-quantity-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 1.325em;
    width: 30px;
    height: 30px;
    line-height: 5px;
    text-align: center;
    padding: 0 25px 0 15px;
}

.qo-cart-item-quantity {
    width: 65px !important;
    text-align: center;
    border: 1px solid #ccc;
    border-left: none;
    border-right: none;
    height: 30px;
}

.quick-order-popup .qo-price-breakdown {
    font-size: 1em;
    border-top: 1px solid #eee;
    /* Add top border */
    border-bottom: 1px solid #eee;
    /* Add bottom border */
    margin-bottom: 5px;
}

.quick-order-popup .qo-price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    width: 100%;
    /* Full flex width */
    align-items: center;
    /* Vertically align items */
}

.quick-order-popup .qo-total-price-row {
    font-weight: bold;
    font-size: 1.2em;
    /* Slightly larger for total */
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    color: #003913;
    border-top: 1px solid #eee;
    /* Subtle divider */
}

/* Align price and amount */
.quick-order-popup .qo-price-row span:first-child {
    text-align: left;
    flex: 1;
    /* Allow title to take available space */
}

.quick-order-popup .qo-price-row span:last-child {
    text-align: right;
    flex: 1;
    /* Allow amount to take available space */
}

.qo-form-row {
    text-align: left;
    padding: 10px 0;
}

.quick-order-popup .qo-customer-details .qo-form-row label {
    font-weight: bold;
    text-align: left;
    margin-bottom: 5px;
    font-size: 16px;
}

.qo-disabled-section {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.quick-order-popup .qo-customer-details .qo-form-row input[type="text"],
.quick-order-popup .qo-customer-details .qo-form-row input[type="tel"],
.quick-order-popup .qo-customer-details .qo-form-row textarea,
input#swal-note {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    background-color: #fff;
    border: 1px solid #e2dede;
}

.qo-delivery-options {
    display: inline-block;
    padding: 5px 0;
    border-bottom: 1px solid #e2dede;
    border-top: 1px solid #e2dede;
    text-align: center;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
    padding-bottom: 15px;
}

.qo-delivery-options .qo-section-title {
    text-align: center;
}

.qo-note {
    text-align: center;
    font-size: 0.9em;
    color: #777;
    margin-top: 1rem;
}

div:where(.swal2-container) .swal2-input,
div:where(.swal2-container) .swal2-textarea {
    margin: 0;
    border: 1px solid #e2dede;
}

/* Validation styles */
.swal2-input.invalid,
.swal2-textarea.invalid {
    border-color: red !important;
}

.swal2-input.valid,
.swal2-textarea.valid {
    border-color: green !important;
}

.qo-cart-item-variation {
    font-size: 12px;
    color: green;
}

.qo-cart-item-variation b {
    font-weight: bold;
}

.qo-coupon-section {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
}

.qo-coupon-section .swal2-input {
    flex: 1;
    margin-right: 10px;
    height: 40px;
}

.qo-coupon-section .button {
    background-color: #ff6601;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    height: 40px;
    line-height: 0;
}

.qo-coupon-section .button:hover {
    background-color: #c45206;
    color: #fff;
}

#qo-coupon-message {
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
}

.qo-free-shipping-message {
    font-size: 14px;
    color: green;
    text-align: left;
    padding: 5px 0;
}

.qo-free-shipping-message a {
    color: green;
    text-decoration: underline;
    font-weight: bold;
}

div:where(.swal2-container) div:where(.swal2-html-container) {
    padding: 15px;
    overflow: visible !important;
    /* Vital for letting Select2 dropdown escape the modal bounds */
}

/* Quick Order Modal 2-Column Layout */
.qo-modal-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.qo-modal-column {
    flex: 1;
    min-width: 0;
    /* Prevent flex blowout */
}

/* INput fields*/
.qo-delivery-options input[type="radio"]:checked {
    background-color: #003913;
    border-color: #003913;
}

.qo-delivery-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #003913;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background-color: #fff;
    margin: 0 5px 0 0;
}

.qo-delivery-options input[type="radio"]:hover {
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.5);
    transform: scale(1.10);
}

.qo-delivery-options input[type="radio"]:checked::after {
    content: "";
    width: 16px;
    height: 16px;
    background: #ff0000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.quick-order-popup .qo-delivery-options label {
    display: inline-flex;
    padding: 0 5px;
}

.qo-delivery-options .options {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.swal2-actions {
    margin: 0 0 10px 0;
    justify-content: center !important;
    width: 100%;
    position: sticky;
    bottom: -15px;
    /* Adjust to sit flush against the modal padding */
    padding: 15px 0;
    background-color: #fff;
    z-index: 100;
    flex-direction: column;
    align-items: center;
}

.qo-error-messages {
    width: 100%;
    margin-top: 10px;
    display: none;
    color: #c33;
    font-size: 14px;
    text-align: center;
    border-top: 1px solid #c33;
    padding-top: 8px;
    padding-bottom: 10px;
}

.qo-error-list {
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    padding: 10px 15px;
    color: #c33;
    font-size: 14px;
    text-align: left;
    line-height: 1.5;
}

.swal2-footer {
    margin: 0;
}

button.swal2-close {
    border: 1px solid;
    border-radius: 50px;
    padding: 16px;
    font-weight: 300;
    max-height: 25px;
    max-width: 25px;
    position: relative;
    top: 8px;
    right: 15px;
}

.swal2-popup.swal2-modal {
    margin-top: 85px;
}

a#hide-coupon-field {
    background: #181010;
    color: #fff;
    width: 70px;
    border-radius: 4px;
    margin-left: 10px;
    line-height: 36px;
    text-transform: uppercase;
}

@media only screen and (max-width: 768px) {
    .qo-modal-layout {
        flex-direction: column-reverse;
        /* Cart summary on top, form below */
        gap: 15px;
    }

    .qo-modal-column {
        width: 100%;
    }

    .swal2-container.swal2-center.swal2-backdrop-show {
        padding: 0;
    }

    div#swal2-html-container {
        padding: 0 15px;
    }
}

/* SweetAlert2 Animations */
.swal2-bottom-start-show {
    animation: swal2-bottom-start-show 0.3s forwards;
}

.swal2-bottom-start-hide {
    animation: swal2-bottom-start-hide 0.3s forwards;
}

@keyframes swal2-bottom-start-show {
    from {
        transform: translateY(100vh);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes swal2-bottom-start-hide {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Loader animation for button */
.order-now-btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.order-now-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.qo-customer-details .qo-form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    position: relative;
    /* Crucial anchor for Select2 dropdown */
}

.qo-customer-details .qo-form-row label {
    margin-bottom: 5px;
    font-weight: bold;
    text-align: left;
}

.qo-customer-details .qo-form-row .required {
    color: red;
    margin-left: 5px;
}

.qo-customer-details .qo-form-row input,
.qo-customer-details .qo-form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.show-field-link {
    display: inline-flex;
    text-align: right;
    margin-bottom: 10px;
    color: #0073aa;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    float: right;
}

.show-field-link:hover {
    text-decoration: underline;
}

a#hide-email-field {
    float: right;
    margin: -18px 0 0 0;
}


/* Select2 Styling for State Dropdown */
.select2-container--default .select2-selection--single {
    height: 40px !important;
    border: 1px solid #e2dede !important;
    border-radius: 4px !important;
    padding: 5px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    padding-left: 10px !important;
    color: #333 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 5px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e2dede !important;
    border-radius: 4px !important;
    padding: 8px !important;
    font-size: 14px !important;
}

.select2-dropdown {
    border: 1px solid #e2dede !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    background: #fff !important;
}

.select2-results__option {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #ff6600 !important;
    color: white !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f0f0f0 !important;
    color: #333 !important;
}

/* Make Select2 work well inside SweetAlert2 */
.swal2-popup .select2-container {
    z-index: 10000 !important;
}

.select2-container--open {
    z-index: 99999 !important;
}

/* Adjust Select2 width to match other inputs */
.qo-form-row .select2-container {
    width: 100% !important;
}