/* ============================================
   Product Order Notes & AJAX Cart - Styles
   ============================================ */

/* ----- Order Note Field ----- */
.product-order-note-wrapper {
    width: 100%;
    order: 2;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

.product-order-note-wrapper label {
    display: inline-block;
    font-weight: 800;
    font-size: 16px;
    color: #000;
    white-space: nowrap;
    margin-bottom: 0;
}

.product-order-note-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.product-order-note-input:focus {
    outline: none;
    border-color: #555;
}

/* ----- AJAX Cart Popup ----- */

/* Full-screen container (hidden by default) */
.ajax-cart-popup {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

/* Visible state */
.ajax-cart-popup.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Dark overlay — visual only, not clickable */
.ajax-cart-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    animation: fadeIn 0.3s ease;
}

/* Centered white card */
.ajax-cart-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
    z-index: 1000000;
}

/* Title */
.ajax-cart-popup-title {
    font-size: 18px;
    font-weight: 400;
    color: #333;
    margin: 0 0 20px;
}

/* Buttons container */
.ajax-cart-popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Shared button base */
.ajax-cart-btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 140px;
}

/* Continue shopping — light gray */
.ajax-cart-btn-continue {
    background-color: #f3f3f3;
    color: #000;
    border: none;
}

.ajax-cart-btn-continue:hover {
    background-color: #e5e5e5;
    color: #000;
}

/* Proceed to checkout — solid black */
.ajax-cart-btn-checkout {
    background-color: #000;
    color: #fff;
    border: none;
}

.ajax-cart-btn-checkout:hover {
    background-color: #333;
    color: #fff;
}

/* Prevent body scroll when popup is open */
body.ajax-cart-popup-open {
    overflow: hidden !important;
}

/* Loading state for add to cart button */
button.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ----- Animations ----- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .ajax-cart-popup-content {
        padding: 25px 20px;
        width: 95%;
    }

    .ajax-cart-popup-title {
        font-size: 16px;
    }

    .ajax-cart-popup-buttons {
        flex-direction: column;
    }

    .ajax-cart-btn {
        width: 100%;
        min-width: auto;
    }

    .product-order-note-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .product-order-note-input {
        width: 100%;
    }
}