/* File: faq-schema-builder/assets/public/layouts/accordion.css */

.fsb-acc {
  display: grid;
  gap: 12px;
  counter-reset: fsb;
}

.fsb-acc__item {
  border: 1px solid rgba(47, 61, 143, 0.1);
  border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
  transition: background 220ms ease, border-color 220ms ease,
    box-shadow 220ms ease, transform 220ms ease;
}

.fsb-acc__item:hover {
  border-color: rgba(47, 61, 143, 0.2);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.fsb-acc__heading {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  font-weight: unset !important;
}

.fsb-acc__q {
  position: relative;
  width: 100%;
  text-align: left;
  border: 0;
  background: white;
  cursor: pointer;
  margin-bottom: 0px !important;
  padding: 16px 56px 16px 18px;
  font-size: 16px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: unset !important;
  transition: background 0.18s ease, color 0.18s ease;
  color: black;
}

.fsb-acc__q::before {
  content: counter(fsb) ".";
  counter-increment: fsb;
  color: black;
}

.fsb-acc__q::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%) rotate(0deg);
  border-radius: 999px;
  background: black;
  border: 1px solid rgba(47, 61, 143, 0.16);
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0);
  clip-path: polygon(35% 40%, 50% 58%, 65% 40%, 72% 48%, 50% 70%, 28% 48%);
  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}

.fsb-acc__q:hover,
.fsb-acc__q:focus {
  background: var(--fsb-open-bg, #f0f5ff) !important;
  opacity: 0.95;
  color: var(--fsb-open-text, #fff) !important;
}

.fsb-acc__q:hover::before,
.fsb-acc__q:focus::before {
  color: var(--fsb-open-text, #fff) !important;
}

.fsb-acc__q:hover::after,
.fsb-acc__q:focus::after {
  background: var(--fsb-open-text, #fff) !important;
}

.fsb-acc__item.is-open {
  border-color: rgba(47, 61, 143, 0.18);
}

.fsb-acc__item.is-open .fsb-acc__q {
  background: var(--fsb-open-bg, #2563eb);
  color: var(--fsb-open-text, #fff);
}

.fsb-acc__item.is-open .fsb-acc__q::before {
  color: var(--fsb-open-text, #fff);
}

.fsb-acc__item.is-open .fsb-acc__q::after {
  background: white;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%) rotate(180deg);
}

/* Panel smooth */
.fsb-acc__a {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-2px);
  transition: max-height 280ms ease, opacity 200ms ease, transform 200ms ease;
  will-change: max-height, opacity, transform;
  background: #fff;
}

.fsb-acc__item.is-open .fsb-acc__a {
  opacity: 1;
  transform: translateY(0);
  /* max-height set by JS inline */
}

.fsb-acc__a > *:first-child {
  margin-top: 10px;
}
.fsb-acc__a > *:last-child {
  margin-bottom: 10px;
}

.fsb-acc__q:focus-visible {
  outline: 3px solid rgba(47, 61, 143, 0.25);
  outline-offset: 2px;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .fsb-acc__q {
    padding: 12px 52px 12px 12px;
    font-size: 15px;
  }
}
