/* =========================================================
   CT Video Bubble - edit the values below to restyle
   Styled to match the floating video card (glow box / video frame)
   ========================================================= */
.ct-vb{
    /* Card */
    --ct-vb-width: 176px;                       /* mobile width (under 640px) */
    --ct-vb-width-lg: 256px;                    /* width from 640px up */
    --ct-vb-offset: 1rem;                       /* distance from right / bottom (mobile) */
    --ct-vb-offset-lg: 24px;                    /* distance from right / bottom (640px up) */
    --ct-vb-radius: 16px;
    --ct-vb-ratio: 16 / 9;
    --ct-vb-bg: rgba(5, 5, 5, .55);             /* video frame background */
    --ct-vb-gold: #f0bb3b;                      /* border, side bar, icon */
    --ct-vb-border: var(--ct-vb-gold);          /* card border (always gold) */
    --ct-vb-ring: #90a1b9;                      /* keyboard focus ring */

    /* Play / pause icon */
    --ct-vb-icon-size: 24px;
    --ct-vb-icon-offset: 8px;                   /* distance from bottom-left corner */

    /* Popup */
    --ct-vb-overlay: rgba(0, 0, 0, .8);              /* page dim colour + opacity */
    --ct-vb-popup-w: 56rem;                          /* popup max width (896px) */
    --ct-vb-popup-bg: #000000;
    --ct-vb-popup-radius: 10px;
    --ct-vb-popup-border: 1px solid rgba(240, 187, 59, .35);  /* thin gold border */
    --ct-vb-close: #f0bb3b;                          /* close (x) colour */
    --ct-vb-close-hover: #ffffff;                    /* close (x) colour on hover */
    --ct-vb-close-size: 40px;                        /* clickable area */
    --ct-vb-close-top: -44px;                        /* above the video, top-right */
    --ct-vb-close-right: 0;
    --ct-vb-z: 99990;

    position: fixed; right: max(var(--ct-vb-offset), env(safe-area-inset-right)); bottom: max(var(--ct-vb-offset), env(safe-area-inset-bottom)); z-index: var(--ct-vb-z);
}
@media (min-width: 640px){ .ct-vb{ right: var(--ct-vb-offset-lg); bottom: var(--ct-vb-offset-lg); } }

/* Card (the button) */
.ct-vb .ct-vb__bubble{ position: relative; display: block; width: var(--ct-vb-width); max-width: calc(100vw - 2rem); height: auto; min-height: 0; margin: 0; padding: 0 !important; overflow: hidden; line-height: 0; font: inherit; text-align: left; text-transform: none; letter-spacing: normal; cursor: pointer; background: var(--ct-vb-bg) !important; border: 1px solid var(--ct-vb-border) !important; border-radius: var(--ct-vb-radius) !important; box-shadow: none; transition: transform .15s; }
@media (min-width: 640px){ .ct-vb .ct-vb__bubble{ width: var(--ct-vb-width-lg); } }

/* Gold bar on the left edge, grows on hover / focus */
.ct-vb .ct-vb__bubble::before{ content: ""; position: absolute; top: 0; bottom: 0; left: 0; z-index: 1; width: 1px; background: var(--ct-vb-gold); transform: scaleY(0); transition: transform .3s; }
.ct-vb .ct-vb__bubble:hover::before, .ct-vb .ct-vb__bubble:focus-visible::before{ transform: scaleY(1); }

/* Hover / focus: card lifts 2px (border stays gold) */
.ct-vb .ct-vb__bubble:hover, .ct-vb .ct-vb__bubble:focus-visible{ transform: translateY(-2px); }

/* Keyboard focus */
.ct-vb .ct-vb__bubble:focus{ outline: none; }
.ct-vb .ct-vb__bubble:focus-visible{ box-shadow: 0 0 0 1px var(--ct-vb-ring); }

