/* Betbit admin inline info trigger + popover */
.admin-section-head .admin-info-wrap {
  margin-left: auto;
}

.admin-info-wrap {
  position: relative;
  flex-shrink: 0;
  /* Above sidebar + main chrome; above fixed INFO rail tab (1085) when popover is open */
  z-index: 1090;
  isolation: isolate;
  --info-accent: #fbb03b;
  --info-accent-mid: #d4922a;
  --info-accent-deep: #a16b13;
  --info-glow: rgba(251, 176, 59, 0.35);
  --info-glow-soft: rgba(251, 176, 59, 0.14);
  --info-border: rgba(251, 176, 59, 0.32);
  --info-border-strong: rgba(251, 176, 59, 0.48);
}
.admin-info-trigger {
  position: relative;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #f8fffc;
  font-size: 11px;
  font-style: italic;
  font-weight: 700;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  line-height: 1;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.38) 0%, transparent 45%),
    linear-gradient(152deg, var(--info-accent, #fbb03b) 0%, var(--info-accent-mid, #d4922a) 42%, var(--info-accent-deep, #a16b13) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(94, 234, 212, 0.22) inset,
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 3px 10px rgba(0, 0, 0, 0.38),
    0 0 18px var(--info-glow-soft, rgba(94, 234, 212, 0.12));
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.18s ease;
}
.admin-info-trigger::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, var(--info-glow, rgba(45, 212, 191, 0.35)) 0%, transparent 68%);
  transition: opacity 0.22s ease;
}
.admin-info-trigger:hover,
.admin-info-trigger:focus {
  transform: scale(1.07);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(167, 243, 228, 0.35) inset,
    0 2px 0 rgba(255, 255, 255, 0.18) inset,
    0 6px 20px rgba(0, 0, 0, 0.35),
    0 0 22px var(--info-glow, rgba(45, 212, 191, 0.35));
  outline: none;
}
.admin-info-trigger:hover::after,
.admin-info-trigger:focus-visible::after {
  opacity: 0.55;
}
.admin-info-trigger:focus-visible {
  outline: 2px solid rgba(251, 176, 59, 0.95);
  outline-offset: 3px;
}
.admin-info-trigger__glyph {
  display: block;
  transform: translateY(0.5px);
  text-shadow: 0 1px 2px rgba(0, 40, 36, 0.45);
}

