/* =============================================
   KROXIA V4 — CONVERSION ELEMENTS CSS
   WhatsApp Float, Mobile CTA Bar, Sticky CTA,
   Popup System
   ============================================= */

/* ---- WHATSAPP FLOATING BUTTON ---- */
.kroxia-whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 9990;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}
.kroxia-whatsapp-float:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
    color: #fff;
}
.kroxia-whatsapp-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    animation: waPulse 2s ease-out infinite;
}
.kroxia-whatsapp-float svg { position: relative; z-index: 1; }
@keyframes waPulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}
.whatsapp-tooltip {
    position: absolute;
    right: 68px;
    background: #1e293b;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right: none;
    border-left-color: #1e293b;
}
.kroxia-whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }

/* ---- MOBILE STICKY CTA BAR ---- */
.kroxia-mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9980;
    background: var(--kroxia-dark, #0f172a);
    padding: 10px 16px;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
@media (max-width: 768px) {
    .kroxia-mobile-cta-bar { display: flex; }
    .kroxia-whatsapp-float { bottom: 82px; }
}
.mobile-cta-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    flex: 0 0 auto;
    transition: background 0.2s;
}
.mobile-cta-call:hover { background: rgba(255,255,255,0.15); color: #fff; }
.mobile-cta-quote {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

/* ---- STICKY CTA BANNER ---- */
.kroxia-sticky-cta {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9970;
    background: linear-gradient(135deg, var(--kroxia-primary, #f97316), #ea580c);
    color: #fff;
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
}
.kroxia-sticky-cta.is-visible { display: flex; }
.sticky-cta-text {
    font-weight: 600;
    font-size: 0.95rem;
}
.sticky-cta-close {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color 0.2s;
}
.sticky-cta-close:hover { color: #fff; }

/* ---- POPUP SYSTEM ---- */
.kroxia-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.kroxia-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.kroxia-popup {
    background: var(--kroxia-white, #fff);
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    position: relative;
    overflow: hidden;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}
[data-theme="dark"] .kroxia-popup {
    background: var(--kroxia-dark-card, #1a2035);
}
.kroxia-popup-overlay.is-open .kroxia-popup {
    transform: translateY(0) scale(1);
}
.kroxia-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: rgba(0,0,0,0.06);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--kroxia-gray-600, #475569);
    transition: all 0.2s;
}
.kroxia-popup-close:hover {
    background: rgba(0,0,0,0.12);
    color: var(--kroxia-dark, #0f172a);
}
.popup-inner {
    display: flex;
    gap: 24px;
    padding: 40px;
    align-items: flex-start;
}
.popup-image img {
    width: 120px;
    border-radius: 12px;
    object-fit: cover;
}
.popup-icon {
    font-size: 3rem;
    flex-shrink: 0;
    margin-top: 4px;
}
.popup-content { flex: 1; }
.popup-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
    color: var(--kroxia-dark, #0f172a);
}
[data-theme="dark"] .popup-title { color: #fff; }
.popup-subtitle {
    color: var(--kroxia-gray-600, #475569);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 16px;
}
[data-theme="dark"] .popup-subtitle { color: rgba(255,255,255,0.65); }
.popup-trust {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.popup-trust span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--kroxia-gray-500, #64748b);
    background: var(--kroxia-gray-100, #f1f5f9);
    padding: 4px 10px;
    border-radius: 20px;
}
.popup-cta {
    width: 100%;
    justify-content: center;
    margin-bottom: 12px;
}
.popup-dismiss {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--kroxia-gray-400, #94a3b8);
    font-size: 0.82rem;
    cursor: pointer;
    text-align: center;
    padding: 4px;
    transition: color 0.2s;
}
.popup-dismiss:hover { color: var(--kroxia-gray-600, #475569); }

/* Newsletter popup variant */
.kroxia-popup--newsletter .popup-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.kroxia-popup--newsletter .popup-icon { margin: 0 0 12px; }
.popup-nl-form { width: 100%; margin-top: 4px; }
.popup-nl-input-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.popup-nl-input-wrap input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--kroxia-gray-200, #e2e8f0);
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    background: var(--kroxia-white, #fff);
    color: var(--kroxia-dark, #0f172a);
}
.popup-nl-input-wrap input:focus { border-color: var(--kroxia-primary, #f97316); }
.popup-nl-input-wrap .btn-primary {
    white-space: nowrap;
    padding: 12px 20px;
    border-radius: 10px;
}
.popup-privacy {
    font-size: 0.78rem;
    color: var(--kroxia-gray-400, #94a3b8);
    margin: 0;
}

@media (max-width: 480px) {
    .popup-inner { padding: 28px 20px; flex-direction: column; }
    .popup-image { display: none; }
    .popup-nl-input-wrap { flex-direction: column; }
}
