/**
 * Spotlights — the tabbed product-page section and its hero quick-nav.
 * Replaces the theme's offer slider (.offer_thumb) and solution tabs
 * (.tabs-allout-wrapper) with one plugin-owned surface.
 *
 * The tab strip + split panel are a 1:1 port of the approved design export
 * (Risk Detection / SoD Management page). Every value here — padding, font
 * size, divider weight, the 2.5px active underline, the 48px split gap — is
 * literal to that export. Do not "tidy" them into round numbers.
 *
 * The strip has THREE responsive states, picked in JS by MEASURING how many
 * rows the tabs would naturally wrap to (see the hidden measurer below), not
 * by a fixed breakpoint alone:
 *   is-row     — fits on one line: centred row with hairline dividers
 *   is-grid    — would wrap to 2 rows, OR viewport < 1024px: uniform grid cells
 *   is-scroll  — would need 3+ rows: horizontal scroll strip with edge fades
 *
 * All rules and design tokens are scoped under the root classes so nothing
 * leaks into the theme, and the tab/button resets defend against BeTheme's
 * global button styling.
 *
 * @package   ALLOut\VideoManager
 * @author    ALLOut Security
 * @copyright 2026 ALLOut Security
 * @license   Proprietary
 */

.allout-vm-spotlights {
    /* Brand tokens, literal to the design export. */
    --avs-red-400: #f0555f;
    --avs-red-500: #e8323f; /* primary brand red */
    --avs-red-600: #d11f2c; /* hover */
    --avs-red-700: #ae1822; /* pressed */
    --avs-navy-700: #14224a;
    --avs-navy-900: #081634;
    --avs-gray-50: #f7f8fb;
    --avs-gray-200: #e3e7ef;
    --avs-gray-500: #7b8499;
    --avs-gray-700: #3e4658;

    --avs-text-body: var(--avs-gray-700);
    --avs-text-muted: var(--avs-gray-500);
    --avs-border-subtle: var(--avs-gray-200);

    --avs-font-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --avs-font-body: 'Mulish', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --avs-radius: 4px;
    --avs-shadow-lg: 0 20px 48px rgba(8, 22, 52, 0.18);

    /* BeTheme styles the bare `button` element (be.css: "Default" block) and
       paints it from these variables — background-color, color, box-shadow, and
       on :hover the -hover pair. Our tabs ARE <button>s, so they were being
       repainted in the theme's button colours (and, because the theme also puts
       a colour transition on every button, they FADED from ours to the theme's
       rather than jumping — the red-then-white the section showed).
       Out-specifying every one of those rules is a losing arms race. Instead we
       redefine the variables they read, scoped to this section: whichever rule
       wins the cascade, it now resolves to the design's colours. */
    --mfn-button-bg: transparent;
    --mfn-button-bg-hover: var(--avs-gray-50);
    --mfn-button-color: var(--avs-navy-700);
    --mfn-button-color-hover: var(--avs-red-600);
    --mfn-button-border-color: transparent;
    --mfn-button-border-color-hover: transparent;
    --mfn-button-border-width: 0;
    --mfn-button-border-radius: 0;
    --mfn-button-box-shadow: none;
    --mfn-button-box-shadow-hover: none;
    --mfn-button-padding: 16px 22px;
    --mfn-button-font-family: var(--avs-font-body);
    --mfn-button-font-size: 15px;
    --mfn-button-font-weight: 700;
    --mfn-button-letter-spacing: normal;

    /* Positioning context for the absolutely-placed hidden measurer. */
    position: relative;
    display: block;
    color: var(--avs-text-body);
    font-family: var(--avs-font-body);
}

/* The export sets border-box globally; the section can't rely on the theme
   doing the same, so it asserts it over its own subtree. */
.allout-vm-spotlights,
.allout-vm-spotlights *,
.allout-vm-spotlights *::before,
.allout-vm-spotlights *::after {
    box-sizing: border-box;
}

/* --- Tab strip ----------------------------------------------------------- */

.allout-vm-spotlights__tabs-block {
    position: relative;
}

.allout-vm-spotlights__tabs-wrap {
    position: relative;
}

.allout-vm-spotlights__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: 1px solid var(--avs-border-subtle);
    margin: 0;
}