/* Preview: full width, natural height */
.ct-vb__media{ position: relative; display: block; overflow: hidden; }
.ct-vb__media{ position: relative; display: block; overflow: hidden; aspect-ratio: var(--ct-vb-ratio); }
.ct-vb__media:empty{ aspect-ratio: 16 / 9; }   /* no preview set */
.ct-vb .ct-vb__preview{ display: block; width: 100%; height: auto; max-width: none; margin: 0; border: 0; }

/* Play / pause icon: small gold circle, bottom-left */
.ct-vb__icon{ position: absolute; left: var(--ct-vb-icon-offset); bottom: var(--ct-vb-icon-offset); z-index: 2; display: flex; align-items: center; justify-content: center; width: var(--ct-vb-icon-size); height: var(--ct-vb-icon-size); border: 1px solid rgba(240, 187, 59, .25); border-radius: 50%; color: rgba(240, 187, 59, .7); transition: scale .3s ease-out, border-color .3s ease-out, color .3s ease-out, opacity .2s; }
.ct-vb__icon svg{ display: block; width: 10px; height: 10px; fill: currentColor; }
.ct-vb__icon--play svg{ margin-left: 2px; }    /* optical centring */
.ct-vb .ct-vb__bubble:hover .ct-vb__icon, .ct-vb .ct-vb__bubble:focus-visible .ct-vb__icon{ border-color: rgba(240, 187, 59, .5); color: rgba(240, 187, 59, .9); }
@media (prefers-reduced-motion: no-preference){ .ct-vb .ct-vb__bubble:hover .ct-vb__icon, .ct-vb .ct-vb__bubble:focus-visible .ct-vb__icon{ scale: 1.05; } }

/* Swap play / pause while the popup is open */
.ct-vb__icon--pause{ opacity: 0; }
.ct-vb.is-open .ct-vb__icon--play{ opacity: 0; }
.ct-vb.is-open .ct-vb__icon--pause{ opacity: 1; }

/* Popup */
.ct-vb-modal{ position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ct-vb-modal[hidden]{ display: none; }
.ct-vb-modal__overlay{ position: absolute; inset: 0; background: var(--ct-vb-overlay); }
.ct-vb-modal__dialog{ position: relative; z-index: 1; width: 100%; max-width: min(var(--ct-vb-popup-w), calc((100dvh - 8rem) * 16 / 9)); aspect-ratio: 16 / 9; margin-top: 44px; overflow: visible; }
.ct-vb-modal__frame{ position: absolute; inset: 0; overflow: hidden; background: var(--ct-vb-popup-bg); border: var(--ct-vb-popup-border) !important; border-radius: var(--ct-vb-popup-radius); box-shadow: none; }
.ct-vb-modal__frame iframe{ position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ct-vb-modal .ct-vb-modal__close{ position: absolute !important; top: var(--ct-vb-close-top) !important; right: var(--ct-vb-close-right) !important; left: auto !important; bottom: auto !important; z-index: 2; display: flex; align-items: center; justify-content: center; width: var(--ct-vb-close-size); height: var(--ct-vb-close-size); margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 6px !important; background: transparent !important; box-shadow: none; color: var(--ct-vb-close) !important; line-height: 0; cursor: pointer; transform: none; transition: color .15s; }
.ct-vb-modal .ct-vb-modal__close svg{ width: 24px; height: 24px; stroke-width: 1.75; }
.ct-vb-modal .ct-vb-modal__close:hover{ color: var(--ct-vb-close-hover) !important; background: transparent !important; }
.ct-vb-modal .ct-vb-modal__close:focus{ outline: none; }
.ct-vb-modal .ct-vb-modal__close:focus-visible{ box-shadow: 0 0 0 1px var(--ct-vb-ring); }
body.ct-vb-open{ overflow: hidden; }

/* To hide on mobile, uncomment: */
/* @media (max-width: 639px){ .ct-vb{ display: none; } } */

@media (prefers-reduced-motion: reduce){
    .ct-vb .ct-vb__bubble, .ct-vb .ct-vb__bubble::before, .ct-vb__icon{ transition: none; }
}