/* TRANSMITTER WINDOW */
.transmitter-window {
  position: fixed;
  display: flex;
  flex-direction: column;
  width: 330px;
  max-width: calc(100vw - 24px);
  height: 273px;
  max-height: calc(100vh - 24px);
  min-width: 330px;
  min-height: 220px;
  border: none;
  outline: 1px solid rgba(78, 136, 126, 0.12);
  box-shadow:
    0 0 0 1px rgba(118, 198, 182, 0.05),
    0 12px 60px rgba(0, 0, 0, 0.85),
    0 2px 16px rgba(0, 0, 0, 0.6),
    inset 0 0 80px rgba(10, 22, 20, 0.28);
  z-index: 115;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.1) 2px,
      rgba(0, 0, 0, 0.1) 3px
    ),
    linear-gradient(
      to left,
      rgba(118, 198, 182, 0.42) 0%,
      rgba(118, 198, 182, 0.12) 60%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      rgba(118, 198, 182, 0.42) 0%,
      rgba(118, 198, 182, 0.12) 60%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      rgba(118, 198, 182, 0.42) 0%,
      rgba(118, 198, 182, 0.12) 60%,
      transparent 100%
    ),
    linear-gradient(
      to top,
      rgba(118, 198, 182, 0.42) 0%,
      rgba(118, 198, 182, 0.12) 60%,
      transparent 100%
    );
  background-color: rgba(5, 12, 14, 0.978);
  background-size:
    100% var(--scanline-gap),
    var(--corner-size) 1px,
    1px var(--corner-size),
    var(--corner-size) 1px,
    1px var(--corner-size);
  background-position:
    0 0,
    top right,
    top right,
    bottom left,
    bottom left;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

.warning-window {
  width: 360px;
  max-width: calc(100vw - 48px);
  height: auto;
  min-height: 0;
}

.transmitter-window.daily-limit-warning::before {
  background:
    linear-gradient(
        to right,
        rgba(236, 178, 208, 0.48) 0%,
        rgba(236, 178, 208, 0.14) 60%,
        transparent 100%
      )
      top / 100% 1px no-repeat,
    linear-gradient(
        to bottom,
        rgba(236, 178, 208, 0.48) 0%,
        rgba(236, 178, 208, 0.14) 60%,
        transparent 100%
      )
      left / 1px 100% no-repeat;
}

.transmitter-window.daily-limit-warning::after {
  background:
    linear-gradient(
        to left,
        rgba(236, 178, 208, 0.48) 0%,
        rgba(236, 178, 208, 0.14) 60%,
        transparent 100%
      )
      bottom / 100% 1px no-repeat,
    linear-gradient(
        to top,
        rgba(236, 178, 208, 0.48) 0%,
        rgba(236, 178, 208, 0.14) 60%,
        transparent 100%
      )
      right / 1px 100% no-repeat;
}

.heart-zone-warning {
  outline: 1px solid rgba(214, 156, 186, 0.18);
  box-shadow:
    0 0 0 1px rgba(238, 194, 214, 0.06),
    0 12px 60px rgba(0, 0, 0, 0.85),
    0 2px 16px rgba(0, 0, 0, 0.6),
    inset 0 0 80px rgba(36, 18, 28, 0.2);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.08) 2px,
      rgba(0, 0, 0, 0.08) 3px
    ),
    linear-gradient(
      to left,
      rgba(224, 166, 196, 0.42) 0%,
      rgba(224, 166, 196, 0.12) 60%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      rgba(224, 166, 196, 0.42) 0%,
      rgba(224, 166, 196, 0.12) 60%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      rgba(224, 166, 196, 0.42) 0%,
      rgba(224, 166, 196, 0.12) 60%,
      transparent 100%
    ),
    linear-gradient(
      to top,
      rgba(224, 166, 196, 0.42) 0%,
      rgba(224, 166, 196, 0.12) 60%,
      transparent 100%
    );
  background-color: rgba(18, 8, 14, 0.978);
}

.transmitter-window.heart-zone-warning::before {
  background:
    linear-gradient(
        to right,
        rgba(118, 198, 182, 0.48) 0%,
        rgba(118, 198, 182, 0.14) 60%,
        transparent 100%
      )
      top / 100% 1px no-repeat,
    linear-gradient(
        to bottom,
        rgba(118, 198, 182, 0.48) 0%,
        rgba(118, 198, 182, 0.14) 60%,
        transparent 100%
      )
      left / 1px 100% no-repeat;
}

