/* Bottomsheet Overlay */
.bottomsheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1260;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.bottomsheet-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Bottomsheet */
.bottomsheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  z-index: 1280;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 80vh;
  max-height: 80dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.bottomsheet-overlay.open+.bottomsheet,
.bottomsheet.open {
  transform: translateY(0);
}

/* Handle centred in a 32px grab strip, close button at the top right: the same chrome as the menu sheet */
/* The grab area comes from the kit (.ui-sheet-grab) */

.bottomsheet-header {
  padding: 0 1.5rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.bottomsheet-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Size and look come from the kit's .ui-sheet-close */

.bottomsheet-content {
  padding: 1rem 1.5rem 2rem;
  flex: 0 0 auto;
  max-width: 100%;
  box-sizing: border-box;
}

.bottomsheet-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bottomsheet-option {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  border: 1px solid transparent;
}

.bottomsheet-option:hover {
  background: var(--surface-hover);
}

.bottomsheet-option.active {
  background: var(--gradient-subtle);
  border-color: var(--orchid);
}

.bottomsheet-option .option-icon {
  color: var(--text-secondary);
}

.bottomsheet-option.active .option-icon {
  color: var(--orchid);
}

.bottomsheet-option .option-text {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.bottomsheet-option.active .option-text {
  color: var(--orchid);
}

.bottomsheet-option .option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  background: var(--surface-hover);
  border-radius: 6px;
}

.bottomsheet-option.active .option-desc {
  background: rgba(217, 70, 239, 0.1);
  color: var(--orchid);
}

.bottomsheet-option.danger {
  color: var(--error);
}

.bottomsheet-option.danger:hover {
  background: rgba(248, 113, 113, 0.1);
}

.bottomsheet-option.danger .option-icon {
  color: var(--error);
}

.bottomsheet:not(.open) { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .bottomsheet, .bottomsheet-overlay { transition: none; }
}
.bottomsheet-overlay:not(.open) { pointer-events: none; }


/* Sticky top: the handle and title ride above the scrolling content, behind a progressive blur */
.bottomsheet-top {
  align-items: center;
  gap: 0;
  padding: 10px 12px 2px;
}





/* A row that cannot be used (an expired clip), and its right-aligned reason */
.bottomsheet-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bottomsheet-option.is-disabled .option-text { color: var(--text-muted); }

.bottomsheet-option .option-hint {
  margin-left: auto;
  padding-left: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}
