/* tab-tour.css — Per-tab feature discovery bottom sheets
   Mobile: slides up from bottom. Desktop (≥520px): centred modal.
   ─────────────────────────────────────────────────────────────── */

/* ── Overlay ──────────────────────────────────────────── */
#tab-tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 40, 0.65);
  z-index: 9500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(4px);
}

#tab-tour-overlay.tt-visible {
  opacity: 1;
}

@media (min-width: 520px) {
  #tab-tour-overlay {
    align-items: center;
    padding: 16px;
  }
}

/* ── Sheet ────────────────────────────────────────────── */
.tt-sheet {
  background: var(--card-bg, #fff);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(60px);
  transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
  box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.25);
}

.tt-sheet-up {
  transform: translateY(0) !important;
}

@media (min-width: 520px) {
  .tt-sheet {
    border-radius: 20px;
    max-height: 88dvh;
    transform: translateY(16px) scale(0.97);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  }
  .tt-sheet-up {
    transform: translateY(0) scale(1) !important;
  }
}

/* ── Drag handle (mobile hint) ────────────────────────── */
.tt-sheet::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.15);
  margin: 10px auto 0;
  flex-shrink: 0;
}

@media (min-width: 520px) {
  .tt-sheet::before { display: none; }
}

/* ── Header ───────────────────────────────────────────── */
.tt-header {
  padding: 16px 20px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
}

.tt-header-emoji {
  font-size: 2.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.tt-header-text {
  flex: 1;
  padding-right: 36px;
}

.tt-title {
  margin: 0 0 3px;
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.tt-intro {
  margin: 0;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.4;
}

.tt-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  transition: background 0.15s;
}

.tt-close-btn:hover {
  background: rgba(255, 255, 255, 0.38);
}

/* ── Body + Grid ─────────────────────────────────────── */
.tt-body {
  overflow-y: auto;
  flex: 1;
  padding: 14px 14px 10px;
  -webkit-overflow-scrolling: touch;
}

.tt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

@media (min-width: 360px) {
  .tt-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 520px) {
  .tt-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Feature tile ─────────────────────────────────────── */
.tt-feature {
  background: var(--input-bg, #f8fafc);
  border-radius: 12px;
  padding: 11px 9px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--border, #e2e8f0);
  transition: background 0.12s, transform 0.12s, box-shadow 0.12s;
  cursor: default;
}

.tt-feature:hover {
  background: var(--hover-bg, #f1f5f9);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.tt-feature-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 3px;
}

.tt-feature-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text, #0a2540);
  line-height: 1.2;
}

.tt-feature-desc {
  font-size: 0.7rem;
  color: var(--muted, #64748b);
  line-height: 1.35;
}

/* ── Footer ──────────────────────────────────────────── */
.tt-footer {
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tt-btn-primary {
  background: var(--blue, #6C3CE1);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: filter 0.15s;
}

.tt-btn-primary:hover {
  filter: brightness(1.1);
}

.tt-btn-ghost {
  background: none;
  border: none;
  color: var(--muted, #64748b);
  font-size: 0.86rem;
  cursor: pointer;
  padding: 8px 12px;
  min-height: 44px;
  border-radius: 8px;
  transition: color 0.12s;
}

.tt-btn-ghost:hover {
  color: var(--text, #0a2540);
}
