[hidden] {
  display: none !important;
}

#logs-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1080px, calc(100% - 28px));
  height: min(84vh, 780px);
  max-height: 84vh;
  overflow: hidden;
}

#logs-output {
  min-height: 0;
  max-height: none;
  height: 100%;
  overscroll-behavior: contain;
  scrollbar-color: #31543d #080d0b;
}

.log-head-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.stream-state {
  color: #72ff9c;
  font-size: 10px;
  letter-spacing: .12em;
}

.stream-state i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: stream-pulse 1.4s infinite;
}

.stream-state.reconnecting { color: #e9b949; }

@keyframes stream-pulse { 50% { opacity: .3; } }

.log-command {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #28402f;
  padding: 16px 20px;
  background: linear-gradient(90deg, #09120d, #060a08);
  color: #72ff9c;
  box-shadow: 0 -12px 35px rgba(0, 0, 0, .32);
}

.shell-prompt {
  color: #72ff9c;
  font-size: 13px;
  white-space: nowrap;
}

.log-command input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f0fff4;
  caret-color: #72ff9c;
  font: 15px "Cascadia Mono", Consolas, monospace;
}

.log-command input::placeholder { color: #506158; }

.log-command button {
  border: 1px solid #28402f;
  background: #0c1510;
  color: #72ff9c;
  padding: 9px 14px;
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
}

.log-command button:hover { background: #72ff9c; color: #031006; }

@media (max-width: 600px) {
  #logs-dialog[open] { width: calc(100% - 16px); height: 90vh; max-height: 90vh; }
  .log-command { grid-template-columns: 1fr auto; padding: 12px; }
  .shell-prompt { grid-column: 1 / -1; }
  .stream-state { display: none; }
}
