/* ══════════════════════════════════════════════════════════════════
   IDISI — BOTTOM SHEETS & MODALS (VIDEOMAKER FROSTED MONOCHROME)
   With Dynamic Hover Color Manifestation
   ══════════════════════════════════════════════════════════════════ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.28s var(--ease), visibility 0.28s var(--ease);
}

.sheet-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.sheet-panel {
  width: 100%;
  max-width: 620px;
  max-height: 88dvh;
  background: var(--sheet-bg);
  backdrop-filter: var(--glass-sheet);
  -webkit-backdrop-filter: var(--glass-sheet);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--sheet-shadow);
  transform: translate3d(0, 100%, 0);
  will-change: transform, opacity;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease), background 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font);
}

.sheet-backdrop.open .sheet-panel {
  transform: translate3d(0, 0, 0);
}

/* Bottom Sheet Drag Handle (Mobile Only) */
.sheet-handle-bar {
  width: 38px;
  height: 5px;
  border-radius: var(--r-full);
  background: var(--handle-bar);
  margin: 10px auto 4px;
  flex-shrink: 0;
}

/* ── Responsive Tablet & Desktop Dialog Mode ───────────────────── */
@media (min-width: 768px) {
  .sheet-backdrop {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .sheet-panel {
    max-width: 660px;
    max-height: 86vh;
    border-radius: var(--r-xl);
    border: 1px solid var(--border-light);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(0.94) translateY(12px);
    opacity: 0;
  }

  .sheet-backdrop.open .sheet-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  .sheet-handle-bar {
    display: none;
  }
}

@media (min-width: 1024px) {
  .sheet-panel {
    max-width: 720px;
  }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sheet-header h2 {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.sheet-close-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--glass-pill);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}

.sheet-close-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--border-light);
  color: var(--text-main);
  transform: scale(1.08);
}

.sheet-body {
  padding: 18px 20px 32px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Hero Cover Box (Book Detail Sheet) ────────────────────────── */
.detail-hero-box {
  width: 100%;
  height: 220px;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

@media (min-width: 768px) {
  .detail-hero-box {
    height: 260px;
  }
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(24px) brightness(0.3);
  transform: scale(1.15);
}

.detail-hero-cover {
  position: relative;
  max-height: 86%;
  width: auto;
  border-radius: var(--r-sm);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}

.book-sku-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--r-xs);
  background: var(--glass-pill);
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all 0.2s var(--ease);
}

.book-sku-tag:hover {
  color: var(--text-main);
  border-color: var(--border-light);
  background: var(--glass-bg-hover);
}

/* ── Autocomplete Dropdown ─────────────────────────────────────── */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  border-radius: var(--r-md);
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 60;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.autocomplete-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: all 0.16s var(--ease);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--glass-bg-hover);
}

.autocomplete-item-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
  background: var(--glass-pill);
  padding: 2px 7px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
}

.autocomplete-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ── Act Composition Modal Components ──────────────────────────── */
.act-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.act-stat-pill {
  padding: 10px 8px;
  border-radius: var(--r-md);
  background: var(--glass-card);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.25s var(--ease);
}

.act-stat-pill .val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  transition: all 0.25s var(--ease);
}

.act-stat-pill .lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hover reveal on stat pills */
.act-stat-pill.hard:hover {
  border-color: var(--success-border-hover);
  background: var(--success-bg-hover);
  box-shadow: var(--success-glow);
}
.act-stat-pill.hard:hover .val {
  color: var(--success-light);
}

.act-stat-pill.soft:hover {
  border-color: var(--warning-border-hover);
  background: var(--warning-bg-hover);
  box-shadow: var(--warning-glow);
}
.act-stat-pill.soft:hover .val {
  color: var(--warning-light);
}

.act-printed-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--glass-card);
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease);
}

.act-printed-banner.printed:hover {
  background: var(--success-bg-hover);
  border-color: var(--success-border-hover);
  box-shadow: var(--success-glow);
}

.act-printed-banner.unprinted:hover {
  background: var(--warning-bg-hover);
  border-color: var(--warning-border-hover);
  box-shadow: var(--warning-glow);
}

.act-printed-banner .banner-icon {
  font-size: 22px;
}

.act-printed-banner .banner-text {
  display: flex;
  flex-direction: column;
}

.act-printed-banner .banner-text strong {
  font-size: 13.5px;
  color: var(--text-main);
}

.act-printed-banner .banner-text span {
  font-size: 11px;
  color: var(--text-muted);
}

.act-books-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 2px;
}

.act-books-header h4 {
  font-size: 13px;
  font-weight: 750;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.act-books-count {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.act-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

@media (min-width: 768px) {
  .act-items-list {
    max-height: 420px;
  }
}

.act-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--glass-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all 0.2s var(--ease);
}

.act-item-card:hover {
  background: var(--glass-card-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.act-item-thumb {
  width: 42px;
  height: 58px;
  border-radius: var(--r-xs);
  object-fit: cover;
  background: #111;
  flex-shrink: 0;
}

.act-item-info {
  flex: 1;
  min-width: 0;
}

.act-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.act-item-num {
  font-size: 11px;
  font-weight: 800;
  color: #000;
  background: #fff;
  padding: 1px 6px;
  border-radius: var(--r-xs);
}

.act-item-cover-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--r-xs);
  background: var(--glass-pill);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}

.act-item-card:hover .act-item-cover-badge.hard {
  background: var(--success-bg-hover);
  border-color: var(--success-border-hover);
  color: var(--success-light);
}

.act-item-card:hover .act-item-cover-badge.soft {
  background: var(--warning-bg-hover);
  border-color: var(--warning-border-hover);
  color: var(--warning-light);
}

.act-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.act-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.act-item-qty {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  padding: 6px 10px;
  background: var(--glass-pill);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.act-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.act-modal-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.act-secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--glass-pill);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: var(--font);
}

.act-secondary-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.act-secondary-btn:active {
  transform: var(--press-scale);
}

/* ══════════════════════════════════════════════════════════════════
   HOTKEYS CHEATSHEET MODAL STYLES (APPLE PRO ELEVATION)
   ══════════════════════════════════════════════════════════════════ */
.hotkeys-panel {
  max-width: 640px;
}

.hotkeys-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hotkeys-header-title svg {
  color: var(--text-muted);
}

.hotkeys-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 16px 20px 28px;
  overflow-y: auto;
}

@media (min-width: 600px) {
  .hotkeys-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.hotkey-section-title {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.hotkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.hotkey-label {
  font-size: 13px;
  font-weight: 550;
  color: var(--text-main);
}

.hotkey-keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hotkey-k {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-main);
  background: var(--glass-card);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xs);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .hotkey-k {
  background: var(--bg-surface);
  border-color: var(--border-light);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(60, 50, 40, 0.05);
}

.kbd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4.5px;
  font-size: 10px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-left: 6px;
  line-height: 1;
  vertical-align: middle;
}

[data-theme="light"] .kbd-badge {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.14);
  color: #475569;
}
