/* Návrh zvukového efektu (core/sfx-request.js) — addon (sidepanel.html) i web ho načítají vedle
   sidepanel.css a soundboard.css; ve vzhledu soundboardu, panel se vkládá místo seznamu zvuků. */

.uc-sr { display: flex; flex-direction: column; flex: 1; min-height: 0; color: var(--text-primary); font-size: 13px; }
.uc-sr.hidden { display: none; }
.uc-sr [hidden] { display: none !important; }
.uc-sr-head { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border); }
.uc-sr-back {
  flex: none; width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--text-secondary); cursor: pointer;
}
.uc-sr-back:hover {
  color: var(--accent-light);
  background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box, var(--accent-gradient) border-box;
}
.uc-sr-title { font-weight: 700; color: var(--accent-light); white-space: nowrap; }
.uc-sr-limits { margin-left: auto; font-size: 11px; color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }
.uc-sr-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 9px; }

.uc-sr input, .uc-sr textarea {
  width: 100%; box-sizing: border-box; padding: 7px 9px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 5px;
  color: var(--text-primary); font: inherit; font-size: 13px; outline: none;
}
.uc-sr textarea { resize: vertical; min-height: 44px; }
.uc-sr input:focus, .uc-sr textarea:focus { border-color: var(--accent); }
.uc-sr input.invalid { border-color: #ff6b6b; }
.uc-sr-urlrow { display: flex; gap: 6px; }
.uc-sr-urlrow input { flex: 1; min-width: 0; }
.uc-sr-hint { margin-top: 5px; font-size: 11px; color: var(--text-muted); }
.uc-sr-go, .uc-sr-load {
  flex: none; padding: 7px 14px; border: none; border-radius: 999px; background: var(--accent-gradient); color: #1a1000;
  font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: var(--accent-glow);
}
.uc-sr-go:disabled, .uc-sr-load:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.uc-sr-other {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: transparent;
  color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer;
}
.uc-sr-other:hover { color: var(--text-primary); border-color: var(--accent); }
.uc-sr-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.uc-sr-loading { display: flex; align-items: center; gap: 9px; padding: 14px 4px; color: var(--text-secondary); }
.uc-sr-spin {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 140, 0, 0.25); border-top-color: var(--accent-light);
  animation: uc-sr-spin 0.8s linear infinite;
}
@keyframes uc-sr-spin { to { transform: rotate(360deg); } }

.uc-sr-edit { display: flex; flex-direction: column; gap: 9px; }
.uc-sr-src { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-sr-src b { color: var(--text-primary); }

/* Časová osa: průběh hlasitosti, úsek mezi značkami zvýrazněný, mimo něj ztmavené. */
.uc-sr-track {
  position: relative; height: 64px; margin: 0 7px; border-radius: 5px;
  background: var(--bg-secondary); touch-action: none; cursor: pointer; user-select: none;
}
.uc-sr-wave { position: absolute; inset: 4px 0; display: flex; align-items: center; gap: 1px; pointer-events: none; }
.uc-sr-wave i { flex: 1; min-width: 0; border-radius: 1px; background: var(--accent-light); opacity: 0.85; }
.uc-sr-dim { position: absolute; top: 0; bottom: 0; background: rgba(10, 10, 12, 0.62); pointer-events: none; }
.uc-sr-dim-l { left: 0; border-radius: 5px 0 0 5px; }
.uc-sr-dim-r { right: 0; border-radius: 0 5px 5px 0; }
.uc-sr-sel {
  position: absolute; top: 0; bottom: 0; pointer-events: none;
  border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); box-sizing: border-box;
  background: rgba(255, 170, 0, 0.1);
}
.uc-sr-h {
  position: absolute; top: -4px; bottom: -4px; width: 14px; margin-left: -7px; z-index: 2;
  border-radius: 4px; background: var(--accent-gradient); box-shadow: 0 0 6px rgba(255, 140, 0, 0.55);
  cursor: ew-resize; outline: none;
}
.uc-sr-h::after { content: ""; position: absolute; left: 6px; top: 30%; bottom: 30%; width: 2px; border-radius: 1px; background: rgba(26, 16, 0, 0.55); }
.uc-sr-h:focus-visible { box-shadow: 0 0 0 2px var(--text-primary), 0 0 8px rgba(255, 140, 0, 0.8); }
.uc-sr-track.dragging, .uc-sr-track.dragging .uc-sr-h { cursor: grabbing; }
.uc-sr-ph { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 4px rgba(255, 255, 255, 0.8); pointer-events: none; z-index: 1; }
.uc-sr-times { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.uc-sr-t em { font-style: normal; color: var(--text-muted); }
.uc-sr-t b { font-variant-numeric: tabular-nums; }
.uc-sr-play {
  width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none;
  border: none; border-radius: 50%; background: var(--accent-gradient); color: #1a1000; cursor: pointer; box-shadow: var(--accent-glow);
}
.uc-sr-play.playing { background: var(--bg-hover); color: var(--accent-light); box-shadow: inset 0 0 0 1px var(--accent); }

/* Embed režim (YouTube přehrávač místo náhledu ze serveru): video 16:9, osa bez průběhu hlasitosti. */
.uc-sr-yt { position: relative; }
.uc-sr-yt-box { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; }
.uc-sr-yt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.uc-sr-yt-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 12px; pointer-events: none; }
.uc-sr-track.uc-sr-flat { height: 34px; background: linear-gradient(180deg, rgba(255, 200, 0, 0.22), rgba(255, 140, 0, 0.14)); }
.uc-sr-track.uc-sr-off { opacity: 0.4; cursor: default; pointer-events: none; }
.uc-sr-track.uc-sr-off .uc-sr-h, .uc-sr-track.uc-sr-off .uc-sr-sel { visibility: hidden; }
.uc-sr-play:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.uc-sr-manual { display: flex; flex-direction: column; gap: 8px; }
.uc-sr-manual-t { font-size: 12px; color: var(--text-secondary); }
.uc-sr-manual-t a { color: var(--accent-light); }
.uc-sr-manual-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; }
.uc-sr-manual-len { padding-bottom: 8px; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }

.uc-sr-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.uc-sr-l { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.uc-sr-l em { margin-left: auto; font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: 0.8; }
.uc-sr-cmd { font-family: ui-monospace, monospace; color: var(--accent-light); opacity: 1 !important; }

.uc-sr-done { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 4px; text-align: center; color: var(--text-secondary); }
.uc-sr-done p { margin: 0; }
.uc-sr-done b { color: var(--accent-light); }
.uc-sr-err { color: #ff8a8a; font-size: 12px; }

.uc-sr-mine { border-top: 1px solid var(--border); padding-top: 8px; }
.uc-sr-mine-h { margin-bottom: 5px; color: var(--text-secondary); font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.uc-sr-empty { padding: 6px 0; color: var(--text-muted); font-size: 12px; }
.uc-sr-r { padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.uc-sr-rrow { display: flex; align-items: center; gap: 8px; }
.uc-sr-rn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.uc-sr-st { flex: none; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.uc-sr-st-pending { background: rgba(255, 200, 0, 0.12); color: var(--accent-light); }
.uc-sr-st-approved { background: rgba(80, 200, 100, 0.14); color: #7fd18b; }
.uc-sr-st-rejected { background: rgba(255, 90, 90, 0.14); color: #ff8a8a; }
.uc-sr-rsub { margin-top: 2px; font-size: 11px; color: var(--text-muted); overflow-wrap: anywhere; }
