/**
 * WooCommerce Checkout Quantity Selector - Buy Now Button CSS
 * Version: 1.2.0
 * Conflict-Free Styling for Buy Now Feature
 */

/* ========================================
   BUY NOW BUTTON - PRODUCT PAGE
   ======================================== */

.wcqty-buy-now-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 10px 0 0 10px !important;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    text-decoration: none !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.wcqty-buy-now-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
    color: #fff !important;
}

.wcqty-buy-now-btn:active {
    transform: translateY(0) !important;
}

.wcqty-buy-now-btn:disabled,
.wcqty-buy-now-btn.wcqty-loading {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.wcqty-buy-now-icon {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2.5 !important;
    transition: transform 0.3s ease !important;
}

.wcqty-buy-now-btn:hover .wcqty-buy-now-icon {
    transform: translateX(4px) !important;
}

.wcqty-buy-now-text {
    display: inline !important;
    line-height: 1 !important;
}

/* Loading state */
.wcqty-buy-now-btn.wcqty-loading .wcqty-buy-now-icon {
    animation: wcqty-spin 1s linear infinite !important;
}

@keyframes wcqty-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .wcqty-buy-now-btn {
        width: 100% !important;
        margin: 10px 0 0 0 !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .wcqty-buy-now-btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    .wcqty-buy-now-icon {
        width: 16px !important;
        height: 16px !important;
    }
}

/* ========================================
   NOTIFICATION FOR BUY NOW
   ======================================== */

.wcqty-buy-now-notification {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    padding: 16px 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 12px !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
    z-index: 999999 !important;
    transform: translateX(400px) !important;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    min-width: 250px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}

.wcqty-buy-now-notification.wcqty-show {
    transform: translateX(0) !important;
}

.wcqty-buy-now-notification.wcqty-error {
    background: #e74c3c !important;
}

@media (max-width: 768px) {
    .wcqty-buy-now-notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: auto !important;
    }
}

/* ========================================
   COMPATIBILITY WITH THEMES
   ======================================== */

/* Storefront theme */
.storefront .wcqty-buy-now-btn {
    height: auto !important;
}

/* Astra theme */
.astra-shop-thumbnail-wrap .wcqty-buy-now-btn,
.ast-woocommerce-container .wcqty-buy-now-btn {
    margin-top: 10px !important;
}

/* OceanWP theme */
.oceanwp-grid-entry .wcqty-buy-now-btn {
    width: 100% !important;
    margin-left: 0 !important;
}

/* Flatsome theme */
.product-small .wcqty-buy-now-btn {
    width: 100% !important;
    margin: 5px 0 0 0 !important;
}

/* ========================================
   PREVENT CONFLICTS
   ======================================== */

.wcqty-buy-now-btn * {
    box-sizing: border-box !important;
}

/* Ensure button doesn't break layout */
.cart .wcqty-buy-now-btn,
.single-product .wcqty-buy-now-btn {
    box-sizing: border-box !important;
    vertical-align: top !important;
}
