/* GalleryOS — In-app tips & coachmarks */

.gos-tips-root {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}

/* Keep the root click-through so sidebar/nav stay usable while a tip is open.
   Only the tip card captures pointer events; dimming is visual only. */
.gos-tips-root.is-active {
  pointer-events: none;
}

.gos-tips-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(28, 28, 26, 0.42);
  pointer-events: none;
}

.dark .gos-tips-backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.gos-tips-spotlight {
  position: fixed;
  z-index: 1;
  border-radius: var(--gos-radius-md, 12px);
  box-shadow: 0 0 0 9999px rgba(28, 28, 26, 0.48);
  outline: 2px solid color-mix(in srgb, var(--gos-accent, #1B4DFF) 55%, transparent);
  outline-offset: 2px;
  transition:
    top var(--gos-duration-fast, 180ms) var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    left var(--gos-duration-fast, 180ms) var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    width var(--gos-duration-fast, 180ms) var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    height var(--gos-duration-fast, 180ms) var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  pointer-events: none;
}

.gos-tips-spotlight.is-pulse {
  animation: gos-tips-pulse 720ms var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1)) 1;
}

@keyframes gos-tips-pulse {
  0% { outline-color: color-mix(in srgb, var(--gos-accent, #1B4DFF) 20%, transparent); }
  40% { outline-color: color-mix(in srgb, var(--gos-accent, #1B4DFF) 80%, transparent); }
  100% { outline-color: color-mix(in srgb, var(--gos-accent, #1B4DFF) 55%, transparent); }
}

.dark .gos-tips-spotlight {
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62);
}

.gos-tips-card {
  position: fixed;
  z-index: 2;
  width: min(320px, calc(100vw - 24px));
  padding: 1rem 1.05rem 0.95rem;
  border-radius: var(--gos-radius-lg, 18px);
  background: var(--gos-surface, #F8F9FC);
  color: var(--gos-text-primary, #1C1C1A);
  border: 1px solid var(--gos-border, rgba(28, 28, 26, 0.10));
  box-shadow: var(--gos-shadow-elevated, 0 2px 8px rgba(28, 28, 26, 0.06), 0 14px 36px -14px rgba(28, 28, 26, 0.14));
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition:
    opacity var(--gos-duration-fast, 180ms) var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    transform var(--gos-duration-medium, 360ms) var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  pointer-events: auto;
}

.gos-tips-card.is-centered {
  top: 50%;
  left: 50%;
  width: min(380px, calc(100vw - 32px));
  padding: 1.25rem 1.2rem 1.1rem;
  transform: translate(-50%, calc(-50% + 8px)) scale(0.98);
  box-shadow:
    0 4px 16px rgba(28, 28, 26, 0.08),
    0 24px 48px -18px rgba(28, 28, 26, 0.22);
}

.gos-tips-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gos-tips-card.is-centered.is-visible {
  transform: translate(-50%, -50%) scale(1);
}

.gos-tips-card.is-centered .gos-tips-card__title {
  font-size: var(--gos-text-xl, 18px);
}

.gos-tips-card.is-centered .gos-tips-card__body {
  font-size: var(--gos-text-sm, 13.5px);
  line-height: 1.5;
}

.dark .gos-tips-card {
  background: rgba(16, 16, 16, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
}

.gos-tips-card__eyebrow {
  margin: 0 0 0.3rem;
  font-size: var(--gos-text-xs, 11px);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gos-text-soft, rgba(28, 28, 26, 0.48));
}

.gos-tips-card__title {
  margin: 0 0 0.35rem;
  font-size: var(--gos-text-lg, 16px);
  font-weight: 650;
  line-height: 1.3;
  color: var(--gos-text-primary, #1C1C1A);
}

.dark .gos-tips-card__title { color: #f5f5f4; }

.gos-tips-card__body {
  margin: 0 0 0.75rem;
  font-size: var(--gos-text-sm, 13px);
  line-height: 1.45;
  color: var(--gos-text-secondary, rgba(28, 28, 26, 0.62));
}

.dark .gos-tips-card__body { color: rgba(245, 245, 244, 0.68); }

.gos-tips-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: -0.35rem 0 0.75rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--gos-accent, #1B4DFF);
  text-decoration: none;
}

.gos-tips-card__more:hover { text-decoration: underline; }

.gos-tips-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.gos-tips-card__dots {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 10px;
}

.gos-tips-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--gos-border-strong, rgba(28, 28, 26, 0.16));
  transition: width 180ms var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1)), background 180ms ease;
}

.gos-tips-card__dot.is-active {
  width: 14px;
  background: var(--gos-accent, #1B4DFF);
}

.gos-tips-card__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.gos-tips-card__btn {
  appearance: none;
  min-height: 34px;
  padding: 0 0.7rem;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--gos-text-secondary, rgba(28, 28, 26, 0.62));
}

.gos-tips-card__btn:hover {
  background: var(--gos-hover-fill, rgba(28, 28, 26, 0.04));
  color: var(--gos-text-primary, #1C1C1A);
}

.gos-tips-card__btn--primary {
  background: var(--gos-accent, #1B4DFF);
  color: #fff;
  border-color: transparent;
}

.gos-tips-card__btn--primary:hover {
  background: var(--gos-accent-hover, #153FE0);
  color: #fff;
}

.gos-tips-card__btn--ghost {
  border-color: var(--gos-border, rgba(28, 28, 26, 0.10));
}

.dark .gos-tips-card__btn--ghost {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(245, 245, 244, 0.75);
}

/* Help mode affordances */
body.gos-tips-help-mode [data-gos-tip] {
  position: relative;
}

body.gos-tips-help-mode [data-gos-tip]::after {
  content: '?';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: var(--gos-accent, #1B4DFF);
  box-shadow: 0 1px 4px rgba(27, 77, 255, 0.35);
  pointer-events: none;
  z-index: 2;
}

.gos-tips-hover {
  position: fixed;
  z-index: 10055;
  max-width: 260px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: var(--gos-surface-elevated, #FFFFFF);
  color: var(--gos-text-primary, #1C1C1A);
  border: 1px solid var(--gos-border, rgba(28, 28, 26, 0.10));
  box-shadow: var(--gos-shadow-card);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 180ms var(--gos-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.gos-tips-hover.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dark .gos-tips-hover {
  background: #141414;
  color: #f5f5f4;
  border-color: rgba(255, 255, 255, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .gos-tips-spotlight,
  .gos-tips-card,
  .gos-tips-hover,
  .gos-tips-card__dot {
    transition: none !important;
    animation: none !important;
  }
  .gos-tips-card {
    transform: none;
  }
  .gos-tips-card.is-centered,
  .gos-tips-card.is-centered.is-visible {
    transform: translate(-50%, -50%);
  }
}