.transmitter-window.heart-zone-warning::after {
  background:
    linear-gradient(
        to left,
        rgba(118, 198, 182, 0.48) 0%,
        rgba(118, 198, 182, 0.14) 60%,
        transparent 100%
      )
      bottom / 100% 1px no-repeat,
    linear-gradient(
        to top,
        rgba(118, 198, 182, 0.48) 0%,
        rgba(118, 198, 182, 0.14) 60%,
        transparent 100%
      )
      right / 1px 100% no-repeat;
}

.transmitter-window::before,
.transmitter-window::after {
  content: "";
  position: absolute;
  width: var(--corner-size);
  height: var(--corner-size);
  pointer-events: none;
  z-index: 10;
}

.transmitter-window::before {
  top: 0;
  left: 0;
  background:
    linear-gradient(
        to right,
        rgba(236, 178, 208, 0.48) 0%,
        rgba(236, 178, 208, 0.14) 60%,
        transparent 100%
      )
      top / 100% 1px no-repeat,
    linear-gradient(
        to bottom,
        rgba(236, 178, 208, 0.48) 0%,
        rgba(236, 178, 208, 0.14) 60%,
        transparent 100%
      )
      left / 1px 100% no-repeat;
}

.transmitter-window::after {
  bottom: 0;
  right: 0;
  background:
    linear-gradient(
        to left,
        rgba(236, 178, 208, 0.48) 0%,
        rgba(236, 178, 208, 0.14) 60%,
        transparent 100%
      )
      bottom / 100% 1px no-repeat,
    linear-gradient(
        to top,
        rgba(236, 178, 208, 0.48) 0%,
        rgba(236, 178, 208, 0.14) 60%,
        transparent 100%
      )
      right / 1px 100% no-repeat;
}

.transmitter-window ::selection {
  background: rgba(118, 198, 182, 0.28);
  color: rgba(236, 250, 246, 0.98);
  text-shadow: none;
}

.heart-zone-warning ::selection {
  background: rgba(224, 166, 196, 0.3);
  color: rgba(252, 240, 246, 0.98);
}

.transmitter-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  border-bottom: 1px solid rgba(118, 198, 182, 0.12);
  font-size: 7px;
  letter-spacing: 0.22em;
  color: rgba(186, 224, 214, 0.36);
  flex-shrink: 0;
  cursor: var(--cursor-grab);
  user-select: none;
  font-family: var(--font-mono);
  line-height: 1;
  text-shadow: var(--glow-teal-low);
}

.transmitter-close {
  cursor: var(--cursor-pointer);
  color: rgba(236, 178, 208, 0.46);
  font-size: 9px;
  background: none;
  border: none;
  font-family: var(--font-mono);
  padding: 0;
  transition:
    color 0.2s,
    text-shadow 0.2s;
}

.transmitter-close:hover,
.transmitter-close:focus,
.transmitter-close:focus-visible {
  outline: none;
  box-shadow: none;
  color: rgba(248, 220, 234, 0.95);
  text-shadow:
    0 0 4px rgba(238, 194, 218, 0.62),
    0 0 12px rgba(214, 154, 188, 0.26);
}

.daily-limit-warning .transmitter-close {
  color: rgba(236, 178, 208, 0.46);
}

.daily-limit-warning .transmitter-close:hover,
.daily-limit-warning .transmitter-close:focus,
.daily-limit-warning .transmitter-close:focus-visible {
  color: rgba(248, 220, 234, 0.95);
  text-shadow:
    0 0 4px rgba(238, 194, 218, 0.62),
    0 0 12px rgba(214, 154, 188, 0.26);
}

.heart-zone-warning .transmitter-close {
  color: rgba(118, 198, 182, 0.48);
}

.heart-zone-warning .transmitter-close:hover,
.heart-zone-warning .transmitter-close:focus,
.heart-zone-warning .transmitter-close:focus-visible {
  color: rgba(220, 224, 234, 0.94);
  text-shadow:
    0 0 4px rgba(196, 202, 216, 0.58),
    0 0 12px rgba(162, 170, 188, 0.24);
}

