/**
 * ASQ Content Gate Styles - CSS Classes Version for Elementor
 * Prevents flash of incorrect content
 */

/* CRITICAL: Hide all gated buttons by default to prevent flash */
.asq-btn-preview,
.asq-btn-join,
.asq-btn-view {
    display: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show buttons with fade-in effect when JavaScript enables them */
.asq-btn-preview.asq-visible,
.asq-btn-join.asq-visible,
.asq-btn-view.asq-visible {
    display: inline-block !important;
    opacity: 1;
}

/* For Elementor Button Widget - ensure proper display */
.elementor-button.asq-btn-preview.asq-visible,
.elementor-button.asq-btn-join.asq-visible,
.elementor-button.asq-btn-view.asq-visible {
    display: inline-flex !important; /* Elementor uses flex */
}

/* Loading state for the entire page while checking membership */
body.asq-checking-membership .asq-btn-preview,
body.asq-checking-membership .asq-btn-join,
body.asq-checking-membership .asq-btn-view {
    pointer-events: none;
}

/* Optional: Loading spinner container */
.asq-loading-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0065b3;
    border-radius: 50%;
    animation: asq-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes asq-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Member badge styling (optional) */
.asq-member-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ensure Elementor buttons maintain their styling */
.elementor-button.asq-btn-preview,
.elementor-button.asq-btn-join,
.elementor-button.asq-btn-view {
    /* Preserve Elementor's button styling */
    align-items: center;
    justify-content: center;
}