/* SPDX-FileCopyrightText: 2026 leauny
 * SPDX-License-Identifier: GPL-3.0-only */

/* Layout for the secondary pages (settings, receivers). */
.page { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
.bnav { display: flex; align-items: center; height: 44px; padding: 0 16px; margin-top: var(--safe-t); }
.bnav .back { display: flex; align-items: center; gap: 3px; color: var(--tint); font-size: 17px; }
.bnav .back b { font-size: 28px; font-weight: 300; line-height: 1; margin-top: -4px; }
.bnav .act { color: var(--tint); font-size: 17px; }
.ltitle { padding: 0 16px 6px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.formcol { width: 100%; max-width: 620px; margin: 0 auto; padding: 0 16px calc(var(--safe-b) + 32px); }
.formcol .ghead, .formcol .gnote { padding-left: 16px; padding-right: 16px; }
.idcard { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.idcard .av { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--tint-soft); color: var(--tint); display: grid; place-items: center; }
.idcard .av svg { width: 26px; height: 26px; stroke-width: 1.6; }
.idcard b { font-size: 17px; font-weight: 600; }
.idcard small { display: block; margin-top: 2px; font-size: 13px; color: var(--label-2); }
.idcard .dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; vertical-align: 1px; box-shadow: none; }
.locked { opacity: .38; pointer-events: none; }
.btnwrap { padding-top: 16px; }
.spin { display: inline-block; width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; border-radius: 50%;
  border: 2px solid var(--fill-2); border-top-color: var(--label-2); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sh-icon { width: 60px; height: 60px; margin: 0 auto 8px; border-radius: 16px; background: var(--tint-soft); color: var(--tint); display: grid; place-items: center; }
.sh-icon svg { width: 32px; height: 32px; stroke-width: 1.6; }
.sh-title { text-align: center; font-size: 17px; font-weight: 600; }
.sh-sub { text-align: center; font-size: 13px; color: var(--label-2); margin-top: 2px; }
/* Confirmation: iOS action sheet on phone, centred alert on desktop */
dialog.confirm { margin: auto auto calc(var(--safe-b) + 12px); width: calc(100% - 16px); max-width: 420px; border: 0; padding: 0; background: none; color: var(--label); overflow: visible; }
dialog.confirm::backdrop { background: rgba(0,0,0,.3); }
.confirm .ag { overflow: hidden; border-radius: 14px; text-align: center; background: var(--material);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.confirm .am { padding: 14px 18px; font-size: 13px; line-height: 1.45; color: var(--label-2); }
.confirm .am b { display: block; margin-bottom: 4px; font-size: 15px; color: var(--label); }
.confirm .af { display: block; width: calc(100% - 32px); height: 36px; margin: 0 16px 14px; padding: 0 10px; border: 0; outline: none; border-radius: 8px;
  background: var(--surface); box-shadow: inset 0 0 0 .5px var(--sep); font-size: 16px; }
.confirm .ab { display: block; width: 100%; height: 56px; border-top: .5px solid var(--sep); color: var(--red); font-size: 19px; }
.confirm .cancel { display: block; width: 100%; height: 56px; margin-top: 8px; border-radius: 14px; background: var(--surface); color: var(--tint); font-size: 19px; font-weight: 600; }
html[data-form="desktop"] dialog.confirm { margin: auto; max-width: 300px; }
html[data-form="desktop"] .confirm .ab { height: 44px; font-size: 15px; font-weight: 600; }
html[data-form="desktop"] .confirm .cancel { height: 44px; margin-top: 0; border-radius: 0; background: var(--material); font-size: 15px; font-weight: 400; border-top: .5px solid var(--sep); }
html[data-form="desktop"] .confirm form { overflow: hidden; border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
html[data-form="desktop"] .confirm .ag { border-radius: 0; }
@media (min-width: 1024px) {
  html[data-form="desktop"] .formcol { padding-top: 20px; }
  html[data-form="desktop"] .ltitle { display: none; }
  html[data-form="desktop"] .li { font-size: 14px; min-height: 42px; }
  html[data-form="desktop"] .li input:not([type=checkbox]) { flex: none; width: 240px; height: 26px; padding: 0 8px; border-radius: 6px; text-align: left; font-size: 13.5px;
    background: var(--surface); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.25); margin-left: auto; }
  html[data-form="desktop"] .li input:focus { box-shadow: inset 0 0 0 1px var(--tint), 0 0 0 3px rgba(0,122,255,.3); }
  html[data-form="desktop"] .btnwrap { display: flex; justify-content: flex-end; }
  html[data-form="desktop"] .btnwrap .btn { width: auto; height: 30px; border-radius: 7px; font-size: 13.5px; font-weight: 500; padding: 0 14px; }
}
.sig { display: flex; align-items: flex-end; gap: 2px; width: 20px; height: 14px; flex: none; }
.sig i { width: 3px; border-radius: 1px; background: var(--label); }
.sig i:nth-child(1) { height: 4px; } .sig i:nth-child(2) { height: 7px; } .sig i:nth-child(3) { height: 10px; } .sig i:nth-child(4) { height: 14px; }
.sig i.o { background: var(--fill-2); }
#paired-targets .li .chev { opacity: 0; transition: opacity .15s; }
#paired-targets .li:hover .chev, #paired-targets .li:focus-visible .chev { opacity: 1; }
html[data-form="phone"] #paired-targets .li .chev { opacity: 1; color: var(--label-3) !important; font-size: 17px !important; }

/* Receiver LED colours */
.swatch { display: inline-block; width: 22px; height: 22px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.25); }
button.swatch:disabled { opacity: 1; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tint); }
.swatch.legend { width: 16px; height: 16px; margin: 0 3px; }
.swatch.breathe { animation: itg-breathe 2.4s ease-in-out infinite; }
.swatch.blink { animation: itg-blink 1s steps(1) infinite; }
.swatch.blink-fast { animation: itg-blink .25s steps(1) infinite; }
@keyframes itg-breathe { 50% { opacity: .15; } }
@keyframes itg-blink { 50% { opacity: .1; } }
.palette { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 16px; }
.palette .pchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 16px; background: var(--surface); font-size: 13px; }
.palette .pchip .swatch { width: 18px; height: 18px; }
.palette.pick { padding: 4px 12px 14px; justify-content: center; }
.palette.pick .pchip { background: var(--fill); }
@media (prefers-reduced-motion: reduce) { .swatch.breathe, .swatch.blink, .swatch.blink-fast { animation: none; } }

/* Status light settings */
.li input#led-brightness { flex: 1; min-width: 0; height: auto; padding: 0; background: none; box-shadow: none; accent-color: var(--tint); }
.led-value { width: 44px; flex: none; text-align: right; color: var(--label-2); font-variant-numeric: tabular-nums; }
.led-color-row { flex-wrap: wrap; }
.led-color-row .palette.pick { flex: 1; justify-content: flex-start; padding: 4px 0; }
