/* ============================================
   BOTTOM-SHEET.CSS — Own Time Home Club
   ============================================ */

/* ── Overlay ── */
.bs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s var(--ease-out),
              visibility 0.32s var(--ease-out);
}

.bs-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── Sheet ── */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 910;
  max-height: 90dvh;
  background: var(--color-bg-alt);
  border-radius: 14px 14px 0 0;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease-out);
  will-change: transform;
  display: flex;
  flex-direction: column;
}

.bottom-sheet.is-open {
  transform: translateY(0);
}

/* ── Drag handle (visual only) ── */
.bottom-sheet::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

/* ── Inner wrapper ── */
.bottom-sheet__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ── Header ── */
.bottom-sheet__header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem 1.125rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.bottom-sheet__header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: rgba(61, 90, 62, 0.14);
  border-radius: var(--radius-sm);
  color: var(--color-accent-lt);
}

.bottom-sheet__header-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
}

.bottom-sheet__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 1.55rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
  flex: 1;
}

/* ── Body ── */
.bottom-sheet__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
  user-select: text;
  -webkit-user-select: text;
}

.bottom-sheet__body p,
.bottom-sheet__body li {
  font-weight: 300;
}

.bottom-sheet__body strong {
  font-weight: 700;
  color: rgba(255,255,255,0.95);
}

/* ── Horário (ex: Gastronomia) ── */
.bottom-sheet__hours {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-lt);
  margin-bottom: 1rem;
}

.bottom-sheet__hours::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-accent-lt);
  flex-shrink: 0;
}

.bs-model-tag {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-lt);
  margin-bottom: 1.25rem;
}

.bs-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bs-steps li {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text);
  padding-left: 1rem;
  border-left: 1px solid var(--color-border);
}

.bs-steps li strong {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.bs-steps li em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
}

.bottom-sheet__placeholder {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--color-muted);
  line-height: 1.75;
}

/* ── Botão fechar (X) no header ── */
.bottom-sheet__close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-sheet__close-btn:hover,
.bottom-sheet__close-btn:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--color-text);
  outline: none;
}

.bottom-sheet__close-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
}

/* ── Footer ── */
.bottom-sheet__footer {
  flex-shrink: 0;
  padding: 0.875rem 1.5rem calc(0.875rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

/* ── Back button ── */
.bottom-sheet__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding-inline: 1.25rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.bottom-sheet__back:hover,
.bottom-sheet__back:focus-visible {
  background: var(--color-surface);
  border-color: rgba(255, 255, 255, 0.14);
  outline: none;
}

.bottom-sheet__back:active {
  background: rgba(255, 255, 255, 0.04);
}

/* ── Prevent body scroll when sheet is open ── */
html.sheet-open {
  overflow: hidden;
}

/* ── Desktop: modal centralizado ── */
@media (min-width: 769px) {
  .bottom-sheet {
    bottom: auto;
    left: 50%;
    right: auto;
    top: 50%;
    width: min(560px, 90vw);
    border-radius: 12px;
    transform: translate(-50%, -48%) scale(0.97);
    opacity: 0;
    transition: transform 0.35s var(--ease-out),
                opacity 0.28s var(--ease-out);
  }

  .bottom-sheet.is-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  /* Oculta o drag handle no desktop */
  .bottom-sheet::before {
    display: none;
  }

  /* Sem padding de safe-area no rodapé */
  .bottom-sheet__footer {
    padding-bottom: 0.875rem;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .bs-overlay,
  .bottom-sheet {
    transition: none;
  }
}

/* ─── Tabs dentro de bottom sheet ─────────── */
.bs-tab-group {
  display: flex;
  flex-direction: column;
}

.bs-tab-btns {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.bs-tab-btn {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.bs-tab-btn.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.bs-tab-btn:not(.is-active):hover {
  border-color: var(--color-accent-lt);
  color: var(--color-text);
}

.bs-tab-panel {
  display: none;
}

.bs-tab-panel.is-active {
  display: block;
}

/* ─── Variante fundo branco (ex: cardápio café) ─── */
.bottom-sheet--light {
  background: #fff;
}
.bottom-sheet--light .bottom-sheet__header {
  border-bottom-color: rgba(0,0,0,0.08);
}
.bottom-sheet--light .bottom-sheet__title {
  color: #1a1a1a;
}
.bottom-sheet--light::before {
  background: rgba(0,0,0,0.18);
}
.bottom-sheet--light .bottom-sheet__close-btn {
  color: #1a1a1a;
}
.bottom-sheet--light .bottom-sheet__close-btn svg {
  stroke: #1a1a1a;
}
.bottom-sheet--light .bottom-sheet__footer {
  border-top-color: rgba(0,0,0,0.08);
}
.bottom-sheet--light .bottom-sheet__back {
  color: #555;
}
.bottom-sheet--light .bottom-sheet__body {
  color: #1a1a1a;
}
.bottom-sheet--light .bs-steps li {
  color: #333;
  border-left-color: rgba(0,0,0,0.15);
}
.bottom-sheet--light .bottom-sheet__header-icon {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
  color: #555;
}
.bottom-sheet--light .bottom-sheet__header-icon svg {
  stroke: #555;
}
