/**
 * Quick Order Solutions Styles
 */

/* Add at the top of the file */
:root {
    --qos-main-color: #7d3c98;
}

/* Global styles */
.qos-quick-order-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

@keyframes qos-zoom-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.qos-zoom-in-animate {
  animation: qos-zoom-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.qos-quick-order-popup-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.qos-quick-order-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
}

.qos-quick-order-popup-close:hover,
.qos-quick-order-popup-close:focus {
    color: #000;
    text-decoration: none;
}

/* Header section */
.qos-quick-order-header {
    text-align: center;
    margin-bottom: 20px;
}

.qos-quick-order-header h2 {
    font-size: 22px;
    margin: 0 0 10px;
    color: #333;
}

.qos-instruction-text {
    font-size: 18px;
    color: #000000;
    margin-bottom: 10px;
    font-weight: 700;
    padding: 0 20px;
    text-align: center;
}

.qos-instruction-text strong {
    color: rgb(255, 44, 44);
}

/* Loading animation */
.qos-quick-order-loading {
    text-align: center;
    padding: 30px 0;
}

.qos-quick-order-loading:after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border-radius: 50%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--qos-main-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading overlay for modal */
.qos-modal-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(1px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qos-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--qos-main-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Customer information section */
.qos-customer-info-section {
    margin-bottom: 20px;
}

.qos-input-group {
    position: relative;
    margin-bottom: 10px;
}

.qos-input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.qos-input-group input {
    width: 100%;
    padding: 20px 20px 20px 40px !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    margin: 0 !important;
}

.qos-input-group input:focus {
    border-color: var(--qos-main-color);
    outline: none;
}

/* Icons */
.icon-user:before {
    content: "👤";
}

.icon-location:before {
    content: "📍";
}

.icon-phone:before {
    content: "📱";
}

.icon-coupon:before {
    content: "🏷️";
}

.icon-trash:before {
    content: "🗑️";
}

/* Product list section */
.qos-product-list-section {
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.qos-product-list-header {
    display: flex;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    font-size: 14px;
}

.qos-product-item {
    display: flex;
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.qos-product-col {
    padding: 0 5px;
    color: var(--qos-main-color) !important;
}

.qos-image-col {
    width: 70px;
    flex: 0 0 70px;
}

.qos-info-col {
    flex: 1;
}

.qos-action-col {
    width: 50px;
    flex: 0 0 50px;
    text-align: center;
}

.qos-product-details h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 0;
}

.qos-price {
    margin-bottom: 0;
    display: inline-block;
    font-weight: 600;
    color: var(--qos-main-color) !important;
}

/* Quantity selector modern design */
.qos-quantity-selector {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 0;
    width: fit-content;
    min-width: 110px;
    height: 34px !important;
    overflow: hidden;
}

.qos-quantity-btn {
    width: 30px;
    height: 32px;
    background: #ececec;
    font-size: 20px;
    color: #000;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    line-height: 1;
    transition: background 0.15s;
    overflow: hidden;
}
.qos-quantity-btn.qos-minus{
    border-right: 1px solid #e0e0e6;
    border-radius: 6px 0 0 6px;
}
.qos-quantity-btn.qos-plus{
    border-left: 1px solid #e0e0e6;
    border-radius: 0 6px 6px 0;
}
.qos-quantity-btn span {
    font-size: inherit !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    margin-top: -5px !important;
}
.qos-quantity-btn:hover {
    background: #f0f0f0;
    color: var(--qos-main-color);
}

.qos-quantity-selector input[type="number"] {
    width: 60px;
    height: 32px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    outline: none;
    margin: 0 2px;
    -moz-appearance: textfield;
}

.qos-quantity-selector input[type="number"]::-webkit-outer-spin-button,
.qos-quantity-selector input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qos-remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    outline: none;
}

.qos-remove-item:hover {
    color: #c0392b;
}

/* Icon for trash */
.qos-icon-trash {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23e74c3c' d='M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.variations-container {
    padding: 10px;
    background-color: #f0f0f0;
}

/* Shipping section */
.shipping-section {
    margin-bottom: 20px;
}

.shipping-section h3 {
    font-size: 16px;
    margin: 0 0 10px;
    font-weight: 700;
    color: #333;
}
.qos-delivery-gateway-area{
    margin: 0;
    padding: 0;
    border: 1px solid var(--qos-main-color);
    border-radius: 10px;
}
.qos-delivery-gateway-area li{
    list-style: none;
    cursor: pointer;
    margin: 0;
}
.qos-delivery-gateway-area li input{
    margin: 0 !important;
}
.qos-delivery-gateway-area li:not(:last-child){
    border-bottom: 1px solid var(--qos-main-color);
}
.qos-delivery-gateway-area li .radio-input{
    display: inline-block;
    padding: 8px 10px;
    border-right: 1px solid var(--qos-main-color);
}
.qos-delivery-gateway-area li .gateway-name{
    display: inline-block;
    width: 75%;
    padding: 8px 10px;
    border-right: 1px solid var(--qos-main-color);
    font-weight: 700;
    color: var(--qos-main-color);
}
.qos-delivery-gateway-area .delivery-charge{
    font-weight: 700;
    color: var(--qos-main-color);
    padding: 0 10px;
}
@media screen and (max-width: 768px ) {
    .qos-delivery-gateway-area li .gateway-name{
        width: 60%;
        font-size: 14px;
    }
}

.shipping-name {
    flex: 1;
}

.shipping-cost {
    font-weight: 600;
    color: #333;
}

/* Payment section */
.payment-section {
    margin-bottom: 20px;
}

.payment-section h3 {
    font-size: 16px;
    margin: 0 0 10px;
    color: #333;
}

.payment-options {
    margin-bottom: 15px;
}

.payment-option {
    margin-bottom: 5px;
}

.payment-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}

.payment-option input[type="radio"] {
    margin-right: 10px;
}

.payment-instruction {
    padding: 5px 0 5px 25px;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.coupon-section {
    margin-top: 15px;
}

/* Order summary */
.qos-order-summary {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.qos-order-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.qos-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.qos-summary-row.total {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-weight: bold;
    font-size: 18px;
    color: var(--qos-main-color);
}

/* WooCommerce price styling */
.woocommerce-Price-amount {
    font-weight: 600;
}

.includes_tax {
    font-size: 12px;
    color: #777;
    display: block;
}

/* Place order button */
.form-actions {
    margin-top: 20px;
    text-align: center;
    animation: bounch 1s linear infinite;
}

@keyframes bounch {
    0%   { transform: scale(0.90); }
    50%  { transform: scale(0.95); }
    100% { transform: scale(0.90); }
}
  

.place-order-button {
    background-color: var(--qos-main-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 22px;
    cursor: pointer;
    width: 100%;
    font-weight: 700;
    transition: background-color 0.3s;
}

.place-order-button:hover {
    background-color: var(--qos-main-color);
}

/* Responsive styles */
@media (max-width: 768px) {
    .qos-quick-order-popup-content {
        width: 95%;
        padding: 15px;
        margin: 5% auto;
    }
    
    .product-list-header {
        font-size: 12px;
    }
    
    .product-details h3 {
        font-size: 14px;
    }
    
    .image-col {
        width: 60px;
        flex: 0 0 60px;
    }
    
    .qos-quantity-selector {
        max-width: 100px;
    }
    
    .qos-quantity-btn {
        width: 25px;
        height: 25px;
    }
    
    .qos-quantity-selector input {
        width: 30px;
        height: 25px;
    }
}

/* Success message */
.order-success-message {
    text-align: center;
    padding: 30px 0;
}

.order-success-message h2 {
    color: #27ae60;
    margin-bottom: 15px;
}

.order-success-message .button {
    display: inline-block;
    background-color: var(--qos-main-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 20px;
}

/* Form submitting state */
.form-submitting {
    position: relative;
    pointer-events: none;
}

.form-submitting::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-submitting::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--qos-main-color);
    animation: spin 1s linear infinite;
    z-index: 10;
} 

/* Empty cart message */
.qos-empty-cart-message {
    padding: 20px;
    text-align: center;
    background-color: #f8f8f8;
    border-radius: 4px;
    margin: 10px 0;
}

.qos-empty-cart-message p {
    color: #666;
    margin: 0;
    font-size: 14px;
} 

.qos-payment-gateway-area {
    list-style: none;
    margin: 0;
    padding: 0;
    border-radius: 6px;
    border: 1px solid var(--qos-main-color);
    overflow: hidden;
}
.qos-payment-gateway-area li {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--qos-main-color);
    transition: background 0.15s;
    margin: 0 !important;
}
.qos-payment-gateway-area li input{
    margin: 0 !important;
}
.qos-payment-gateway-area li:last-child {
    border-bottom: none;
}
.qos-payment-gateway-area li.selected,
.qos-payment-gateway-area li:hover {
    cursor: pointer;
}
.qos-payment-gateway-area .radio-input {
    margin-right: 12px;
}
.qos-payment-gateway-area .gateway-name {
    flex: 1;
    font-size: 16px;
    color: #333;
}
.payment-gateway-name {
    font-weight: 600;
} 
.order-note-section{
    margin-top: 10px;
}

/* Make Buy Now button compact and inline */
.qos-inline-buy-now .qos-buy-now-btn {
    font-size: 15px;
    min-width: auto;
    white-space: nowrap;
    margin: 0 !important;
}

/* Ensure the row stays inline and doesn't wrap unless needed */
form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

form.cart > * {
    flex: unset !important;
}

form.cart .quantity {
    margin-bottom: 0;
}

form.cart .single_add_to_cart_button {
    margin-left: 8px;
}

/* Variation Selector Styles */
.qos-variation-selector {
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.qos-variation-selector h3 {
    margin: 0 0 20px 0;
    font-size: 1.4em;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.qos-attribute-field {
    margin-bottom: 15px;
}

.qos-attribute-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    text-transform: capitalize;
}

.qos-attribute-field select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.qos-attribute-field select:focus {
    outline: none;
    border-color: var(--qos-main-color, #7d3c98);
    box-shadow: 0 0 0 3px rgba(125, 60, 152, 0.1);
}

.qos-variation-details {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    min-height: 50px;
}

.qos-variation-info {
    text-align: center;
}

.qos-variation-price {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--qos-main-color, #7d3c98);
    margin-bottom: 10px;
}

.qos-variation-availability {
    color: #666;
    font-size: 0.9em;
}

.qos-variation-error {
    color: #e74c3c;
    text-align: center;
    font-weight: 500;
    font-style: italic;
}

.qos-variation-actions {
    text-align: center;
    margin-top: 20px;
}

.qos-add-to-cart-btn {
    background-color: var(--qos-main-color, #7d3c98);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qos-add-to-cart-btn:hover:not(:disabled) {
    background-color: #6b2c7d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 60, 152, 0.3);
}

.qos-add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.qos-add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Responsive styles for variation selector */
@media (max-width: 768px) {
    .qos-variation-selector {
        padding: 15px;
    }
    
    .qos-variation-selector h3 {
        font-size: 1.2em;
    }
    
    .qos-attribute-field select {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .qos-add-to-cart-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Bangladeshi Payment Fields Styles */
.qos-payment-fields {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.payment-fields-box {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.payment-fields-box-info {
    background: #e7f3ff;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #007cba;
}

.payment-fields-box-info p {
    margin: 0;
    color: #0073aa;
    font-size: 14px;
}

.payment-fields-box-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.payment-fields-box ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 4px;
}

.payment-fields-box ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 14px;
}

.payment-fields-box ul li:last-child {
    margin-bottom: 0;
}

.payment-fields-box ul li span {
    font-weight: 600;
    color: #333;
}

.payment-fields-box-phone,
.payment-fields-box-trans {
    margin-bottom: 15px;
}

.payment-fields-box-phone label,
.payment-fields-box-trans label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.payment-fields-box-phone input,
.payment-fields-box-trans input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.payment-fields-box-phone input:focus,
.payment-fields-box-trans input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.payment-fields-box-qr {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.payment-fields-box-qr img {
    border: 2px solid #ddd;
    border-radius: 6px;
}

.required {
    color: #d63384;
    font-weight: 600;
}

/* Payment gateway icons in selection */
.qos-payment-gateway-area li {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qos-payment-gateway-area li:hover {
    border-color: #007cba;
    background-color: #f8f9fa;
}

.qos-payment-gateway-area li.selected {
    border-color: #007cba;
    background-color: #e7f3ff;
}

.qos-payment-gateway-area li .gateway-name {
    display: flex;
    align-items: center;
    flex: 1;
    margin-left: 10px;
}

.qos-payment-gateway-area li .gateway-name img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 8px;
}

/* Hide/show payment fields based on selection */
.qos-payment-fields[style*="display: none"] {
    display: none !important;
}

.qos-payment-fields[style*="display: block"],
.qos-payment-fields:not([style*="display: none"]) {
    display: block !important;
}