/* ========================================
   TERMINATOR CSS - Hard Removal of Default Elements
   ======================================== */

/* Remove ALL default WooCommerce add to cart elements */
.single-product .cart,
.single-product form.cart,
.single-product .quantity,
.single-product .single_add_to_cart_button,
.single-product button.single_add_to_cart_button,
.single-product .woocommerce-variation-add-to-cart,
.single-product .variations_button,
.single-product div.product form.cart div.quantity,
.ast-sticky-add-to-cart,
.astra-shop-summary-wrap,
.ast-oembed-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ========================================
   Custom RB Atelier Checkout UI
   ======================================== */

.rb-custom-checkout-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Delivery Notices */
.rb-delivery-notice {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

/* Button Base Styles */
.rb-btn {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* White Button (Readymade) */
.rb-btn-white {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.rb-btn-white:hover {
    background: #f5f5f5;
}

/* Black Button (Tailored) */
.rb-btn-black {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.rb-btn-black:hover {
    background: #333333;
}

/* Gray Button (Accessories/Buy Now) */
.rb-btn-gray {
    background: #6c757d;
    color: #ffffff;
    border: 2px solid #6c757d;
}

.rb-btn-gray:hover {
    background: #5a6268;
}

/* Dual Mode Layout */
.rb-mode-dual {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rb-option-readymade,
.rb-option-tailored {
    padding: 15px;
    border-radius: 6px;
    background: #fff;
}

/* ========================================
   Modal Popup Styles
   ======================================== */

.rb-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.rb-modal-overlay.active {
    display: flex;
}

.rb-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rb-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.rb-modal-close:hover {
    color: #000;
}

.rb-modal-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.rb-modal-body {
    margin-bottom: 20px;
}

.rb-field {
    margin-bottom: 20px;
}

.rb-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.rb-field select,
.rb-field input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.rb-field select:focus,
.rb-field input[type="date"]:focus {
    outline: none;
    border-color: #000;
}

.rb-info-message {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #4caf50;
}

.rb-info-message p {
    margin: 0;
    color: #2e7d32;
    font-weight: 600;
}

.rb-modal-footer {
    text-align: center;
}

.rb-modal-footer .rb-btn {
    margin: 0 auto;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .rb-custom-checkout-wrapper {
        padding: 15px;
    }
    
    .rb-btn {
        font-size: 16px;
        padding: 14px 24px;
    }
    
    .rb-modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .rb-modal-title {
        font-size: 20px;
    }
}

/* ========================================
   Change "Place Order" to "Pay Now"
   ======================================== */

#place_order {
    font-size: 0 !important;
}

#place_order::after {
    content: "Pay Now" !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}

/* ========================================
   Loading State
   ======================================== */

.rb-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.rb-btn.loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}
