/* Tom's Face: dial-up gate (js/dialup.js). Windows XP "Connect" dialog over a Bliss-ish desktop. */
body.gate-on { overflow: hidden; }

.du-gate {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 16px;
  background:
    radial-gradient(140% 60% at 30% 108%, #5fa83a 0 45%, transparent 46%),
    radial-gradient(120% 55% at 85% 112%, #4d9a2c 0 44%, transparent 45%),
    radial-gradient(60% 30% at 20% 22%, rgba(255,255,255,.55), transparent 70%),
    radial-gradient(50% 25% at 75% 30%, rgba(255,255,255,.4), transparent 70%),
    linear-gradient(#245edb 0%, #5c8fe6 45%, #a9c8f0 70%, #d6e6f7 100%);
  font: 11px/1.4 Tahoma, Verdana, Arial, sans-serif; color: #000;
  transition: opacity .45s ease;
  overflow-y: auto;
}
.du-gate.du-out { opacity: 0; pointer-events: none; }

.du-win {
  width: min(420px, 100%);
  background: #ece9d8;
  border: 1px solid #0831d9; border-top: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 4px 6px 18px rgba(0,0,0,.45);
}
.du-title {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 5px 5px 8px;
  background: linear-gradient(#0a5fe6, #0844c5 40%, #0b3fb9);
  color: #fff; font-weight: bold; font-size: 12px;
  border-radius: 7px 7px 0 0;
  text-shadow: 1px 1px 0 #0a2a7a;
  user-select: none;
}
.du-title #duTitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du-tico { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 3px; background: linear-gradient(135deg, #8fd16b, #2d8a1d); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.du-tbtn {
  width: 21px; height: 21px; padding: 0;
  border: 1px solid #fff; border-radius: 3px;
  background: linear-gradient(#3c8cf5, #1b5fd6); color: #fff;
  font: bold 12px/1 Arial, sans-serif;
}
.du-x { background: linear-gradient(#e37b5b, #c1381c); }

.du-body { padding: 12px 14px 4px; }
.du-art { display: flex; justify-content: center; margin-bottom: 10px; }
.du-art svg { max-width: 100%; height: auto; }

.du-form { display: grid; grid-template-columns: 76px 1fr; gap: 6px 8px; align-items: center; }
.du-form input:not([type=checkbox]) {
  width: 100%; min-width: 0; font: 11px Tahoma, Verdana, sans-serif;
  padding: 3px 4px; border: 1px solid #7f9db9; background: #fff; color: #000;
}
.du-save { grid-column: 2; display: flex; gap: 5px; align-items: flex-start; font-size: 11px; }
.du-save input { margin: 1px 0 0; }

.du-status { margin-top: 12px; }
.du-line { margin: 0 0 5px; font-weight: bold; min-height: 16px; }
.du-ok .du-line { color: #0a7a12; }
.du-bar { height: 16px; padding: 2px; border: 1px solid #7f9db9; border-radius: 3px; background: #fff; overflow: hidden; }
.du-bar i {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, #36c241 0 7px, transparent 7px 9px);
  transition: width 1s linear;
}
.du-msg { margin: 8px 0 0; min-height: 15px; color: #c00; font-weight: bold; }

.du-btns { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 14px 10px; }
.du-btns button {
  min-width: 80px; padding: 4px 12px;
  background: linear-gradient(#fff, #e3e3db); color: #000;
  border: 1px solid #003c74; border-radius: 3px;
  font: 11px Tahoma, Verdana, sans-serif;
}
.du-btns button:hover:not(:disabled) { box-shadow: inset 0 0 0 2px #f8b636; }
.du-btns button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.du-btns .du-dial {
  min-width: 120px; padding: 7px 18px;
  font-weight: bold; font-size: 14px;
  background: linear-gradient(#fdfdfb, #d4f0c4);
  border-color: #1e6b12;
  animation: du-pulse 1.1s ease-in-out infinite;
}
.du-btns .du-dial:disabled { animation: none; opacity: .75; cursor: progress; }

.du-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 14px 8px; border-top: 1px solid #d0cdbf; font-size: 10px;
}
.du-mute { display: flex; gap: 4px; align-items: center; }
.du-mute input { margin: 0; }
.du-skip { color: #0033aa; }

.du-legal { margin: 0; color: #fff; font-size: 10px; text-shadow: 0 1px 2px rgba(0,0,0,.6); text-align: center; }

.du-dialing .du-wire { animation: du-wire .4s linear infinite; }
.du-shake { animation: du-shake .45s ease; }

/* reconnect (reload) version */
.du-mini .du-win { width: min(280px, 100%); }
.du-mini .du-body { padding-bottom: 12px; }
.du-mini .du-status { margin-top: 0; }

@keyframes du-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(54,194,65,.7); } 50% { box-shadow: 0 0 0 6px rgba(54,194,65,0); } }
@keyframes du-wire { to { stroke-dashoffset: -10; } }
@keyframes du-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); } 40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}

@media (max-width: 420px) {
  .du-form { grid-template-columns: 64px 1fr; }
  .du-btns { justify-content: center; }
  .du-btns .du-dial { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .du-gate { transition: none; }
  .du-btns .du-dial, .du-dialing .du-wire, .du-shake { animation: none; }
}
