/* ════════════════════════════════════════════════════════════════
   Site-wide Spotlight search (b1_69)
   Standalone — does NOT depend on cinematic-gallery.css being loaded.
   Namespace: .omtb-spotlight* (distinct from the old .mb-cg-spotlight*).
   Inspired by macOS Spotlight — frosted glass, big typography,
   live grouped results, cubic-bezier(0.16, 1, 0.3, 1) spring.
   ════════════════════════════════════════════════════════════════ */

.omtb-spotlight[hidden] { display: none !important; }
.omtb-spotlight {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}
.omtb-spotlight.is-open { pointer-events: auto; }

body.omtb-spotlight-lock { overflow: hidden; }

.omtb-spotlight__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 320ms cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 320ms cubic-bezier(0.16, 1, 0.3, 1),
              -webkit-backdrop-filter 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.omtb-spotlight.is-open .omtb-spotlight__backdrop {
  background: rgba(6, 8, 12, 0.55);
  backdrop-filter: saturate(130%) blur(16px);
  -webkit-backdrop-filter: saturate(130%) blur(16px);
}

.omtb-spotlight__panel {
  position: relative;
  width: min(640px, calc(100vw - 40px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: rgba(26, 28, 34, 0.82);
  backdrop-filter: saturate(160%) blur(28px);
  -webkit-backdrop-filter: saturate(160%) blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  color: rgba(236, 239, 245, 0.95);
  transform: translateY(-12px) scale(0.96);
  opacity: 0;
  transition:
    transform 380ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 260ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.omtb-spotlight.is-open .omtb-spotlight__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.omtb-spotlight__search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.omtb-spotlight__icon {
  width: 20px;
  height: 20px;
  color: rgba(236, 239, 245, 0.6);
  flex: 0 0 auto;
}
.omtb-spotlight__input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: inherit;
  font-family: inherit;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 2px 0;
  caret-color: rgba(160, 210, 255, 0.95);
}
.omtb-spotlight__input::placeholder { color: rgba(235, 238, 244, 0.4); }
.omtb-spotlight__input::-webkit-search-cancel-button,
.omtb-spotlight__input::-webkit-search-decoration { display: none; }

.omtb-spotlight__clear {
  appearance: none;
  border: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(236, 239, 245, 0.7);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 160ms;
}
.omtb-spotlight__clear:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.omtb-spotlight__body {
  overflow-y: auto;
  flex: 1 1 auto;
  padding: 8px 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.omtb-spotlight__body::-webkit-scrollbar { width: 6px; }
.omtb-spotlight__body::-webkit-scrollbar-track { background: transparent; }
.omtb-spotlight__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.omtb-spotlight__body::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

.omtb-spotlight__hint {
  padding: 18px 18px;
  color: rgba(236, 239, 245, 0.55);
  font-size: 13.5px;
}
.omtb-spotlight__hint--searching { color: rgba(236, 239, 245, 0.7); }

.omtb-spotlight__group + .omtb-spotlight__group { margin-top: 6px; }
.omtb-spotlight__group-label {
  padding: 10px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(236, 239, 245, 0.42);
}
.omtb-spotlight__list { margin: 0; padding: 0; list-style: none; }

.omtb-spotlight__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.omtb-spotlight__row:hover,
.omtb-spotlight__row:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}
.omtb-spotlight__row-thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-color: #1f2127;
  background-size: cover;
  background-position: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 4px 12px rgba(0, 0, 0, 0.4);
}
.omtb-spotlight__row-thumb--none {
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}
.omtb-spotlight__row-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.omtb-spotlight__row-title {
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(245, 247, 251, 0.96);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.omtb-spotlight__row-meta {
  font-size: 12px;
  color: rgba(236, 239, 245, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.omtb-spotlight__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: rgba(236, 239, 245, 0.5);
}
.omtb-spotlight__footer kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 11px;
  margin: 0 2px;
}

/* Mobile tuning */
@media (max-width: 767px) {
  .omtb-spotlight { padding-top: 6vh; }
  .omtb-spotlight__panel { border-radius: 14px; width: calc(100vw - 20px); }
  .omtb-spotlight__input { font-size: 18px; }
}
