/**
 * MyMallBeauty — Quick View Modal Styles
 *
 * Overlay + centered modal + loading spinner + transitions.
 * Template content uses Tailwind classes (no extra CSS needed).
 *
 * @package MyMallBeauty
 * @since 1.0.0
 */

/* ── Overlay ────────────────────────────────────── */
.mmb-qv-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mmb-qv-overlay.mmb-qv-visible {
    opacity: 1;
    visibility: visible;
}

/* ── Modal ──────────────────────────────────────── */
.mmb-qv-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 301;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.mmb-qv-modal.mmb-qv-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ── Content container ──────────────────────────── */
.mmb-qv-content {
    overflow-y: auto;
    max-height: 90vh;
}

/* ── Close button ───────────────────────────────── */
.mmb-qv-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mmb-qv-close:hover {
    color: #374151;
    background: #f3f4f6;
}

/* ── Loading state ──────────────────────────────── */
.mmb-qv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 16px;
    color: #9ca3af;
    font-size: 14px;
}

.mmb-qv-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #23bac5;
    border-radius: 50%;
    animation: mmb-qv-spin 0.8s linear infinite;
}

@keyframes mmb-qv-spin {
    to { transform: rotate(360deg); }
}

/* ── Loading button state ───────────────────────── */
.mmb-qv-loading-btn {
    pointer-events: none;
    opacity: 0.7;
}

/* ── Mobile responsive ──────────────────────────── */
@media (max-width: 767px) {
    .mmb-qv-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: translateY(100%) scale(1);
    }

    .mmb-qv-modal.mmb-qv-visible {
        transform: translateY(0) scale(1);
    }

    .mmb-qv-content {
        max-height: 100vh;
    }

    .mmb-qv-close {
        top: 8px;
        right: 8px;
    }
}