/* Popover sits to the LEFT of the trigger so it stays on-screen when the icon is on the right edge */
.admin-info-popover {
  position: absolute;
  right: calc(100% + 10px);
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1096;
  width: min(272px, calc(100vw - 40px));
  max-width: min(272px, calc(100vw - 40px));
  box-sizing: border-box;
  filter:
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15))
    drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 32px rgba(45, 212, 191, 0.07));
}
@media (prefers-reduced-motion: no-preference) {
  .admin-info-popover:not([hidden]) {
    animation: admin-info-popover-in 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}
@keyframes admin-info-popover-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.admin-info-popover::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  margin-top: -6px;
  border: 6px solid transparent;
  border-left-color: #1a2321;
  filter: drop-shadow(1px 0 0 rgba(94, 234, 212, 0.12));
}
.admin-info-popover__inner {
  position: relative;
  background:
    linear-gradient(165deg, rgba(34, 44, 41, 0.72) 0%, rgba(12, 18, 17, 0.92) 100%);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--info-border, rgba(94, 234, 212, 0.32));
  border-radius: 12px;
  padding: 12px 14px 14px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 1px 0 rgba(94, 234, 212, 0.1) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset;
}
.admin-info-popover__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 80% at 88% 0%, rgba(45, 212, 191, 0.16) 0%, transparent 55%);
  opacity: 0.9;
}
.admin-info-popover__title {
  position: relative;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--info-text, #e8f4f1);
  line-height: 1.35;
  padding-bottom: 10px;
  border-bottom: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.admin-info-popover__title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(94, 234, 212, 0.45) 18%,
    rgba(167, 243, 228, 0.65) 50%,
    rgba(94, 234, 212, 0.4) 82%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.2);
}
.admin-info-popover__body {
  position: relative;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--info-text-muted, rgba(186, 220, 210, 0.9));
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
.admin-info-popover__body p {
  margin: 0 0 8px;
  text-align: left;
  font-size: 12px;
  color: inherit;
  line-height: 1.55;
}
.admin-info-popover__body p:last-child {
  margin-bottom: 0;
}
.admin-info-popover__body strong {
  color: rgba(244, 255, 252, 0.98);
  font-weight: 650;
}
.admin-info-popover__body code,
.admin-info-popover__body kbd,
.admin-info-popover__body samp {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  color: rgba(167, 243, 228, 0.98) !important;
  background: rgba(4, 12, 11, 0.75) !important;
  border: 1px solid rgba(94, 234, 212, 0.28) !important;
  padding: 2px 7px 3px;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
@media (max-width: 767px) {
  .admin-info-popover {
    right: auto;
    left: 50%;
    top: calc(100% + 9px);
    transform: translateX(-50%);
    width: min(288px, calc(100vw - 24px));
    max-width: min(288px, calc(100vw - 24px));
  }
  .admin-info-popover::after {
    left: 50%;
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-left: -6px;
    margin-bottom: -1px;
    border: 6px solid transparent;
    border-bottom-color: #1a2321;
    border-left-color: transparent;
    filter: drop-shadow(0 -1px 0 rgba(94, 234, 212, 0.1));
  }
}

/* Light mode popover */
body:not(.dark-mode) .admin-info-popover__inner {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 2px 0 rgba(45, 212, 191, 0.08) inset;
}
body:not(.dark-mode) .admin-info-popover__inner::before {
  background: radial-gradient(100% 80% at 90% 0%, rgba(45, 212, 191, 0.12) 0%, transparent 55%);
  opacity: 1;
}
body:not(.dark-mode) .admin-info-popover::after {
  border-left-color: #f6f8f9;
  filter: drop-shadow(1px 0 0 rgba(45, 212, 191, 0.1));
}
@media (max-width: 767px) {
  body:not(.dark-mode) .admin-info-popover::after {
    border-bottom-color: #f0f4f4;
    border-left-color: transparent;
    filter: drop-shadow(0 -1px 0 rgba(45, 212, 191, 0.08));
  }
}
body:not(.dark-mode) .admin-info-popover__title {
  color: #0f172a;
}
body:not(.dark-mode) .admin-info-popover__title::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(45, 141, 132, 0.25) 22%,
    rgba(45, 212, 191, 0.45) 50%,
    rgba(45, 141, 132, 0.22) 78%,
    transparent 100%
  );
  box-shadow: none;
}
body:not(.dark-mode) .admin-info-popover__body,
body:not(.dark-mode) .admin-info-popover__body p {
  color: #334155;
}
body:not(.dark-mode) .admin-info-popover__body strong {
  color: #0f172a;
}
body:not(.dark-mode) .admin-info-popover__body code,
body:not(.dark-mode) .admin-info-popover__body kbd,
body:not(.dark-mode) .admin-info-popover__body samp {
  color: #0d5c52 !important;
  background: rgba(204, 251, 241, 0.55) !important;
  border-color: rgba(45, 141, 132, 0.28) !important;
}

/* Page info drawer rail */
.admin-info-drawer-host {
  --admin-drawer-w: min(320px, calc(100vw - 20px));
  --info-accent: #fbb03b;
  --info-accent-mid: #d4922a;
  --info-accent-deep: #a16b13;
  --info-glow: rgba(251, 176, 59, 0.35);
  --info-glow-soft: rgba(251, 176, 59, 0.14);
  --info-surface-0: rgba(20, 20, 20, 0.96);
  --info-surface-1: rgba(28, 28, 28, 0.94);
  --info-border: rgba(251, 176, 59, 0.32);
  --info-border-strong: rgba(251, 176, 59, 0.48);
  --info-text: #f2f2f2;
  --info-text-muted: rgba(180, 180, 180, 0.9);
  --info-radius: 12px;
  --info-radius-sm: 8px;
}
.admin-info-drawer-host--login {
  display: none !important;
  pointer-events: none !important;
}

