/**
 * Smart CTA — Frontend Styles
 */

/* 1. Shared Variables */
.smartcta, .smartcta-pop {
    --sc-btn-bg: #3b82f6;
    --sc-btn-text: #ffffff;
    --sc-btn-hover: #2563eb;
    --sc-subtext: rgba(255, 255, 255, 0.9);
}

/* 2. Base Container */
.smartcta {
    --sc-bg: #1e293b;
    --sc-text: #ffffff;
    position: relative;
    box-sizing: border-box;
    width: var(--sc-width, 320px);
    max-width: 100%;
    padding: 24px;
    background-color: var(--sc-bg);
    color: var(--sc-text);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
    line-height: 1.5;
    z-index: 9999;
}

/* 3. Floating Logic */
.smartcta--floating {
    position: fixed;
    z-index: 99990; /* Behind Popup (100000) */
    margin: 0;
    will-change: transform, opacity;
    animation: smartcta-slide-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* NUCLEAR OPTION: Force hide instantly if body has the open class */
body.smartcta-has-popup-open .smartcta--floating {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.smartcta--pos-br { bottom: var(--sc-offset-y, 20px); right: var(--sc-offset-x, 20px); }
.smartcta--pos-bl { bottom: var(--sc-offset-y, 20px); left: var(--sc-offset-x, 20px); }
@keyframes smartcta-slide-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 4. Content & Elements */
/* INCREASED FONT SIZES HERE */
.smartcta__headline { 
    margin: 0 0 8px 0 !important; 
    font-size: 1.375rem !important; /* ~22px */
    font-weight: 700 !important; 
    color: inherit !important; 
    line-height: 1.3 !important; 
}

.smartcta__subtext { 
    margin: 0 0 20px 0 !important; 
    font-size: 1.125rem !important; /* ~18px */
    color: var(--sc-subtext) !important; 
}

.smartcta__dismiss {
    position: absolute; top: 8px; right: 8px; background: transparent; border: none; color: currentColor; opacity: 0.5; cursor: pointer; padding: 4px; border-radius: 50%;
}
.smartcta__dismiss:hover { background-color: rgba(255,255,255,0.1); opacity: 1; }

/* 5. Buttons */
.smartcta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px; /* Increased Padding */
    box-sizing: border-box;
    background-color: var(--sc-btn-bg) !important;
    color: var(--sc-btn-text) !important;
    font-weight: 700;
    
    /* Increased Base Font Size */
    font-size: 1.1rem; /* Was 0.95rem */
    
    text-decoration: none !important;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.smartcta__btn:hover { transform: translateY(-2px); background-color: var(--sc-btn-hover) !important; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }

/* Shapes & Sizes */
.smartcta--shape-pill .smartcta__btn { border-radius: 9999px; }
.smartcta--shape-sharp .smartcta__btn { border-radius: 2px; }

/* Increased Size Modifiers */
.smartcta--size-lg .smartcta__btn { 
    padding: 18px 30px; 
    font-size: 1.25rem; /* Was 1.1rem */
}
.smartcta--size-jumbo .smartcta__btn { 
    padding: 22px 36px; 
    font-size: 1.5rem;  /* Was 1.25rem */
    letter-spacing: 0.5px; 
}

/* Icon & Micro */
.smartcta__icon { display: inline-block; margin-left: 8px; transition: transform 0.2s; }
.smartcta__btn:hover .smartcta__icon { transform: translateX(3px); }
.smartcta__micro { display: block; font-size: 0.85rem; margin-top: 8px; opacity: 0.9; line-height: 1.2; }

/* Themes & Colors */
.smartcta--theme-white { --sc-bg: #ffffff; --sc-text: #1e293b; --sc-subtext: #64748b; border: 1px solid #e2e8f0; }
.smartcta--theme-black { --sc-bg: #000000; --sc-text: #ffffff; --sc-subtext: #9ca3af; }
.smartcta--theme-glass { --sc-bg: rgba(15, 23, 42, 0.7); --sc-text: #ffffff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); }

.smartcta--color-blue { --sc-btn-bg: #3b82f6; --sc-btn-hover: #2563eb; --sc-btn-text: #ffffff; }
.smartcta--color-green { --sc-btn-bg: #10b981; --sc-btn-hover: #059669; --sc-btn-text: #ffffff; }
.smartcta--color-red { --sc-btn-bg: #ef4444; --sc-btn-hover: #dc2626; --sc-btn-text: #ffffff; }
.smartcta--color-orange { --sc-btn-bg: #f59e0b; --sc-btn-hover: #d97706; --sc-btn-text: #111827; }

.smartcta--style-outline .smartcta__btn { background: transparent !important; border: 2px solid var(--sc-btn-bg); color: var(--sc-btn-bg) !important; box-shadow: none; }
.smartcta--style-outline .smartcta__btn:hover { background: var(--sc-btn-bg) !important; color: var(--sc-btn-text) !important; }

/* Animations */
@keyframes sc-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes sc-glow { 0% { box-shadow: 0 0 5px var(--sc-btn-bg); } 50% { box-shadow: 0 0 20px var(--sc-btn-bg); } 100% { box-shadow: 0 0 5px var(--sc-btn-bg); } }
.smartcta--attention-pulse .smartcta__btn { animation: sc-pulse 2s infinite; }
.smartcta--attention-glow .smartcta__btn { animation: sc-glow 2s infinite; }

@media (max-width: 480px) {
    .smartcta--floating { width: calc(100% - 32px); left: 16px !important; right: 16px !important; bottom: 16px !important; top: auto !important; }
}