/* ==========================================================================
   Monis — <mm-viewer> 1:1 RemoteMacViewerWindow.swift Styles
   Compact .darkAqua unified titlebar + exact 1470:956 edge-to-edge desktop
   ========================================================================== */
mm-viewer {
  display: block;
  min-width: 0;
  color-scheme: dark;
}

.peer-window {
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #14161b;
  border-radius: 1.85% / 2.75%;
  overflow: hidden;
  box-shadow:
    0 28px 66px rgba(1, 4, 12, .66),
    inset 0 .11cqw 0 rgba(255, 255, 255, .22),
    0 0 0 1px rgba(255, 255, 255, .13);
  --peer-zoom: 1;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.peer-titlebar {
  height: 6.45cqw;
  min-height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 1.25cqw;
  padding: 0 1.85cqw;
  background: linear-gradient(180deg, #2d3038 0%, #24272f 100%);
  color: #f3f5f9;
  border-bottom: .1cqw solid rgba(255, 255, 255, .085);
  min-width: 0;
  user-select: none;
}

.peer-lights {
  display: flex;
  gap: .92cqw;
  align-items: center;
  flex: none;
}
.peer-lights i {
  width: 1.48cqw;
  height: 1.48cqw;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .26);
}
.peer-lights i:nth-child(2) { background: #febc2e; }
.peer-lights i:nth-child(3) { background: #28c840; }

.peer-title-group {
  display: flex;
  align-items: baseline;
  gap: .55cqw;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.peer-title-group > b {
  font-size: 1.68cqw;
  font-weight: 620;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: #f4f6fb;
}
.peer-title-group .pv-sub {
  font-size: 1.42cqw;
  font-weight: 440;
  color: #98a0b0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.peer-controls {
  display: flex;
  align-items: center;
  gap: .75cqw;
  flex: none;
}
.peer-controls button {
  font: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.peer-controls button:disabled {
  opacity: .38;
  cursor: default;
}

/* [ ● Controlling ▾ ] Session Status Capsule */
.pv-status-pill {
  display: inline-flex;
  align-items: center;
  gap: .52cqw;
  height: 4.1cqw;
  padding: 0 1.05cqw 0 .92cqw !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, .075) !important;
  border: .09cqw solid rgba(255, 255, 255, .13) !important;
  box-shadow: inset 0 .08cqw 0 rgba(255, 255, 255, .14);
  font-size: 1.38cqw !important;
  font-weight: 580 !important;
  color: #eef2f9 !important;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.pv-status-pill:hover:not(:disabled),
.pv-status-pill[aria-expanded="true"] {
  background: rgba(255, 255, 255, .13) !important;
  border-color: rgba(255, 255, 255, .24) !important;
}
.peer-indicator {
  width: .78cqw;
  height: .78cqw;
  border-radius: 50%;
  background: #777e8d;
  flex: none;
}
.peer-window[data-connected="true"] .peer-indicator {
  background: #30d158;
  box-shadow: 0 0 .5cqw rgba(48, 209, 88, .55);
}
.pv-status-ico {
  display: inline-grid;
  place-items: center;
  width: 1.48cqw;
  height: 1.48cqw;
  color: #a78bfa;
}
.peer-window[data-control="false"] .pv-status-ico {
  color: #7dd3fc;
}
.pv-status-ico svg {
  width: 100%;
  height: 100%;
}
.pv-chev {
  display: inline-grid;
  place-items: center;
  width: 1.25cqw;
  height: 1.25cqw;
  color: #9aa2b2;
}
.pv-chev svg {
  width: 100%;
  height: 100%;
}

/* [ ⌘ | 🖥 | 📋 ] Liquid Glass 3-Button Capsule */
.pv-tool-capsule {
  display: inline-flex;
  align-items: center;
  height: 4.1cqw;
  padding: .22cqw;
  gap: .18cqw;
  border-radius: 999px;
  background: rgba(255, 255, 255, .075);
  border: .09cqw solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 .08cqw 0 rgba(255, 255, 255, .14);
}
.pv-tool-capsule button {
  display: grid;
  place-items: center;
  width: 4.15cqw;
  height: 3.6cqw;
  border-radius: 999px;
  color: #dce2ee;
  transition: background .14s ease, color .14s ease;
}
.pv-tool-capsule button svg {
  width: 1.82cqw;
  height: 1.82cqw;
}
.pv-tool-capsule button:hover:not(:disabled) {
  background: rgba(255, 255, 255, .11);
  color: #ffffff;
}
.pv-tool-capsule button[aria-pressed="true"],
.pv-tool-capsule button[aria-expanded="true"] {
  background: rgba(92, 163, 255, .24);
  color: #8cc4ff;
}

/* 1470:956 Zero-Gap Full-Width Remote Desktop Surface */
.peer-surface {
  position: relative;
  width: 100%;
  aspect-ratio: 1470 / 956;
  min-height: 0;
  overflow: hidden;
  background: #0a0c10;
}
.peer-surface > .os-desktop {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  transform: scale(var(--peer-zoom));
  transform-origin: center;
  transition: transform .24s cubic-bezier(.22, .9, .3, 1);
}

.peer-off {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.25cqw;
  background: rgba(16, 18, 24, .94);
  backdrop-filter: blur(18px);
  color: #eef1f7;
}
.peer-off b {
  font-size: 2.8cqw;
  font-weight: 640;
  letter-spacing: -.015em;
}
.peer-off span {
  color: #9ba3b4;
  font-size: 1.65cqw;
}
.peer-off button {
  margin-top: .4cqw;
  background: #0a6cff;
  border: 0;
  color: #ffffff;
  padding: .72cqw 2.1cqw;
  border-radius: 999px;
  font: inherit;
  font-size: 1.58cqw;
  font-weight: 600;
  cursor: pointer;
}
.peer-off button:hover:not(:disabled) {
  background: #1f7bff;
}
.peer-off[hidden],
.peer-watch[hidden],
.peer-pop[hidden] {
  display: none !important;
}

.peer-watch {
  position: absolute !important;
  top: auto !important;
  right: 2.2% !important;
  bottom: 2.8% !important;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .6cqw;
  border-radius: 999px;
  color: #e6f3ff;
  background: rgba(18, 23, 34, .86);
  border: .09cqw solid rgba(125, 211, 252, .28);
  backdrop-filter: blur(20px);
  padding: .52cqw 1.35cqw;
  font-size: 1.45cqw;
  font-weight: 560;
}
.peer-watch svg {
  width: 1.55cqw;
  height: 1.55cqw;
  color: #7dd3fc;
}

/* Native Smoked-Glass Titlebar Popover (.peer-pop) */
.peer-pop {
  position: absolute;
  z-index: 5;
  top: 7.2cqw;
  right: 1.85cqw;
  width: 34%;
  padding: 1.15cqw;
  background: rgba(24, 28, 38, .96);
  border: .1cqw solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(28px) saturate(185%);
  -webkit-backdrop-filter: blur(28px) saturate(185%);
  box-shadow: 0 2.0cqw 4.8cqw rgba(0, 0, 0, .62), inset 0 .08cqw 0 rgba(255, 255, 255, .16);
  border-radius: 1.55cqw;
  font-size: 1.48cqw;
  line-height: 1.38;
  color: #f2f5fb;
}
.pv-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8cqw;
  padding: .25cqw .55cqw .75cqw;
  font-size: 1.32cqw;
  font-weight: 620;
  color: #9ba3b5;
}
.pv-pop-head em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 1.22cqw;
  color: #7d8698;
}
.pv-mode-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .32cqw;
  padding: .28cqw;
  margin-bottom: .65cqw;
  border-radius: 1.05cqw;
  background: rgba(255, 255, 255, .06);
  border: .08cqw solid rgba(255, 255, 255, .09);
}
.pv-mode-seg button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: .48cqw;
  padding: .58cqw .7cqw !important;
  border-radius: .82cqw;
  border: 0;
  background: transparent;
  color: #a6aec0;
  font: inherit;
  font-size: 1.38cqw;
  font-weight: 580;
  cursor: pointer;
}
.pv-mode-seg button svg {
  width: 1.45cqw;
  height: 1.45cqw;
}
.pv-mode-seg button[aria-pressed="true"] {
  background: rgba(255, 255, 255, .16);
  color: #ffffff;
  box-shadow: 0 .14cqw .4cqw rgba(0, 0, 0, .28);
}
.peer-pop > button,
.pv-pop-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .62cqw .82cqw !important;
  border: 0;
  border-radius: .82cqw;
  background: transparent;
  color: #eef2fa;
  font: inherit;
  font-size: 1.44cqw;
  text-align: left;
  cursor: pointer;
}
.peer-pop > button:hover:not(:disabled),
.pv-pop-row:hover {
  background: #0a6cff;
  color: #ffffff;
}
.pv-pop-row.is-danger {
  color: #ff6961;
}
.pv-pop-row.is-danger:hover {
  background: #e03e36;
  color: #ffffff;
}
.peer-pop kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.24cqw;
  color: #9ba4b8;
}
.peer-pop > button:hover kbd {
  color: rgba(255, 255, 255, .86);
}
.pv-pop-sep {
  height: .09cqw;
  margin: .42cqw .55cqw;
  background: rgba(255, 255, 255, .09);
}
.pv-check {
  color: #38bdf8;
  font-weight: 700;
}
.pv-pop-row:hover .pv-check {
  color: #ffffff;
}
.pv-mini-pill {
  border: 0;
  border-radius: 999px;
  padding: .28cqw .85cqw !important;
  background: rgba(255, 255, 255, .1);
  color: #e8eef8;
  font: inherit;
  font-size: 1.22cqw;
  font-weight: 600;
  cursor: pointer;
}
.pv-mini-pill:hover {
  background: rgba(255, 255, 255, .18);
}
.pv-mini-pill.is-done {
  background: rgba(56, 212, 168, .18);
  color: #38d4a8;
}
.pv-clip-card {
  margin: .2cqw 0 .75cqw;
  padding: .85cqw 1.0cqw;
  border-radius: 1.05cqw;
  background: #1c1f26;
  border: .09cqw solid rgba(255, 255, 255, .09);
  font-size: 1.34cqw;
  color: #e4e9f2;
  max-height: 9cqw;
  overflow: auto;
  word-break: break-word;
}
.peer-pop > button.pv-paste-btn {
  justify-content: center;
  background: #0a6cff;
  color: #ffffff;
  font-weight: 610;
  border-radius: 999px;
  padding: .65cqw 1.1cqw !important;
}
.peer-pop > button.pv-paste-btn:hover:not(:disabled) {
  background: #1f7bff;
}
.peer-pop > button.pv-paste-btn.is-done {
  background: rgba(56, 212, 168, .22);
  color: #38d4a8;
}
