/* bottom-sheet.css — Mobile Bottom-Sheet (body-appended). */

/* ──────────────────────────────────────────────────────────────────────
 * Bottom-Sheet (Body-appended)
 * ────────────────────────────────────────────────────────────────────── */

.app-bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--lod-scrim);  /* Scrim-SSOT (tokens.css) */
  opacity: 0;
  transition: opacity var(--duration-normal);
  z-index: var(--z-app-toolbar-tier-1);
}
.app-bottom-sheet-backdrop.is-open { opacity: 1; }
.app-bottom-sheet {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform var(--duration-flow) var(--ease-overshoot);
  z-index: var(--z-app-toolbar-tier-2);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  font-family: var(--lod-font-sans);
}
.app-bottom-sheet.is-open { transform: translateY(0); }
.app-bottom-sheet:focus-visible { outline: none; }
.app-bottom-sheet-head {
  position: relative;
  padding: var(--space-3-5) var(--space-4-5) var(--space-2-5);
  border-bottom: 1px solid var(--lod-gray-100);
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
}
.app-bottom-sheet-handle {
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  border-radius: var(--radius-xxs);
  background: var(--lod-gray-300);
}
.app-bottom-sheet-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--lod-darkblue);
  flex: 1;
}
.app-bottom-sheet-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-bottom-sheet-close:hover { background: var(--lod-gray-50); }
.app-bottom-sheet-close img { width: 14px; height: 14px; opacity: 0.65; }
.app-bottom-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3-5) var(--space-4-5);
}
.app-bottom-sheet-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2-5);
  padding: var(--space-3) var(--space-4-5);
  /* iPhone-Rundung/Home-Indicator respektieren, sonst werden Buttons abgeschnitten. */
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--lod-gray-100);
}
/* Fallback fuer Bottom-Sheets ohne eigenen Footer: Body bekommt Safe-Area-Padding. */
.app-bottom-sheet:not(:has(.app-bottom-sheet-footer)) .app-bottom-sheet-body {
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