.allout-vm-spotlights .allout-vm-spotlights__tab {
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 16px 22px;
    border: none;
    border-right: 1px solid var(--avs-border-subtle);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    /* The theme's button rule sets overflow:hidden, which clips the active
       tab's underline — it sits at bottom:-1px, outside the padding box. */
    overflow: visible;
    font-family: var(--avs-font-body);
    font-weight: 700;
    font-size: 15px;
    /* The export leaves this at the UA default; forcing a ratio here changes the
       cell height. Must stay identical to the measurer below or the row count —
       and therefore the chosen state — is computed against the wrong metrics. */
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    color: var(--avs-navy-700);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    min-height: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.allout-vm-spotlights .allout-vm-spotlights__tab:last-child {
    border-right: none;
}

.allout-vm-spotlights .allout-vm-spotlights__tab:hover,
.allout-vm-spotlights .allout-vm-spotlights__tab:focus-visible {
    color: var(--avs-red-600);
    background: var(--avs-gray-50);
}

/* No background here: the active tab still takes the gray-50 hover wash, as in
   the export. Re-declaring it would out-order :hover and kill that. */
.allout-vm-spotlights .allout-vm-spotlights__tab.is-active {
    color: var(--avs-red-600);
}

.allout-vm-spotlights .allout-vm-spotlights__tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2.5px;
    background: var(--avs-red-500);
}

/* Hidden measurer — the same labels in the same natural wrap flow, used only
   to count how many rows the real strip would need. Never visible, never
   focusable, never hit-tested. */
.allout-vm-spotlights__measure {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.allout-vm-spotlights .allout-vm-spotlights__measure button {
    flex: 0 0 auto;
    margin: 0;
    padding: 16px 22px;
    border: none;
    background: none;
    font-family: var(--avs-font-body);
    font-weight: 700;
    font-size: 15px;
    line-height: normal;
    white-space: nowrap;
}

/* is-grid: uniform cells. JS sets grid-template-columns inline so an even tab
   count always resolves to exactly two rows. */
.allout-vm-spotlights.is-grid .allout-vm-spotlights__nav {
    display: grid;
}

.allout-vm-spotlights.is-grid .allout-vm-spotlights__tab {
    flex: unset;
    white-space: normal;
    text-align: center;
    border-bottom: 1px solid var(--avs-border-subtle);
}

/* is-scroll: single-row horizontal scroll (mobile). */
.allout-vm-spotlights.is-scroll .allout-vm-spotlights__nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.allout-vm-spotlights.is-scroll .allout-vm-spotlights__nav::-webkit-scrollbar {
    display: none;
}

.allout-vm-spotlights.is-scroll .allout-vm-spotlights__tab {
    padding: 13px 16px;
    font-size: 14px;
}

/* Edge fades — revealed by JS in is-scroll only, and only on the side that
   still has content to reach. */
.allout-vm-spotlights__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.allout-vm-spotlights__fade--left {
    left: 0;
    background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.allout-vm-spotlights__fade--right {
    right: 0;
    background: linear-gradient(270deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.allout-vm-spotlights__fade.is-visible {
    opacity: 1;
}

/* Mobile-only hint, directly under the strip. JS shows it only when the strip
   is genuinely scrollable, and fades it after the first swipe. */
.allout-vm-spotlights__hint {
    display: none;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--avs-text-muted);
    margin: 8px 0 0;
    transition: opacity 0.35s ease;
}

.allout-vm-spotlights__hint.is-visible {
    display: block;
}

.allout-vm-spotlights__hint.is-faded {
    opacity: 0.3;
}

/* --- Panels: the split (content left, media right) ------------------------ */

/* Width here comes from the theme's .container that the renderer wraps these in
   — that is the one thing that decides it. The plugin must not add a max-width
   or side padding of its own on top; that is what pushed the panels out of
   alignment before. */
.allout-vm-spotlights__panels {
    width: 100%;
}

.allout-vm-spotlights__panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 36px;
}

.allout-vm-spotlights__panel[hidden] {
    display: none;
}

/* Content-only slides (media = none) span the full width. */
.allout-vm-spotlights__panel--full {
    grid-template-columns: 1fr;
}

.allout-vm-spotlights__content {
    min-width: 0;
}

.allout-vm-spotlights__title {
    font-family: var(--avs-font-display);
    font-weight: 700;
    font-size: 26px;
    line-height: normal;
    color: var(--avs-red-600);
    margin: 0 0 14px;
}

.allout-vm-spotlights__desc {
    color: var(--avs-text-body);
    font-size: 15.5px;
    line-height: 1.65;
}

.allout-vm-spotlights__desc p {
    font-size: 15.5px;
    line-height: 1.65;
    margin: 0;
}

.allout-vm-spotlights__desc p + p {
    margin-top: 14px;
}

/* Slide bullet lists take the export's .points treatment: no markers, a small
   red dot rule, tighter leading than body copy. */
.allout-vm-spotlights__desc ul {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.allout-vm-spotlights__desc ul li {
    position: relative;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--avs-gray-700);
}

.allout-vm-spotlights__desc ul li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--avs-red-500);
}