.transmitter-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 24px 14px;
  color: rgba(188, 226, 218, 0.78);
  line-height: 1.2;
  font-size: 10px;
  font-family: var(--font-mono);
  text-shadow: var(--glow-teal-medium);
  scrollbar-width: thin;
  scrollbar-color: rgba(118, 198, 182, 0.12) transparent;
  position: relative;
}

.update-log-window {
  width: 520px;
  min-width: 380px;
  min-height: 280px;
  height: 360px;
}

.update-log-body::before {
  content: attr(data-coord);
  position: absolute;
  top: 18px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 7px;
  color: rgba(170, 214, 206, 0.12);
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  pointer-events: none;
  user-select: none;
}

.update-log-entry {
  margin-top: 0;
  margin-bottom: 0;
  padding: 9px 12px 10px;
}

.update-log-entry + .update-log-entry {
  margin-top: 8px;
}

.update-log-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.update-log-slug,
.update-log-date {
  font-size: 8px;
  letter-spacing: 0.12em;
}

.update-log-slug {
  color: rgba(214, 240, 234, 0.9);
  text-shadow: var(--glow-teal-high);
}

.update-log-date {
  color: rgba(170, 214, 206, 0.5);
}

.update-log-value {
  margin: 0;
  color: rgba(216, 244, 238, 0.84);
}

.update-log-line {
  line-height: 1.55;
}

.warning-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 10px;
  min-height: 0;
}

.warning-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.warning-kicker {
  color: rgba(236, 198, 166, 0.78);
  text-shadow:
    0 0 4px rgba(232, 194, 160, 0.7),
    0 0 14px rgba(174, 126, 98, 0.24),
    0 0 34px rgba(150, 98, 76, 0.12);
}

.heart-zone-warning .transmitter-titlebar {
  border-bottom-color: rgba(224, 166, 196, 0.14);
  color: rgba(238, 202, 220, 0.42);
  text-shadow: var(--glow-violet-low);
}

.heart-zone-warning .transmitter-body {
  color: rgb(211 119 165 / 82%);
  text-shadow:
    0 0 4px rgba(226, 156, 194, 0.48),
    0 0 14px rgba(192, 112, 154, 0.2),
    0 0 34px rgba(160, 86, 128, 0.1);
}

.heart-zone-warning .warning-kicker {
  color: rgba(246, 210, 226, 0.9);
  text-shadow:
    0 0 4px rgba(242, 206, 224, 0.72),
    0 0 14px rgba(208, 150, 182, 0.28),
    0 0 34px rgba(176, 112, 142, 0.14);
}

.heart-zone-warning .transmitter-btn {
  border-top-color: rgba(240, 212, 226, 0.28);
  border-left-color: rgba(240, 212, 226, 0.28);
  border-right-color: rgba(84, 50, 66, 0.9);
  border-bottom-color: rgba(84, 50, 66, 0.9);
  background: rgba(26, 12, 20, 0.72);
  color: rgba(242, 220, 232, 0.86);
}

.heart-zone-warning .transmitter-btn-primary {
  border-top-color: rgba(248, 226, 236, 0.34);
  border-left-color: rgba(248, 226, 236, 0.34);
  color: rgba(250, 234, 242, 0.94);
  background: rgba(34, 16, 26, 0.82);
}

.warning-body .transmitter-actions {
  position: static;
  margin-top: 20px;
  justify-content: flex-end;
}

.transmitter-kicker {
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(178, 224, 214, 0.66);
}

.transmitter-copy {
  margin-bottom: 8px;
}

.transmitter-form-intro {
  color: rgb(211 119 165 / 82%);
}

.transmitter-error {
  margin-top: 8px;
  color: rgba(236, 188, 164, 0.88);
  text-shadow:
    0 0 4px rgba(236, 188, 164, 0.6),
    0 0 12px rgba(174, 126, 98, 0.18);
}

.transmitter-coord,
.transmitter-summary {
  color: rgba(170, 214, 206, 0.62);
}

.transmitter-coord {
  margin-top: 8px;
  letter-spacing: 0.08em;
  color: rgba(214, 240, 234, 0.82);
  text-shadow: var(--glow-teal-low);
}

