/* ============================================================
   Vybe n' Sip — Feature Widgets
   Cookie Consent · Promo Popup · Miro Assistant · Hero Image Swap
   Brand: Purple #4E008E · Yellow #FFC801 · Black #14121A
   ============================================================ */

:root {
    --vybe-purple: #4E008E;
    --vybe-yellow: #FFC801;
    --vybe-black: #14121A;
}

/* ---------- Shared entrance animations ---------- */
@keyframes vybeFadeUp   { from { opacity:0; transform: translateY(24px); } to { opacity:1; transform: translateY(0); } }
@keyframes vybeFadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes vybePopIn    { from { opacity:0; transform: scale(.92) translateY(10px); } to { opacity:1; transform: scale(1) translateY(0); } }
@keyframes vybePulse    { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ============================================================
   1. HERO — floating product image cross-fade
   ============================================================ */
.vybe-hero-prod { transition: opacity .7s ease, transform .7s ease; will-change: opacity, transform; }
.vybe-hero-prod.is-swapping { opacity: 0; transform: scale(.9); }

/* ============================================================
   2. COOKIE CONSENT BANNER
   ============================================================ */
#vybeCookieBar {
    position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
    width: min(940px, calc(100% - 32px)); z-index: 99990;
    background: #ffffff; border: 1px solid rgba(78,0,142,.18);
    border-radius: 22px; box-shadow: 0 18px 50px rgba(20,18,26,.22);
    padding: 20px 22px; display: none;
    animation: vybeFadeUp .5s ease both;
}
#vybeCookieBar.is-visible { display: flex; }
#vybeCookieBar { gap: 18px; align-items: center; flex-wrap: wrap; }
#vybeCookieBar .vybe-cc-icon {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
    background: rgba(78,0,142,.08); color: var(--vybe-purple);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
#vybeCookieBar .vybe-cc-text { flex: 1 1 320px; min-width: 240px; }
#vybeCookieBar .vybe-cc-text h4 { font-weight: 700; color: var(--vybe-black); font-size: 15px; margin: 0 0 4px; }
#vybeCookieBar .vybe-cc-text p  { font-size: 13px; color: #5b5766; margin: 0; line-height: 1.5; }
#vybeCookieBar .vybe-cc-text a  { color: var(--vybe-purple); text-decoration: underline; }
#vybeCookieBar .vybe-cc-actions { flex: 0 0 auto; display: flex; gap: 10px; flex-wrap: wrap; }

.vybe-btn { font-weight: 700; font-size: 13px; letter-spacing:.02em; border-radius: 999px;
    padding: 11px 22px; cursor: pointer; border: 0; transition: all .2s ease; white-space: nowrap; }
.vybe-btn-primary { background: var(--vybe-purple); color: #fff; }
.vybe-btn-primary:hover { background: var(--vybe-yellow); color: var(--vybe-black); }
.vybe-btn-ghost { background: #f3f0f7; color: #40384d; }
.vybe-btn-ghost:hover { background: #e7e0f0; }

/* Manage panel */
#vybeCookieManage {
    position: fixed; inset: 0; z-index: 99995; display: none;
    align-items: center; justify-content: center; padding: 16px;
    background: rgba(20,18,26,.55); backdrop-filter: blur(3px);
    animation: vybeFadeIn .25s ease both;
}
#vybeCookieManage.is-visible { display: flex; }
#vybeCookieManage .vybe-cm-card {
    background: #fff; border-radius: 24px; width: min(520px, 100%);
    box-shadow: 0 24px 60px rgba(0,0,0,.25); padding: 30px; animation: vybePopIn .3s ease both;
}
#vybeCookieManage h3 { margin: 0 0 4px; font-size: 20px; color: var(--vybe-black); }
.vybe-cm-sub { font-size: 13px; color: #6d6878; margin: 0 0 20px; }
.vybe-cm-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.vybe-cm-row h5 { margin: 0 0 2px; font-size: 14px; color: var(--vybe-black); }
.vybe-cm-row p  { margin: 0; font-size: 12px; color: #736e80; }

/* Switch toggle */
.vybe-switch { position: relative; width: 44px; height: 24px; flex: 0 0 44px; display: inline-block; }
.vybe-switch input { opacity: 0; width: 0; height: 0; }
.vybe-switch span {
    position: absolute; inset: 0; background: #ddd8e6; border-radius: 999px; transition: .25s ease; cursor: pointer;
}
.vybe-switch span::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: .25s ease; box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.vybe-switch input:checked + span { background: var(--vybe-purple); }
.vybe-switch input:checked + span::before { transform: translateX(20px); }
.vybe-switch input:disabled + span { opacity: .6; cursor: not-allowed; }

/* ============================================================
   3. PROMO POPUP
   ============================================================ */
#vybePromoPopup {
    position: fixed; inset: 0; z-index: 99980; display: none;
    align-items: center; justify-content: center; padding: 16px;
    background: rgba(20,18,26,.62); backdrop-filter: blur(4px);
    animation: vybeFadeIn .3s ease both;
}
#vybePromoPopup.is-visible { display: flex; }
#vybePromoPopup .vybe-pp-card {
    position: relative; width: min(460px, 100%); background: #fff;
    border-radius: 28px; overflow: hidden;
    box-shadow: 0 30px 80px rgba(78,0,142,.35); animation: vybePopIn .35s ease both;
    border: 2px solid rgba(250,224,60,.5);
}
#vybePromoPopup .vybe-pp-close {
    position: absolute; top: 14px; right: 14px; z-index: 5;
    width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255,255,255,.9); color: #555; font-size: 16px; line-height: 1;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