.allout-vm-spotlights__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 12px 22px;
    border: 2px solid transparent;
    border-radius: var(--avs-radius);
    background: var(--avs-red-500);
    color: #ffffff;
    font-family: var(--avs-font-body);
    font-weight: 700;
    font-size: 14.5px;
    line-height: normal;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.allout-vm-spotlights__button:hover,
.allout-vm-spotlights__button:focus-visible {
    background: var(--avs-red-600);
    color: #ffffff;
    text-decoration: none;
}

.allout-vm-spotlights__button:active {
    background: var(--avs-red-700);
    transform: translateY(1px);
}

/* Media frame — the export's .poster-image: a plain border + shadow, no forced
   height, so a screenshot or a player shows at its own aspect ratio (no crop,
   no letterbox bars). */
/* The frame must NOT clip its overflow. The share control renders inside the
   media (Renderer emits .allout-vm-stage for users who can share) and its menu
   is an absolutely-positioned popover that deliberately escapes the video's
   bounds — overflow:hidden here swallowed it. The corner clipping the frame
   needs is pushed down onto the media itself instead, which is the only thing
   that has corners to clip. */
.allout-vm-spotlights__media {
    position: relative;
    min-width: 0;
    border: 1px solid var(--avs-border-subtle);
    border-radius: var(--avs-radius);
    box-shadow: var(--avs-shadow-lg);
    overflow: visible;
}

.allout-vm-spotlights__media img.allout-vm-spotlights__image,
.allout-vm-spotlights__media .allout-vm-embed-wrapper {
    border-radius: var(--avs-radius);
    overflow: hidden;
}

.allout-vm-spotlights__media img.allout-vm-spotlights__image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

@media (max-width: 980px) {
    .allout-vm-spotlights__panel {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 760px) {
    .allout-vm-spotlights__title {
        font-size: 22px;
    }
}

/* --- Hero quick-nav: dark boxes with a red chevron ------------------------ */

.allout-vm-spotlights-quicknav {
    --avs-navy: #001e47;
    --avs-red: #f03c45;
    display: block;
}

.allout-vm-spotlights-quicknav ul {
    display: flex;
    gap: 15px;
    justify-content: space-evenly;
    list-style: none;
    margin: 0;
    padding: 0;
}

.allout-vm-spotlights-quicknav__item {
    flex: 1;
}

.allout-vm-spotlights-quicknav__item a {
    align-items: center;
    background: rgba(23, 32, 71, 0.6);
    display: flex;
    flex-direction: column;
    height: 110px;
    justify-content: center;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s linear;
}

.allout-vm-spotlights-quicknav__item a:hover,
.allout-vm-spotlights-quicknav__item a:focus-visible {
    background: rgba(23, 32, 71, 1);
    text-decoration: none;
}

.allout-vm-spotlights-quicknav__item h5 {
    color: #ffffff;
    margin: 0 0 6px;
    max-width: 170px;
}

.allout-vm-spotlights-quicknav__chevron {
    color: var(--avs-red);
    font-size: 22px;
    line-height: 1;
}

@media (max-width: 768px) {
    .allout-vm-spotlights-quicknav ul {
        flex-wrap: wrap;
    }

    .allout-vm-spotlights-quicknav__item {
        flex: 0 0 calc(33.33% - 15px);
    }
}

@media (max-width: 480px) {
    .allout-vm-spotlights-quicknav__item {
        flex: 0 0 calc(50% - 15px);
    }
}