.admin-info-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1083;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.admin-info-drawer-tab {
  position: fixed;
  right: max(0px, env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 1085;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 34px;
  min-height: 92px;
  padding: 12px 0;
  margin: 0;
  border: none;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
  color: #1a1a1a;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, transparent 38%),
    linear-gradient(175deg, #ffc857 0%, #fbb03b 38%, #a16b13 100%);
  box-shadow:
    -1px 0 0 rgba(255, 220, 160, 0.55) inset,
    0 0 0 1px rgba(0, 0, 0, 0.35),
    -4px 0 22px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(251, 176, 59, 0.22);
  transition:
    right 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    transform 0.22s ease;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.admin-info-drawer-tab:hover,
.admin-info-drawer-tab:focus {
  box-shadow:
    -1px 0 0 rgba(255, 230, 180, 0.65) inset,
    0 0 0 1px rgba(0, 0, 0, 0.38),
    -6px 0 28px rgba(0, 0, 0, 0.4),
    0 0 36px rgba(251, 176, 59, 0.38);
  outline: none;
}
.admin-info-drawer-tab:focus-visible {
  outline: 2px solid rgba(251, 176, 59, 0.95);
  outline-offset: 3px;
}
.admin-info-drawer-tab__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #a16b13;
  font-size: 11px;
  font-style: italic;
  font-weight: 700;
  font-family: ui-serif, Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow:
    0 0 0 1px rgba(161, 107, 19, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.15);
}
.admin-info-drawer-tab__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.92);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.admin-info-drawer-host--open .admin-info-drawer-tab {
  right: var(--admin-drawer-w);
  box-shadow:
    -1px 0 0 rgba(255, 220, 160, 0.45) inset,
    0 0 0 1px rgba(0, 0, 0, 0.28),
    -3px 0 18px rgba(0, 0, 0, 0.35);
}

/* Panel height follows content; scroll only when tall */
.admin-info-drawer-panel {
  position: fixed;
  top: 50%;
  right: 0;
  bottom: auto;
  width: var(--admin-drawer-w);
  max-height: calc(100vh - 24px);
  z-index: 1084;
  display: flex;
  flex-direction: column;
  background: linear-gradient(185deg, rgba(28, 28, 28, 0.98) 0%, rgba(20, 20, 20, 0.99) 100%);
  border: 1px solid var(--info-border-strong, rgba(251, 176, 59, 0.38));
  border-right: none;
  border-radius: 14px 0 0 14px;
  box-shadow:
    -12px 0 48px rgba(0, 0, 0, 0.55),
    -4px 0 24px rgba(251, 176, 59, 0.08),
    inset 0 1px 0 rgba(251, 176, 59, 0.08);
  transform: translate(100%, -50%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.admin-info-drawer-host--open .admin-info-drawer-panel {
  transform: translate(0, -50%);
}
.admin-info-drawer-panel__head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 11px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(255, 200, 87, 0.35) 0%, transparent 52%),
    linear-gradient(135deg, #ffc857 0%, #fbb03b 46%, #a16b13 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px 0 0 0;
}
.admin-info-drawer-panel__head-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.admin-info-drawer-panel__badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.97);
  color: #a16b13;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  font-family: ui-serif, Georgia, serif;
  box-shadow:
    0 0 0 1px rgba(161, 107, 19, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.14);
}
.admin-info-drawer-panel__title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  color: rgba(26, 26, 26, 0.96);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.admin-info-drawer-panel__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(4, 47, 46, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(2, 44, 40, 0.92);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.admin-info-drawer-panel__close:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(4, 47, 46, 0.5);
}
.admin-info-drawer-panel__close:focus-visible {
  outline: 2px solid rgba(4, 47, 46, 0.85);
  outline-offset: 2px;
}
.admin-info-drawer-panel__body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px 16px;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background:
    radial-gradient(80% 50% at 100% 0%, rgba(251, 176, 59, 0.06) 0%, transparent 50%);
}
.admin-info-drawer-panel__lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(220, 220, 220, 0.95);
  text-align: left;
}
.admin-info-drawer-panel__body ul {
  margin: 0 0 12px;
  padding-left: 18px;
  color: rgba(160, 200, 190, 0.92);
  font-size: 12px;
  line-height: 1.55;
}
.admin-info-drawer-panel__body li {
  margin-bottom: 6px;
}
.admin-info-drawer-panel__note {
  margin-bottom: 0 !important;
  font-size: 12px !important;
  color: rgba(106, 190, 180, 0.95) !important;
}

body:not(.dark-mode) .admin-info-drawer-panel {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-left-color: rgba(15, 118, 110, 0.2);
  box-shadow:
    -10px 0 40px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
body:not(.dark-mode) .admin-info-drawer-panel__body {
  background: radial-gradient(90% 50% at 100% 0%, rgba(45, 212, 191, 0.06) 0%, transparent 45%);
}
body:not(.dark-mode) .admin-info-drawer-panel__lead,
body:not(.dark-mode) .admin-info-drawer-panel__body ul {
  color: #475569;
}
body:not(.dark-mode) .admin-info-drawer-backdrop {
  background: rgba(15, 23, 42, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .admin-info-trigger,
  .admin-info-drawer-tab,
  .admin-info-drawer-panel,
  .admin-info-popover {
    transition-duration: 0.01ms !important;
  }
  .admin-info-popover:not([hidden]) {
    animation: none !important;
  }
}

/* Beat generic Bootstrap / admin button resets */
button.admin-info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 22px;
  max-width: 22px;
  min-height: 22px;
  max-height: 22px;
  vertical-align: middle;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.38) 0%, transparent 45%),
    linear-gradient(152deg, #fbb03b 0%, #d4922a 42%, #a16b13 100%) !important;
  color: #f8fffc !important;
}

button.admin-info-trigger .admin-info-trigger__glyph {
  pointer-events: none;
}
