/* Virtual feature phone. Flat colours only. Skin it with the --ph-* variables. */
.vphone {
  --ph-body: #1f6f4a;
  --ph-edge: #185a3c;
  --ph-bezel: #14213d;
  --ph-screen: #dcebc4;
  --ph-screen-ink: #17300f;
  --ph-key: #ffffff;
  --ph-key-ink: #14213d;
  --ph-key-sub: #525b6e;
  --ph-call: #0a7d4b;
  --ph-end: #b42318;
  --ph-font: "VT323", "Courier New", monospace;
  --ph-width: 300px;
  width: var(--ph-width);
  max-width: 100%;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.vphone * { box-sizing: border-box; }
.vphone-body {
  position: relative;
  padding: 22px 18px 20px;
  border-radius: 40px 40px 52px 52px;
  background: var(--ph-body);
  border: 2px solid var(--ph-edge);
  box-shadow: 0 2px 0 var(--ph-edge), 0 18px 32px -18px rgba(20, 33, 61, 0.45);
}
.vphone-speaker { width: 56px; height: 6px; margin: 0 auto 8px; border-radius: 6px; background: var(--ph-edge); }
.vphone-brand {
  text-align: center; font: 600 12px/1 "Archivo", system-ui, sans-serif; letter-spacing: 0.08em;
  color: #ffffff; margin-bottom: 10px;
}
.vphone-bezel { padding: 8px; border-radius: 16px; background: var(--ph-bezel); }
.vphone-screen {
  height: 232px; overflow-y: auto; scrollbar-width: none;
  border-radius: 8px; padding: 6px 9px 8px;
  background: var(--ph-screen);
  color: var(--ph-screen-ink);
  font: 21px/1.08 var(--ph-font);
  white-space: pre-wrap; word-break: break-word;
  display: flex; flex-direction: column;
}
.vphone-screen > * { flex: none; }
.vphone-screen::-webkit-scrollbar { display: none; }
.vs-status { display: flex; justify-content: space-between; font-size: 17px; margin-bottom: 4px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.bars { display: inline-flex; gap: 1px; align-items: flex-end; height: 10px; margin: 0 2px; }
.bars i { display: block; width: 3px; background: currentColor; }
.bars i:nth-child(1) { height: 3px; } .bars i:nth-child(2) { height: 5px; } .bars i:nth-child(3) { height: 7px; } .bars i:nth-child(4) { height: 10px; opacity: 0.35; }
.vs-idle { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 160px; text-align: center; gap: 6px; }
.vs-logo { font-size: 44px; letter-spacing: 2px; }
.vs-hint { font-size: 19px; }
.vs-dial { font-size: 32px; min-height: 32px; letter-spacing: 1px; }
.vs-badge { font-size: 19px; padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px; }
.vs-running { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 160px; gap: 12px; font-size: 21px; }
.vs-spinner { width: 26px; height: 26px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: vs-spin 0.8s linear infinite; }
.vs-ussd { font-size: 21px; }
.vs-input { margin-top: 6px; padding: 2px 4px; border: 1px solid currentColor; min-height: 26px; font-size: 21px; }
.vs-input .pending { text-decoration: underline; }
.vs-mode { float: right; font-size: 16px; padding: 0 4px; border: 1px solid currentColor; border-radius: 3px; margin-left: 6px; }
.vs-sms { font-size: 20px; }
.vs-soft { position: sticky; bottom: -8px; display: flex; justify-content: space-between; margin: auto -9px -8px; margin-top: auto; padding-top: 2px; padding: 2px 9px 4px; background: var(--ph-screen); border-top: 1px solid currentColor; font-size: 19px; min-height: 26px; }
.vs-sms-head { font-size: 17px; border-bottom: 1px solid currentColor; margin-bottom: 4px; }
.caret { display: inline-block; width: 8px; height: 17px; background: currentColor; vertical-align: -2px; animation: vs-blink 1s steps(2) infinite; }

.vphone button { font-family: "Archivo", system-ui, sans-serif; cursor: pointer; border: 0; transition: background-color .12s ease-out, transform .06s ease-out; }
.vphone-soft {
  display: grid; grid-template-columns: 1fr 64px 1fr; grid-template-rows: 36px 36px;
  gap: 8px 12px; align-items: stretch; margin: 14px 0 12px;
}
.vphone-softkey { border-radius: 10px; background: var(--ph-key); display: grid; place-items: center; }
.vphone-softkey span { width: 26px; height: 4px; border-radius: 2px; background: var(--ph-key-sub); }
.vphone-softkey.left { grid-column: 1; grid-row: 1; }
.vphone-softkey.right { grid-column: 3; grid-row: 1; }
.vphone-nav { grid-column: 2; grid-row: 1 / span 2; border-radius: 50%; background: var(--ph-key); display: grid; place-items: center; }
.vphone-nav span { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ph-key-sub); }
.vphone-call, .vphone-end { border-radius: 10px; color: #ffffff; display: grid; place-items: center; }
.vphone-call { grid-column: 1; grid-row: 2; background: var(--ph-call); border: 2px solid #ffffff !important; }
.vphone-end { grid-column: 3; grid-row: 2; background: var(--ph-end); border: 2px solid #ffffff !important; }
.vphone-call svg, .vphone-end svg { width: 20px; height: 20px; }
.vphone-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 10px; }
.vphone-key {
  height: 46px; border-radius: 10px; background: var(--ph-key); color: var(--ph-key-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.vphone-key b { font-size: 20px; font-weight: 700; }
.vphone-key small { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ph-key-sub); min-height: 11px; margin-top: 2px; }
.vphone button:hover { background-color: #eef1f5; }
.vphone .vphone-call:hover { background-color: #08683e; }
.vphone .vphone-end:hover { background-color: #96190f; }
.vphone button:active, .vphone button.pressed { transform: translateY(1px); background-color: #e2e6ec; }
.vphone .vphone-call.pressed, .vphone .vphone-call:active { background-color: #065a35; }
.vphone button:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }
.vphone:focus-visible .vphone-body { outline: 3px solid #ffd23f; outline-offset: 4px; }
@keyframes vs-blink { 50% { opacity: 0; } }
@keyframes vs-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vphone * { animation: none !important; transition: none !important; } }
