/* BioStudio AI — styles for the extended feature batch:
   desktop drop hint, shortcut help overlay, voice mic, magnifier badge,
   clipboard history flyout, sticky notes, screen recorder, in-app tab strips. */

/* --- #7 always-on-top pin button --------------------------------------- */
.win-btn.pin { opacity: 0.55; }
.win-btn.pin:hover { opacity: 1; }
.win-btn.pin.active { opacity: 1; color: var(--accent); }
.window.always-on-top .win-btn.pin { opacity: 1; color: var(--accent); }
/* macOS theme uses traffic-light controls; keep the pin to the menu/shortcut. */
#os.theme-macos .win-btn.pin, body.theme-macos .win-btn.pin { display: none; }

/* --- #34 external file drop hint --------------------------------------- */
.desktop-surface.file-drop-active::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2.5px dashed rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  background: rgba(40, 90, 200, 0.18);
  z-index: 5;
  pointer-events: none;
}
.desktop-surface.file-drop-active::after {
  content: "Drop files to add them to the Desktop";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 14px 22px;
  border-radius: 12px;
  background: rgba(20, 30, 60, 0.72);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  z-index: 6;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

/* --- generic centered overlay (shortcut help) -------------------------- */
.bs-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 28, 0.45);
  backdrop-filter: blur(4px);
  animation: bs-overlay-in 0.14s ease;
}
@keyframes bs-overlay-in { from { opacity: 0; } to { opacity: 1; } }
.bs-overlay-card {
  width: min(720px, 92vw);
  max-height: 84vh;
  overflow: auto;
  background: var(--card-bg, rgba(250, 250, 253, 0.98));
  color: var(--ink);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  padding: 22px 26px 26px;
}
.dark .bs-overlay-card { background: rgba(32, 34, 42, 0.98); }
.bs-overlay-card h2 { font-size: 18px; margin-bottom: 4px; }
.bs-overlay-sub { color: var(--ink-soft); font-size: 13px; margin-bottom: 16px; }
.bs-shortcut-group { margin-top: 16px; }
.bs-shortcut-group h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.bs-shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 8px;
  border-radius: 7px;
}
.bs-shortcut-row:nth-child(even) { background: rgba(127, 127, 127, 0.07); }
.bs-shortcut-desc { font-size: 14px; }
.bs-keys { display: flex; gap: 5px; flex-shrink: 0; }
.bs-key {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(127, 127, 127, 0.16);
  border: 1px solid rgba(127, 127, 127, 0.22);
  white-space: nowrap;
}
.bs-overlay-close {
  position: sticky;
  top: 0;
  float: right;
  font-size: 20px;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--ink-soft);
}
.bs-overlay-close:hover { background: rgba(127, 127, 127, 0.16); }

