/* MESH BUDDY HamClock home tool */
#npn-hamclock-panel,
#npn-hamclock-panel * {
  box-sizing: border-box;
}

#npn-hamclock-panel {
  --ham-bg: rgba(7, 10, 9, .98);
  --ham-surface: rgba(15, 22, 18, .98);
  --ham-line: rgba(70, 224, 107, .30);
  --ham-line-strong: rgba(70, 224, 107, .58);
  --ham-text: #e8f3ea;
  --ham-muted: #8ca394;
  position: fixed;
  top: 154px;
  left: min(58vw, calc(100vw - 660px));
  width: min(620px, calc(100vw - 380px));
  min-width: 420px;
  height: min(520px, calc(100vh - 190px));
  min-height: 340px;
  z-index: 2147482400;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--ham-line-strong);
  background: var(--ham-bg);
  color: var(--ham-text);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .55);
  font-family: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

#npn-hamclock-panel.npn-hamclock-minimized {
  display: none !important;
}

.npn-hamclock-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(70, 224, 107, .22);
  background: linear-gradient(90deg, rgba(19, 32, 24, .98), rgba(8, 12, 10, .98));
  cursor: move;
  user-select: none;
}

.npn-hamclock-title {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 1px;
}

.npn-hamclock-title b {
  color: #46e06b;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
}

.npn-hamclock-title span {
  color: var(--ham-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.npn-hamclock-actions {
  display: inline-flex;
  gap: 6px;
  flex: 0 0 auto;
}

.npn-hamclock-actions button,
.npn-hamclock-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 25px;
  border: 1px solid rgba(140, 163, 148, .42);
  background: rgba(13, 18, 15, .94);
  color: var(--ham-text);
  font: 850 9px "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.npn-hamclock-actions button:hover,
.npn-hamclock-actions a:hover {
  border-color: var(--ham-line-strong);
  color: #46e06b;
}

.npn-hamclock-body {
  position: relative;
  min-height: 0;
  background: #020403;
}

.npn-hamclock-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.npn-hamclock-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  gap: 10px;
  padding: 26px;
  background:
    radial-gradient(circle at 50% 18%, rgba(70, 224, 107, .10), transparent 32%),
    #030605;
  color: var(--ham-text);
  text-align: center;
}

.npn-hamclock-fallback.is-visible {
  display: grid;
}

.npn-hamclock-fallback b {
  color: #46e06b;
  font-size: 20px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.npn-hamclock-fallback span {
  max-width: 420px;
  color: var(--ham-muted);
  font-size: 12px;
  line-height: 1.45;
}

.npn-hamclock-fallback a {
  color: #d8fddf;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  #npn-hamclock-panel {
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: calc(12px + var(--npn-safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    width: auto !important;
    min-width: 0;
    height: min(58vh, 520px) !important;
    min-height: 320px;
  }

  .npn-hamclock-head {
    cursor: default;
  }

  .npn-hamclock-actions {
    gap: 4px;
  }

  .npn-hamclock-actions button,
  .npn-hamclock-actions a {
    min-width: 48px;
    padding: 0 6px;
  }
}