#vybePromoPopup .vybe-pp-close:hover { background: var(--vybe-yellow); color: var(--vybe-black); }
#vybePromoPopup .vybe-pp-media {
    background: linear-gradient(135deg, var(--vybe-purple), #7a1fbf);
    padding: 26px; display: flex; align-items: center; justify-content: center; min-height: 170px;
}
#vybePromoPopup .vybe-pp-media img { max-height: 190px; width: auto; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0,0,0,.3)); }
#vybePromoPopup .vybe-pp-body { padding: 26px 28px 30px; text-align: center; }
#vybePromoPopup .vybe-pp-hook {
    display: inline-block; background: var(--vybe-yellow); color: var(--vybe-black);
    font-weight: 800; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    padding: 5px 14px; border-radius: 999px; margin-bottom: 12px;
}
#vybePromoPopup .vybe-pp-body h3 { font-size: 26px; font-weight: 800; color: var(--vybe-black); margin: 0 0 10px; line-height: 1.15; }
#vybePromoPopup .vybe-pp-body p  { font-size: 14px; color: #66616f; margin: 0 0 22px; line-height: 1.55; }
#vybePromoPopup .vybe-pp-cta {
    display: block; width: 100%; padding: 15px; border-radius: 999px;
    background: var(--vybe-purple); color: #fff; font-weight: 800; font-size: 13px;
    letter-spacing: .06em; text-transform: uppercase; text-decoration: none; transition: all .2s ease;
    box-shadow: 0 10px 26px rgba(78,0,142,.35);
}
#vybePromoPopup .vybe-pp-cta:hover { background: var(--vybe-yellow); color: var(--vybe-black); }
button.vybe-pp-cta { width: 100%; border: 0; cursor: pointer; }

