/* Whatkey app styles - scoped to fit site theme (#040407, #f5f2ff) */

.whatkey-app {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 1em 0;
}

.whatkey-app * {
  box-sizing: border-box;
}

.whatkey-app .controls {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.whatkey-app .listenToggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
  overflow: visible;
  color: #f5f2ff;
}

.whatkey-app .listenToggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.whatkey-app .switchTrack {
  position: relative;
  display: inline-block;
  width: 78px;
  height: 36px;
  border-radius: 24px;
  background: rgba(68, 68, 68, 0.8);
  overflow: visible;
}

.whatkey-app .switchThumb {
  position: absolute;
  top: -3px;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #666;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.whatkey-app .listenToggle input:not(:checked) ~ .switchTrack .switchThumb {
  left: 0;
  right: auto;
}

.whatkey-app .listenToggle input:checked ~ .switchTrack .switchThumb {
  left: auto;
  right: 0;
  background: rgb(172, 172, 255);
  box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.3);
}

.whatkey-app .listenToggle input:checked ~ .switchTrack {
  background: rgba(172, 172, 255, 0.3);
}

.whatkey-app .currentKeysBox {
  width: 100%;
  min-width: 280px;
  min-height: 120px;
  margin-bottom: 32px;
  padding: 28px 32px;
  background: rgba(68, 68, 68, 0.3);
  border: 1px solid rgb(68, 68, 68);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.whatkey-app .currentKeysLabel {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.whatkey-app .currentKeysKeys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: center;
  align-items: center;
  min-height: 48px;
}

.whatkey-app .currentKeysKeys .keyWrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.whatkey-app .currentKeysKeys .plus {
  color: #888;
  font-size: 1rem;
  font-weight: 500;
}

.whatkey-app .currentKeysKeys .key {
  display: inline-block;
  padding: 12px 22px;
  font-size: 1.4rem;
  font-weight: 600;
  font-family: inherit;
  background: rgba(68, 68, 68, 0.6);
  color: #f5f2ff;
  border-radius: 8px;
  border: 1px solid rgb(68, 68, 68);
}

.whatkey-app .currentKeysKeys .empty {
  font-size: 1.1rem;
  color: #888;
  font-style: italic;
}

.whatkey-app .consoleSection {
  margin-top: 24px;
  width: 100%;
}

.whatkey-app .consoleMenu {
  width: 100%;
  box-sizing: border-box;
  height: 25px;
  background-color: #444;
  border-top-right-radius: 8px;
  border-top-left-radius: 8px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  gap: 8px;
}

.whatkey-app .consoleMenu .close,
.whatkey-app .consoleMenu .minimize,
.whatkey-app .consoleMenu .zoom {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.whatkey-app .consoleMenu .close {
  background-color: #ff3b47;
}

.whatkey-app .consoleMenu .minimize {
  background-color: #ffc100;
}

.whatkey-app .consoleMenu .zoom {
  background-color: #00d742;
}

.whatkey-app .consoleWrapper {
  position: relative;
  background-color: rgba(4, 4, 7, 0.95);
  box-sizing: border-box;
  width: 100%;
  padding: 20px;
  border: 1px solid rgb(68, 68, 68);
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  color: #f5f2ff;
  min-height: 200px;
  overflow: hidden;
}

.whatkey-app .pausedOverlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #808080;
  opacity: 0.75;
  border-radius: inherit;
  pointer-events: none;
}

.whatkey-app .pausedOverlay[aria-hidden="true"] {
  display: none;
}

.whatkey-app .pausedX {
  font-size: 8rem;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
  user-select: none;
}

.whatkey-app .consoleWrapper .row {
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  align-items: baseline;
}

.whatkey-app .consoleWrapper .row + .row {
  margin-top: 15px;
}

.whatkey-app .consoleWrapper .interpretation {
  font-size: 14px;
  color: rgb(172, 172, 255);
  margin-bottom: 8px;
  font-weight: 500;
}

.whatkey-app .historySection {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgb(68, 68, 68);
}

.whatkey-app .historyHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.whatkey-app .historyTitle {
  font-size: 12px;
  color: #888;
  margin: 0;
}

.whatkey-app .copyButton {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(68, 68, 68, 0.8);
  color: #f5f2ff;
  border: 1px solid rgb(68, 68, 68);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.whatkey-app .copyButton:hover {
  background: rgba(172, 172, 255, 0.3);
  color: rgb(172, 172, 255);
}

.whatkey-app .historyList {
  font-size: 13px;
  color: #ccc;
}

.whatkey-app .historyRow {
  margin-top: 4px;
}

.whatkey-app .historyIndex {
  color: #888;
  margin-right: 6px;
}