.transmitter-summary {
  border: 1px solid rgba(118, 198, 182, 0.16);
  background: rgba(10, 22, 20, 0.26);
  padding: 8px 10px;
  margin-bottom: 10px;
  margin-top: 10px;
  color: rgba(186, 226, 218, 0.74);
}

.transmitter-coord.is-retargeted,
.transmitter-summary-row.is-retargeted {
  color: rgba(228, 252, 248, 0.92);
  text-shadow: var(--glow-teal-high);
}

.transmitter-summary-row + .transmitter-summary-row {
  margin-top: 6px;
}

.transmitter-retarget-hint {
  color: rgba(170, 214, 206, 0.42);
  text-shadow: none;
}

.transmitter-summary-message {
  margin-top: 8px;
  color: rgba(216, 244, 238, 0.84);
}

.transmitter-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.transmitter-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(176, 216, 208, 0.56);
}

.transmitter-input {
  width: 100%;
  border-top: 1px solid rgba(168, 232, 220, 0.26);
  border-left: 1px solid rgba(168, 232, 220, 0.26);
  border-right: 1px solid rgba(44, 80, 74, 0.85);
  border-bottom: 1px solid rgba(44, 80, 74, 0.85);
  background: rgba(7, 18, 18, 0.72);
  color: rgba(246, 220, 236, 0.9);
  caret-color: rgba(250, 224, 240, 0.96);
  font: inherit;
  line-height: 1.2;
  padding: 5px 10px;
  outline: none;
  box-shadow: inset 0 0 16px rgba(8, 20, 18, 0.2);
}

.transmitter-input::placeholder {
  color: rgba(232, 190, 214, 0.42);
}

.transmitter-input:focus {
  border-top-color: rgba(188, 244, 234, 0.34);
  border-left-color: rgba(188, 244, 234, 0.34);
  border-right-color: rgba(52, 96, 88, 0.92);
  border-bottom-color: rgba(52, 96, 88, 0.92);
  box-shadow:
    0 0 0 1px rgba(116, 210, 194, 0.1),
    inset 0 0 16px rgba(8, 20, 18, 0.16);
}

.transmitter-textarea {
  resize: vertical;
  min-height: 50px;
}

.transmitter-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0;
  justify-content: flex-end;
}

.transmitter-btn {
  border-top: 1px solid rgba(188, 238, 228, 0.28);
  border-left: 1px solid rgba(188, 238, 228, 0.28);
  border-right: 1px solid rgba(40, 74, 68, 0.9);
  border-bottom: 1px solid rgba(40, 74, 68, 0.9);
  background: rgba(10, 22, 20, 0.72);
  color: rgba(198, 232, 226, 0.82);
  font: inherit;
  letter-spacing: 0.08em;
  padding: 3px 12px;
  text-transform: uppercase;
}

.transmitter-btn-primary {
  border-top-color: rgba(206, 248, 240, 0.34);
  border-left-color: rgba(206, 248, 240, 0.34);
  color: rgba(224, 248, 242, 0.92);
  background: rgba(16, 32, 30, 0.82);
}

.transmitter-btn:focus,
.transmitter-btn:focus-visible {
  outline: none;
  border-top-color: rgba(206, 248, 240, 0.34);
  border-left-color: rgba(206, 248, 240, 0.34);
  box-shadow:
    0 0 0 1px rgba(132, 212, 198, 0.12),
    inset 0 0 16px rgba(8, 20, 18, 0.16);
}

@media (max-width: 354px) {
  .transmitter-window {
    width: calc(100vw - 24px);
  }
}

@media (max-width: 408px) {
  .warning-window {
    width: calc(100vw - 48px);
  }
}

@media (max-width: 768px) {
  .transmitter-window {
    max-width: calc(100vw - 24px);
    height: auto;
    min-height: 220px;
    max-height: min(420px, calc(100vh - 24px));
  }

  .update-log-window {
    min-width: 320px;
  }

  .warning-window {
    max-width: calc(100vw - 48px);
    min-height: 0;
  }

  .transmitter-body {
    padding: 18px 18px 18px;
  }

  .transmitter-form {
    padding-bottom: 0;
  }

  .transmitter-actions {
    position: static;
    margin-top: 10px;
    justify-content: flex-end;
  }
}
