/* ChatGPT Mode Styles */
/* Minimal customization when embedded in ChatGPT widget */

/* Hide deck chrome in ChatGPT mode */
body.chatgpt-mode .deck-header,
body.chatgpt-mode .deck-footer,
body.chatgpt-mode .deck__header {
  display: none !important;
}

/* Hide logo in ChatGPT mode only when NOT in fullscreen */
html:not([data-display-mode="fullscreen"]) body.chatgpt-mode [data-controller="logo-switcher"] {
  display: none !important;
}

/* Hide progress bar during signup screens (toggled via JS) */
body.chatgpt-mode .deck-progress--hidden {
  display: none !important;
}

/* Push content below the iOS status bar in fullscreen mode */
html[data-display-mode="fullscreen"] body.chatgpt-mode .deck-progress {
  top: env(safe-area-inset-top, 0px);
}

html[data-display-mode="fullscreen"] body.chatgpt-mode [data-controller="logo-switcher"] {
  padding-top: calc(env(safe-area-inset-top, 0px) + 1rem);
}

html[data-display-mode="fullscreen"] body.chatgpt-mode .chatgpt-btns-wrapper {
  display: none !important;
}

html[data-display-mode="fullscreen"] body.chatgpt-mode .sl-main {
  padding-top: env(safe-area-inset-top, 0px);
}

/* Explicit white background to prevent ChatGPT dark theme from showing through */
body.chatgpt-mode {
  background: #ffffff;
}

/* Fix mobile fixed-position buttons in ChatGPT inline mode.
   The default rule uses top: calc(100svh - 90px), but svh is unreliable in iframes
   that start hidden (display:none). Use bottom instead. Must cover the full range
   where the fixed button is active (<=769px in application.css).
   Target both #sl-fix-button (the teleported clone container) and in-slide originals. */
@media (max-width: 769px) {
  html:not([data-display-mode="fullscreen"]) body.chatgpt-mode .sl-start-btns {
    top: auto !important;
    bottom: 0 !important;
  }
}

/* ---- ChatGPT Expand Button ---- */

.chatgpt-expand-btn {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0;
}

.chatgpt-expand-btn:hover {
  opacity: 1;
}

.chatgpt-expand-btn svg {
  width: 16px;
  height: 16px;
  color: #333;
}

.chatgpt-expand-btn--hidden {
  display: none;
}

/* ---- ChatGPT Overlay Buttons (info, expand, minimize) ---- */

.chatgpt-btns-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
}

.chatgpt-btns-wrapper--hidden {
  display: none !important;
}

.chatgpt-tooltip-wrapper {
  position: relative;
}

/* Shared overlay button base (expand + minimize) */
.chatgpt-overlay-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.25));
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.95));
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease, transform 0.12s ease;
  border: none;
  position: relative;
}

.chatgpt-overlay-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  background: linear-gradient(90deg, #F1C54A 0%, #64A992 33%, #4681C2 66%, #7059E7 100%);
}

.chatgpt-overlay-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.chatgpt-overlay-btn--hidden {
  display: none !important;
}

.chatgpt-overlay-btn svg {
  width: 18px;
  height: 18px;
  color: #7059E7;
}

.chatgpt-overlay-btn--animate {
  animation: chatgpt-pulse 2s ease-in-out 3;
}

@keyframes chatgpt-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Info button */
.chatgpt-info-btn {
  width: 36px;
  height: 36px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.25));
  transition: transform 0.12s ease, opacity 0.12s ease;
  border-radius: 8px 2px 8px 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #FFF;
}

.chatgpt-info-btn:hover {
  transform: translateY(-1px);
  opacity: 1;
}

.chatgpt-info-btn__icon {
  width: 20px;
  height: 20px;
  color: #7059E7;
  font-weight: 800;
  font-size: 20px;
  line-height: 21px;
  text-align: center;
}

/* Info tooltip */
.chatgpt-info-tooltip {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 60;
  display: none;
  min-width: 320px;
  border-radius: 8px 2px 8px 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #FFF;
  padding: 17px 10px 10px 14px;
  color: #000;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

.chatgpt-info-tooltip--visible {
  display: block;
}

.chatgpt-info-tooltip__title {
  font-weight: 700;
  margin-bottom: 6px;
  color: #111;
}

.chatgpt-info-tooltip__body {
  color: #333;
  margin-bottom: 8px;
}

.chatgpt-info-tooltip__link {
  text-decoration: underline;
  color: #1a3ea8;
  cursor: pointer;
}
