/*! vup_2018_child — css/components/faq-widget.css
 * FAQ card with right-side pop-out answers. No JS needed.
 */

/* ----------------------------- CONTAINER HOOK ----------------------------- */
.leftbar,
.sidebar,
.widget-area {
  container-type: inline-size;
  container-name: leftbar;
}

/* ------------------------------- WIDGET ROOT ------------------------------ */
.vu-widget.faq-widget {
  /* PALETTE */
  --c-gold: #ffd900;
  --c-cream: #00ffe1;
  --c-owhite: #00a494;
  --c-dark: #002420;
  --c-black: #000;
  --c-white: #fff;

  /* TYPE */
  --font: var(--vu-system-font);
  --fs-base: clamp(18px, 2.2vw, 22px);

  /* BOX & SPACING */
  --radius: 12px;
  --gap: 8px;

  /* ANSWER PANEL */
  --answer-w: clamp(280px, 35cqi, 420px);
  --answer-offset: 12px;
  --answer-fs: 0.9em;

  /* 0. MAIN ELEMENT (Content Layer) */
  background: transparent;
  border: none;
  box-shadow: none;

  /* Layout */
  position: relative;
  z-index: 10;
  /* Higher than siblings for popouts */
  overflow: visible;
  /* width handled by base */

  padding-top: 14px;
  /* margin handled by base */
  font-family: var(--vu-system-font);
  font-size: var(--fs-base);
}

/* 1. GLASS LAYER (Bottom) */
.vu-widget.faq-widget::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -2;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
  border-radius: calc(var(--radius) + 8px);
  pointer-events: none;
}

/* 2. MAIN COLOR LAYER (Middle) */
.vu-widget.faq-widget::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(135deg, var(--c-owhite, #00a494), #00c4b4);
  border: 4px solid var(--c-dark, #002420);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);

  pointer-events: none;
}

@supports not (container-type: inline-size) {
  .vu-widget.faq-widget {
    --answer-w: clamp(260px, 80vw, 420px);
  }
}

/* ------------------------------- TITLE ----------------------------------- */
.vu-widget.faq-widget .widget-title {
  margin: 0 0 .4em 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.vu-widget.faq-widget .widget-title .faq-title {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1em;
  line-height: 1.1;
  letter-spacing: .01em;
}

/* --------------------------------- LIST ---------------------------------- */
.faq-list {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* kill theme margins that add extra gaps */
.faq-list>li {
  margin: 0 !important;
}

.faq-item {
  position: relative;
}

/* -------------------------------- BUTTONS -------------------------------- */
.faq-q {
  display: block;
  width: 100%;
  background: var(--c-white);
  color: var(--c-black);
  text-decoration: none;
  text-transform: none;
  font-weight: 350;
  font-size: .75em;
  line-height: 1.2;
  letter-spacing: .02em;
  padding: .45em .6em;
  border-radius: 8px;
  border: 0;
  margin: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .55);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
  transform-origin: center;
  text-align: left;
}

.faq-q:hover,
.faq-item:focus-within .faq-q {
  background: var(--c-cream);
  color: var(--c-dark);
  transform: scale(.98);
  outline: 0;
}

/* ---------------------------- POPOUT ANSWERS ------------------------------ */
.faq-a {
  position: absolute;
  top: 0;
  left: calc(100% + var(--answer-offset));
  width: var(--answer-w);
  max-width: min(90vw, var(--answer-w));
  background: var(--c-cream);
  color: var(--c-black);
  border: 3px solid var(--c-black);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .45);
  padding: .75em .9em;
  line-height: 1.35;
  font-size: var(--answer-fs);
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
  z-index: 999;
  pointer-events: none;
}

.faq-a::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 10px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid var(--c-dark);
  filter: drop-shadow(-1px 1px 0 rgba(0, 0, 0, .25));
}

.faq-item:hover .faq-a,
.faq-item:focus-within .faq-a {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: .05s;
}

/* -------------------------- RESPONSIVE (NO FORCED SHOW) ------------------ */
@container leftbar (max-width:340px) {

  /* keep hover behavior; just shrink bubble */
  .faq-a {
    width: min(320px, 70vw);
    max-width: min(90vw, 320px);
  }
}

/* Global viewport fallback */
@media (max-width:980px) {
  .vu-widget.faq-widget {
    --fs-base: clamp(16px, 2.2vw, 18px);
  }
}

/* ----------------------------- REDUCED MOTION ----------------------------- */
@media (prefers-reduced-motion: reduce) {

  .faq-q,
  .faq-a {
    transition: none;
  }
}