/* Colours sampled from the 2K4Menus textures Display99, NewHeader and GradientButton. */
:root {
  --frame: #4aaaf7;
  --frame-inner: #429aef;
  --panel: #022a52;
  --panel-line: #184d84;
  --header: #266eb7;
  --title: #ffd200;
  --hover: #fff000;
  --button: #263a7e;
  --button-watched: #236bb2;
  --button-glow: #299eff;
  --button-pressed: #8ed3ef;
}

.dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 0;
  background: linear-gradient(90deg, var(--frame) 3px, var(--frame-inner) 3px calc(100% - 3px), var(--frame) 0);
  color: #fff;
  font: 15px/1.5 Verdana, Tahoma, system-ui, sans-serif;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}

.dialog::backdrop {
  background: rgb(0 0 0 / 0.6);
}

.dialog form {
  position: relative;
  margin: 0;
  padding: 0 20px 20px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px #001c39, inset 0 0 0 2px var(--panel-line);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  text-align: center;
}

/* The tab Display99 has in the middle of its bottom edge. */
.dialog form::after {
  content: '';
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: 0;
  height: 8px;
  background: var(--panel-line);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}

.dialog h2 {
  margin: 0 -20px 16px;
  padding: 8px 24px;
  background: linear-gradient(#103c7b, #2169b5 10%, var(--header) 20% 60%, #1e67b2 80%, #185da5);
  color: var(--title);
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 12px 100%);
}

.dialog p {
  margin: 0 0 12px;
}

.dialog a {
  color: var(--button-pressed);
}

.dialog a:hover {
  color: var(--hover);
}

.dialog button {
  min-width: 40%;
  margin-top: 8px;
  padding: 6px 24px;
  border: 1px solid rgb(239 247 255 / 0.5);
  background: var(--button);
  color: #fff;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.dialog button:hover,
.dialog button:focus-visible {
  border-color: #68bdff;
  background: linear-gradient(#318eef, var(--button-watched));
  box-shadow: 0 0 6px var(--button-glow);
  outline: none;
}

.dialog button:active {
  border-color: #fff;
  background: var(--button-pressed);
  color: #0e296a;
}