/* ---- Two-column email-capture (newsletter / coupon) ---- */
#vybePromoPopup.is-capture .vybe-pp-card.vybe-pp-split {
    width: min(780px, 100%); display: flex; text-align: left; border-color: rgba(78,0,142,.15);
}
.vybe-pp-split-body { flex: 1 1 52%; padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.vybe-pp-split-body h3 { font-size: 27px; font-weight: 800; color: var(--vybe-black); margin: 0 0 8px; line-height: 1.15; }
.vybe-pp-split-body .vybe-pp-hook { align-self: flex-start; }
.vybe-pp-sub  { font-size: 14px; color: #4d4857; margin: 0 0 4px; line-height: 1.5; }
.vybe-pp-fine { font-style: italic; font-size: 12px; color: #8a8594; margin: 0 0 18px; line-height: 1.45; }
.vybe-pp-form { margin-top: 6px; }
.vybe-pp-form input {
    width: 100%; border: 1px solid #d8d2e2; border-radius: 12px; padding: 13px 16px;
    font-size: 14px; margin-bottom: 11px; font-family: inherit; color: #2c2836; background: #fff;
}
.vybe-pp-form input:focus { outline: none; border-color: var(--vybe-purple); box-shadow: 0 0 0 3px rgba(78,0,142,.1); }
.vybe-pp-msg { font-size: 12.5px; margin: 10px 2px 0; min-height: 16px; }
.vybe-pp-msg.is-ok  { color: #157347; }
.vybe-pp-msg.is-err { color: #c02626; }
.vybe-pp-split-media { flex: 1 1 48%; background-size: cover; background-position: center; min-height: 360px; }

@media (max-width: 640px) {
    #vybePromoPopup.is-capture .vybe-pp-card.vybe-pp-split { flex-direction: column; max-height: 92vh; overflow-y: auto; }
    .vybe-pp-split-media { order: -1; min-height: 150px; flex-basis: 150px; }
    .vybe-pp-split-body { padding: 26px 22px; }
    .vybe-pp-split-body h3 { font-size: 23px; }
}

/* ============================================================
   4. MIRO — floating website assistant
   ============================================================ */
#vybeMiroLauncher {
    position: fixed; right: 22px; bottom: 22px; z-index: 99998;
    display: flex; align-items: center; gap: 4px;
    background: var(--vybe-purple); color: #fff; border: 0;
    padding: 6px 8px 6px 8px; border-radius: 999px;
    box-shadow: 0 14px 34px rgba(78,0,142,.4); transition: all .25s ease;
    font-weight: 500; font-size: 14px;
}
#vybeMiroLauncher:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(78,0,142,.5); }
.vybe-miro-main-btn {
    display: flex; align-items: center; gap: 9px;
    background: transparent; border: 0; color: inherit; cursor: pointer;
    padding: 6px 10px 6px 6px; border-radius: 999px; font-family: inherit; font-size: inherit; font-weight: inherit;
    position: relative;
}
.vybe-miro-dismiss-x {
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.18); hover: background: rgba(255,255,255,0.35);
    border: 0; color: #fff; width: 22px; height: 22px; border-radius: 50%;
    cursor: pointer; font-size: 14px; line-height: 1; transition: all 0.2s ease;
    margin-right: 2px;
}
.vybe-miro-dismiss-x:hover {
    background: rgba(255,255,255,0.38);
    transform: scale(1.1);
}
#vybeMiroLauncher .vybe-miro-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--vybe-yellow);
    color: var(--vybe-purple); display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 15px; flex-shrink: 0;
}
#vybeMiroLauncher .vybe-miro-ping {
    position: absolute; top: 3px; left: 32px; width: 11px; height: 11px;
    background: var(--vybe-yellow); border: 2px solid #fff; border-radius: 50%; animation: vybePulse 1.8s infinite;
}
#vybeMiroLauncher.is-hidden { transform: scale(0) !important; opacity: 0 !important; pointer-events: none !important; display: none !important; }
#vybeMiroLauncher.is-dismissed { transform: scale(0) !important; opacity: 0 !important; pointer-events: none !important; display: none !important; }

#vybeMiroPanel {
    position: fixed; right: 22px; bottom: 22px; z-index: 99999;
    width: min(380px, calc(100% - 32px)); height: min(600px, calc(100% - 60px));
    background: #fff; border-radius: 24px; overflow: hidden; display: none;
    flex-direction: column; box-shadow: 0 26px 70px rgba(20,18,26,.34);
    animation: vybePopIn .3s ease both;
}
#vybeMiroPanel.is-open { display: flex; }
.vybe-miro-head {
    background: linear-gradient(135deg, var(--vybe-purple), #6d16a8); color: #fff;
    padding: 18px 20px; display: flex; align-items: center; gap: 12px;
}
.vybe-miro-head .vybe-miro-avatar {
    width: 42px; height: 42px; border-radius: 50%; background: var(--vybe-yellow);
    color: var(--vybe-purple); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px;
}
.vybe-miro-head h4 { margin: 0; font-size: 16px; font-weight: 800; }
.vybe-miro-head p  { margin: 1px 0 0; font-size: 11.5px; opacity: .85; }
.vybe-miro-head .vybe-miro-x { margin-left: auto; background: rgba(255,255,255,.15); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.vybe-miro-head .vybe-miro-x:hover { background: rgba(255,255,255,.3); }

.vybe-miro-body { flex: 1; overflow-y: auto; padding: 18px; background: #faf9fc; }
.vybe-miro-msg { display: flex; gap: 8px; margin-bottom: 14px; animation: vybeFadeUp .3s ease both; }
.vybe-miro-msg .vybe-miro-bubble {
    max-width: 82%; padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.5;
}
.vybe-miro-msg.bot .vybe-miro-bubble  { background: #fff; color: #2c2836; border: 1px solid #ece7f3; border-bottom-left-radius: 5px; }
.vybe-miro-msg.user { justify-content: flex-end; }
.vybe-miro-msg.user .vybe-miro-bubble { background: var(--vybe-purple); color: #fff; border-bottom-right-radius: 5px; }
.vybe-miro-mini-avatar { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--vybe-yellow); color: var(--vybe-purple); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; }

.vybe-miro-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px 36px; }
.vybe-miro-chip {
    background: #fff; border: 1.5px solid rgba(78,0,142,.25); color: var(--vybe-purple);
    font-weight: 700; font-size: 12.5px; padding: 9px 14px; border-radius: 999px; cursor: pointer; transition: all .18s ease;
}
.vybe-miro-chip:hover { background: var(--vybe-purple); color: #fff; }

.vybe-miro-form { margin: 4px 0 16px 36px; background:#fff; border:1px solid #ece7f3; border-radius:16px; padding:14px; }
.vybe-miro-form input, .vybe-miro-form textarea {
    width: 100%; border: 1px solid #ddd6e6; border-radius: 10px; padding: 10px 12px;
    font-size: 13px; margin-bottom: 9px; font-family: inherit; color:#2c2836;
}
.vybe-miro-form input:focus, .vybe-miro-form textarea:focus { outline: none; border-color: var(--vybe-purple); }
.vybe-miro-form textarea { resize: vertical; min-height: 70px; }
.vybe-miro-form button { width: 100%; }

.vybe-miro-foot { padding: 10px 14px; text-align: center; font-size: 10.5px; color: #a29bb0; border-top: 1px solid #eee; background:#fff; }
.vybe-miro-foot b { color: var(--vybe-purple); }

/* ============================================================
   SAFETY NET — force widgets above everything and on-screen
   (overrides any late CDN / translate-bar / theme stacking)

   Z-index hierarchy (lowest → highest):
   Promo Popup (99980) → Cookie Bar (99990) → Cookie Manage (99995) → Miro Launcher (99999) → Miro Panel (100000)
   ============================================================ */
#vybePromoPopup  { z-index: 99980 !important; position: fixed !important; inset: 0 !important; }
#vybePromoPopup.is-visible { display: flex !important; }
#vybeCookieBar   { z-index: 99990 !important; position: fixed !important; }
#vybeCookieBar.is-visible { display: flex !important; visibility: visible !important; opacity: 1 !important; }
#vybeCookieManage { z-index: 99995 !important; position: fixed !important; inset: 0 !important; }
#vybeCookieManage.is-visible { display: flex !important; }

#vybeMiroLauncher { z-index: 99999 !important; display: flex !important; visibility: visible !important; opacity: 1 !important; right: 22px !important; bottom: 22px !important; position: fixed !important; pointer-events: auto !important; }
#vybeMiroLauncher.is-hidden { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }
#vybeMiroLauncher.is-dismissed { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }
#vybeMiroPanel   { z-index: 100000 !important; position: fixed !important; right: 22px !important; bottom: 22px !important; }
#vybeMiroPanel.is-open { display: flex !important; }

/* Mobile Miro: Hidden by default, shifted above sticky footbar to avoid overlap */
@media (max-width: 768px) {
    #vybeMiroLauncher { display: none !important; visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }
    #vybeMiroPanel {
        right: 12px !important;
        left: 12px !important;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        max-width: calc(100% - 24px) !important;
        height: auto !important;
        max-height: calc(100vh - 96px - env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 20px !important;
    }
}

/* Keep all feature widget font weights at 500 or below */
#vybeCookieBar *,
#vybeCookieManage *,
#vybePromoPopup *,
#vybeMiroLauncher, #vybeMiroLauncher *,
#vybeMiroPanel, #vybeMiroPanel * {
    font-weight: 500 !important;
}