/* --- #24 voice typing mic indicator ------------------------------------ */
.bs-voice-mic {
  position: fixed;
  left: 50%;
  bottom: calc(var(--taskbar-h) + 24px);
  transform: translateX(-50%);
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 24, 40, 0.92);
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  font-size: 13px;
}
.bs-voice-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff4d5e;
  animation: bs-pulse 1s ease-in-out infinite;
}
@keyframes bs-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.bs-voice-mic button {
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

/* --- #22 magnifier badge ----------------------------------------------- */
.bs-magnifier-badge {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(20, 24, 40, 0.9);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.bs-magnifier-badge button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
}

/* --- #1 clipboard history flyout --------------------------------------- */
.flyout.clipboard-history {
  width: 360px;
  max-height: 460px;
  display: flex;
  flex-direction: column;
  padding: 12px;
}
.clip-hist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.clip-hist-head h3 { font-size: 14px; }
.clip-hist-list { overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.clip-hist-item {
  text-align: left;
  width: 100%;
  border-radius: 9px;
  padding: 10px 12px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.clip-hist-item:hover { border-color: var(--accent); }
.clip-hist-kind { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.clip-hist-preview {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 3.2em;
}
.clip-hist-pin {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 12px;
  opacity: 0.5;
}
.clip-hist-pin.pinned { opacity: 1; }
.clip-hist-empty { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 24px 0; }

/* --- #5 sticky notes --------------------------------------------------- */
.bs-sticky-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}
.bs-sticky {
  position: absolute;
  width: 220px;
  min-height: 180px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  font-family: var(--font);
}
.bs-sticky-bar {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: grab;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px 4px 0 0;
}
.bs-sticky-bar:active { cursor: grabbing; }
.bs-sticky-actions { display: flex; gap: 2px; }
.bs-sticky-actions button {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.6);
}
.bs-sticky-actions button:hover { background: rgba(0, 0, 0, 0.12); }
.bs-sticky-text {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.4;
  color: #2a2a22;
}
.bs-sticky-colors { display: flex; gap: 4px; padding: 0 6px; }
.bs-sticky-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
}

/* --- in-app tab strip (#15 Files + Notepad) ---------------------------- */
.bs-tabstrip {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px 0;
  background: rgba(127, 127, 127, 0.06);
  overflow-x: auto;
}
.bs-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  max-width: 200px;
}
.bs-tab.active { background: var(--card-bg, rgba(255, 255, 255, 0.9)); color: var(--ink); font-weight: 600; }
.dark .bs-tab.active { background: rgba(40, 42, 50, 0.9); }
.bs-tab-label { overflow: hidden; text-overflow: ellipsis; }
.bs-tab-close { font-size: 14px; line-height: 1; opacity: 0.55; border-radius: 4px; width: 18px; height: 18px; }
.bs-tab-close:hover { opacity: 1; background: rgba(127, 127, 127, 0.2); }
.bs-tab-new { font-size: 18px; line-height: 1; padding: 4px 10px; color: var(--ink-soft); border-radius: 6px; }
.bs-tab-new:hover { background: rgba(127, 127, 127, 0.16); }

/* --- #20 screen recorder ----------------------------------------------- */
.bs-rec { display: flex; flex-direction: column; height: 100%; }
.bs-rec-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.bs-rec-timer { font-size: 42px; font-variant-numeric: tabular-nums; font-weight: 300; }
.bs-rec-status { color: var(--ink-soft); font-size: 14px; max-width: 420px; line-height: 1.5; }
.bs-rec-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #ff4d5e; margin-right: 8px; vertical-align: middle; animation: bs-pulse 1s ease-in-out infinite; }
.bs-rec-controls { display: flex; gap: 10px; }
.bs-rec-clips { padding: 12px 16px; border-top: 1px solid rgba(127,127,127,0.18); max-height: 200px; overflow: auto; }
.bs-rec-clip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.bs-rec-clip:hover { background: rgba(127,127,127,0.08); }

/* --- #31 wallpaper personalization preview ----------------------------- */
.bs-wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.bs-wall-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  border: 2.5px solid transparent;
  position: relative;
  overflow: hidden;
}
.bs-wall-thumb.active { border-color: var(--accent); }
.bs-wall-thumb span {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  font-size: 11px;
  padding: 3px 6px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  text-align: center;
}
.bs-field-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.bs-field-row label { font-size: 13px; min-width: 92px; color: var(--ink-soft); }
.bs-select {
  font-family: inherit;
  font-size: 13px;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid rgba(127, 127, 127, 0.3);
  background: var(--card-bg, rgba(255, 255, 255, 0.9));
  color: var(--ink);
}
.dark .bs-select { background: rgba(40, 42, 50, 0.9); }

/* --- #33 timeline snapshots -------------------------------------------- */
.bs-snap-list { display: flex; flex-direction: column; gap: 8px; }
.bs-snap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(127, 127, 127, 0.08);
}
.bs-snap-meta { font-size: 13px; }
.bs-snap-sub { font-size: 12px; color: var(--ink-soft); }

/* second-display marker for the booted secondary tab */
#os.display-secondary .taskbar-start { pointer-events: auto; }
.bs-display-badge {
  position: fixed;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(20, 24, 40, 0.7);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.04em;
  pointer-events: none;
}
