/**
 * ========================================================================
 * BUY IT NOW - STYLES
 * ========================================================================
 * Version: 1.0.0
 * Purpose: Styling for Buy It Now button and checkout display
 * Features: Responsive design, loading states, accessibility
 * ========================================================================
 */

/* ===========================================
   BUY IT NOW BUTTON - SINGLE PRODUCT PAGE
   =========================================== */



#ws-buy-it-now-btn {
    width: 100% !important;
    padding: 12px 24px !important;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    margin-top: 10px;
    background: #b87939 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px;
}

#ws-buy-it-now-btn:hover {
    background-color: #855d27 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

#ws-buy-it-now-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

#ws-buy-it-now-btn:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* Loading State */
#ws-buy-it-now-btn.ws-bin-loading {
    background-color: #cccccc !important;
    border-color: #cccccc !important;
    cursor: not-allowed;
    pointer-events: none;
}

#ws-buy-it-now-btn.ws-bin-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ws-bin-spin 0.8s linear infinite;
}

@keyframes ws-bin-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Disabled State */
#ws-buy-it-now-btn:disabled,
#ws-buy-it-now-btn.ws-bin-disabled {
    background-color: #e0e0e0 !important;
    border-color: #e0e0e0 !important;
    color: #999999 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

#ws-buy-it-now-btn:disabled:hover,
#ws-buy-it-now-btn.ws-bin-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ===========================================
   CHECKOUT PAGE - BUY IT NOW INDICATOR
   =========================================== */

.ws-bin-checkout-notice {
    background-color: #fff8e1;
    border-left: 4px solid #ff6b35;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}

.ws-bin-checkout-notice strong {
    color: #ff6b35;
    font-weight: 600;
}

.ws-bin-checkout-notice p {
    margin: 0;
}

/* ===========================================
   ORDER SUMMARY STYLING
   =========================================== */

.woocommerce-checkout-review-order-table .ws-bin-item {
    background-color: #fffbf5;
}

.woocommerce-checkout-review-order-table .ws-bin-item td {
    border-top: 2px solid #ff6b35;
    border-bottom: 2px solid #ff6b35;
}

.woocommerce-checkout-review-order-table .ws-bin-item .product-name {
    font-weight: 600;
}

.woocommerce-checkout-review-order-table .ws-bin-item .product-name::after {
    content: ' 🛒';
    font-size: 0.9em;
}

/* Weight Label in Order Summary */
.ws-bin-weight-label {
    display: block;
    font-size: 0.9em;
    color: #666666;
    margin-top: 4px;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

/* Mobile Devices */
@media screen and (max-width: 768px) {

    
    .ws-bin-checkout-notice {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    #ws-buy-it-now-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .ws-bin-checkout-notice {
        padding: 10px 12px;
        font-size: 12px;
    }
}
/* ===========================================
   ACCESSIBILITY IMPROVEMENTS
   =========================================== */

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ws-buy-it-now-btn {
        border-width: 3px !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    #ws-buy-it-now-btn,
    #ws-buy-it-now-btn:hover,
    #ws-buy-it-now-btn:active {
        transition: none;
        animation: none;
    }
    
    #ws-buy-it-now-btn.ws-bin-loading::after {
        animation: none;
        opacity: 0;
    }
}

/* Focus Visible (Modern Browsers) */
#ws-buy-it-now-btn:focus-visible {
    outline: 3px solid #ff6b35;
    outline-offset: 3px;
}

#ws-buy-it-now-btn:focus:not(:focus-visible) {
    outline: none;
}

/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
    .ws-buy-it-now-wrapper {
        display: none;
    }
    
    .ws-bin-checkout-notice {
        border: 1px solid #000000;
        background-color: transparent;
    }
}

/* ===========================================
   RTL SUPPORT
   =========================================== */

[dir="rtl"] .ws-bin-checkout-notice {
    border-left: none;
    border-right: 4px solid #ff6b35;
}

/* ===========================================
   DARK MODE SUPPORT
   =========================================== */

@media (prefers-color-scheme: dark) {
    .ws-bin-checkout-notice {
        background-color: #2a2a2a;
        border-left-color: #ff8c5a;
    }
    
    .ws-bin-checkout-notice strong {
        color: #ff8c5a;
    }
    
    .woocommerce-checkout-review-order-table .ws-bin-item {
        background-color: #1a1a1a;
    }
    
    .woocommerce-checkout-review-order-table .ws-bin-item td {
        border-top-color: #ff8c5a;
        border-bottom-color: #ff8c5a;
    }
}

/* ===========================================
   UTILITIES
   =========================================== */

/* Screen Reader Only Text */
.ws-bin-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}