/* Scope ALL controls to this widget: WoodMart also styles native <button> elements. */
.agib,
.agib * { box-sizing: border-box; }

.agib {
  --agib-accent: #673ab7;
  --agib-nav: #f2edff;
  --agib-ink: #302747;
  --agib-active-ink: #fff;
  display: block;
  width: 100%;
  max-width: 402px;
  min-width: 0;
  margin: 12px 0 20px;
  font: inherit;
}
/* The official extended layout is 650 px wide; keep the existing compact default.
   Inbank handles its own switch to a vertical layout in narrower containers. */
.agib[data-layout="extended-horizontal"] { max-width: 650px; }
/* A theme's display:block must not override the native hidden attribute. */
.agib[hidden] { display: none !important; }
.agib[data-mode="purple"] {
  --agib-nav: #4e278b;
  --agib-ink: #fff;
  --agib-accent: #a88aff;
  --agib-active-ink: #211338;
}
.agib[data-mode="white"] {
  --agib-nav: #f3f1f8;
  --agib-ink: #312849;
}

/* Important only where theme button styles would otherwise override our tabs. */
body .agib .agib__tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  gap: 4px;
  padding: 5px;
  margin: 0;
  border: 1px solid rgba(93, 61, 147, .09) !important;
  border-radius: 999px !important;
  background: var(--agib-nav) !important;
  box-shadow: none !important;
  overflow: hidden;
}

body .agib .agib__tabs > .agib__tab,
body .agib .agib__tabs > .agib__tab:hover,
body .agib .agib__tabs > .agib__tab:focus {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  flex: 1 1 0% !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 36px;
  height: auto !important;
  margin: 0 !important;
  padding: 8px 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--agib-ink) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

body .agib .agib__tabs > .agib__tab.is-active,
body .agib .agib__tabs > .agib__tab.is-active:hover,
body .agib .agib__tabs > .agib__tab.is-active:focus {
  background: var(--agib-accent) !important;
  background-image: none !important;
  color: var(--agib-active-ink) !important;
}

/* Certain themes add decorative pseudo-elements to all buttons. */
body .agib .agib__tabs > .agib__tab::before,
body .agib .agib__tabs > .agib__tab::after {
  display: none !important;
  content: none !important;
}

body .agib .agib__tabs > .agib__tab:focus-visible {
  outline: 2px solid #9972ed !important;
  outline-offset: -2px;
}
.agib__panel { width: 100%; min-width: 0; padding-top: 10px; }
.agib__target { width: 100%; max-width: 100%; min-width: 0; }
.agib__panel iframe { max-width: 100%; }
.agib__status {
  display: block;
  padding: 18px 12px;
  border-radius: 12px;
  background: var(--agib-nav);
  color: var(--agib-ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 379px) {
  /* Inbank needs a minimum 300px wide slot; avoid horizontal overflow on normal phones. */
  .agib { margin: 10px 0 16px; }
  body .agib .agib__tabs { gap: 2px; padding: 4px; min-height: 44px; }
  body .agib .agib__tabs > .agib__tab,
  body .agib .agib__tabs > .agib__tab:hover,
  body .agib .agib__tabs > .agib__tab:focus { font-size: 12px !important; padding: 7px 2px !important; min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  body .agib .agib__tabs > .agib__tab { transition: none; }
}
