/* PreekRecorder – additions to the phosmega-core stylesheet. */

:root {
  --meter-good: #2f9e44;
  --meter-warn: #e8a317;
  --meter-bad: #d9480f;
  --meter-bg: #ecebe6;
}

/* Church switcher in the header */
.church-switch { position: relative; }
.church-switch summary { cursor: pointer; list-style: none; color: inherit; padding: 6px 10px; }
.church-switch summary::-webkit-details-marker { display: none; }
.church-switch-list {
  position: absolute; right: 0; top: 100%; z-index: 20; min-width: 220px; padding: 6px 0;
  background: #fff; border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.church-switch-list a { display: block; padding: 8px 14px; color: #1d1d1b !important; white-space: nowrap; }
.church-switch-list a.active, .church-switch-list a:hover { background: #f1efe9; }

/* Live recorder meter */
.recorder { padding: 6px 0 4px; }
.recorder + .recorder { border-top: 1px solid rgba(0, 0, 0, .08); margin-top: 10px; padding-top: 14px; }
.recorder-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.recorder-head .muted { margin-left: auto; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #adb5bd; flex: none; }
.dot.ok { background: var(--meter-good); }
.dot.rec { background: #e03131; animation: pr-pulse 1.2s infinite; }
@keyframes pr-pulse { 50% { opacity: .35; } }

.meter, .scale { display: grid; grid-template-columns: 18px 1fr 56px; align-items: center; gap: 8px; }
.meter { margin: 8px 0; }
.bar { position: relative; height: 24px; background: var(--meter-bg); border-radius: 6px; overflow: hidden; }
.fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px 0 0 6px;
  background: linear-gradient(90deg, var(--meter-good) 0%, var(--meter-good) 70%, var(--meter-warn) 70%,
                              var(--meter-warn) 95%, var(--meter-bad) 95%);
  background-size: var(--full, 100%) 100%; transition: width .15s linear;
}
.hold { position: absolute; top: 0; bottom: 0; width: 3px; left: 0; background: #1d1d1b; opacity: .65; }
.zone { position: absolute; top: 0; bottom: 0; left: 70%; width: 25%; border-left: 1px dashed #868e96;
        border-right: 1px dashed #868e96; opacity: .6; }
.val { text-align: right; font-variant-numeric: tabular-nums; font-size: .9rem; }
.scale { font-size: .72rem; color: #6b6a66; }
.scale div:nth-child(2) { position: relative; height: 1.2em; }
.scale span { position: absolute; transform: translateX(-50%); }
.scale span:first-child { transform: none; }
.scale span:last-child { transform: translateX(-100%); }

.advice { margin: 10px 0; padding: 10px 12px; border-radius: 8px; font-weight: 600; background: var(--meter-bg); }
.advice.good { background: rgba(47, 158, 68, .16); }
.advice.lowish, .advice.high { background: rgba(232, 163, 23, .22); }
.advice.clip, .advice.none, .advice.low, .advice.offline { background: rgba(217, 72, 15, .18); }
.recorder-details { margin-top: 6px; }
.warn { color: var(--meter-bad); font-weight: 600; }

/* Admin */
.mono-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; width: 100%; margin: 8px 0; }
.command-result { white-space: pre-wrap; word-break: break-word; font-size: .8rem; margin: 0; max-height: 320px; overflow: auto; }
