/**
 * Smart CTA — Popup Styles
 * Fast & Responsive.
 */

/* 1. Overlay & Container */
.smartcta-pop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    
    /* Default State: Hidden */
    display: none !important; 
    opacity: 0;
    
    align-items: center;
    justify-content: center;
    padding: 16px;
    
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    
    /* Faster Transition (0.15s) */
    transition: opacity 0.15s ease;
}

/* 2. Open State */
.smartcta-pop.is-open {
    display: flex !important;
    opacity: 1;
}

/* 3. Modal Dialog */
.smartcta-pop__dialog {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    
    background-color: var(--sc-bg, #ffffff);
    color: var(--sc-text, #1e293b);
    
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    
    /* Faster Entry Animation */
    transform: translateY(10px) scale(0.98);
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.smartcta-pop.is-open .smartcta-pop__dialog {
    transform: translateY(0) scale(1);
}

/* 4. Close Button */
.smartcta-pop__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    z-index: 1000; 
    
    border: none;
    background: rgba(0,0,0,0.05);
    color: inherit;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
    
    /* Remove mobile tap delay */
    touch-action: manipulation;
}

.smartcta-pop__close:hover {
    background-color: rgba(0,0,0,0.15);
}

/* 5. Theme Overrides */
.smartcta-pop[class*="--theme-navy"] .smartcta-pop__dialog,
.smartcta-pop[class*="--theme-black"] .smartcta-pop__dialog,
.smartcta-pop[class*="--theme-slate"] .smartcta-pop__dialog,
.smartcta-pop[class*="--theme-glass"] .smartcta-pop__dialog {
    color: #ffffff !important;
}

.smartcta-pop[class*="--theme-navy"] .smartcta-pop__close,
.smartcta-pop[class*="--theme-black"] .smartcta-pop__close {
    color: #ffffff !important;
    background: rgba(255,255,255,0.1);
}

/* 6. Content */
.smartcta-pop__title { margin: 0 0 15px 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: inherit; }
.smartcta-pop__body { margin: 0 0 25px 0; font-size: 1rem; line-height: 1.6; color: inherit; opacity: 0.9; }

/* 7. Media & Button */
.smartcta-pop__media { margin-bottom: 20px; border-radius: 8px; overflow: hidden; }
.smartcta-pop__media img { display: block; width: 100%; height: auto; }
.smartcta-pop__video-wrap { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.smartcta-pop__video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.smartcta-pop__btn {
    display: inline-flex;
    padding: 12px 32px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    background-color: var(--sc-btn-bg, #3b82f6);
    color: var(--sc-btn-text, #ffffff) !important;
    transition: transform 0.1s;
}
.smartcta-pop__btn:hover { transform: translateY(-1px); background-color: var(--sc-btn-hover, #2563eb); }