/* Kwiki Calls: full-screen calling, in the spirit of a phone's call screen, in Kwiki's own look. */
body.kc-on{overflow:hidden}
.kc-screen{position:fixed;inset:0;z-index:2000;display:flex;flex-direction:column;align-items:center;justify-content:space-between;
  background:radial-gradient(120% 80% at 50% 0%,#2a2d33 0%,#141518 55%,#0b0c0e 100%);color:#fff;
  padding:calc(18px + env(safe-area-inset-top,0px)) 20px calc(26px + env(safe-area-inset-bottom,0px));
  font-family:inherit;animation:kcIn .28s cubic-bezier(.2,.8,.2,1);overflow:hidden}
@keyframes kcIn{from{opacity:0;transform:translateY(24px) scale(.98)}}
.kc-screen.kc-out{opacity:0;transform:scale(.98);transition:opacity .25s,transform .25s}
.kc-screen.kc-min{display:none}
@media (prefers-reduced-motion:reduce){.kc-screen{animation:none}.kc-rings i{animation:none!important}}
.kc-bg{position:absolute;inset:0;z-index:0;overflow:hidden;opacity:.14;pointer-events:none}
.kc-bg img{width:100%;height:100%;object-fit:cover;filter:blur(30px) saturate(1.2)}
.kc-top,.kc-mid,.kc-actions,.kc-controls,.kc-ended{position:relative;z-index:2}
.kc-top{width:100%;max-width:520px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.kc-label{font-size:.95rem;color:#d1d5db;letter-spacing:.02em}
.kc-purpose{font-size:.8rem;background:rgba(255,255,255,.12);padding:.25rem .75rem;border-radius:999px}
.kc-mid{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;margin:auto 0}
.kc-mid h2{font-size:1.9rem;font-weight:700;margin:14px 0 0;letter-spacing:-.01em}
.kc-sub{color:#cbd5e1;margin:0;font-size:1rem}
.kc-avatar{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#475569,#1e293b);display:grid;place-items:center;font-weight:800;font-size:1.2rem;color:#fff;overflow:hidden;flex:none}
.kc-avatar img{width:100%;height:100%;object-fit:cover}
.kc-avatar.lg{width:132px;height:132px;font-size:2.8rem;box-shadow:0 10px 40px rgba(0,0,0,.45)}
.kc-avatar.sm{width:38px;height:38px;font-size:.9rem}
.kc-rings{position:relative;width:132px;height:132px;display:grid;place-items:center}
.kc-rings i{position:absolute;inset:0;border-radius:50%;border:2px solid rgba(255,255,255,.35);animation:kcRing 2.4s ease-out infinite}
.kc-rings i:nth-child(2){animation-delay:.8s}.kc-rings i:nth-child(3){animation-delay:1.6s}
.kc-rings.calm i{animation:none;opacity:0}
.kc-speaking .kc-rings.calm i:first-child{opacity:1;animation:kcRing 1.2s ease-out infinite;border-color:rgba(34,197,94,.6)}
@keyframes kcRing{0%{transform:scale(1);opacity:.8}100%{transform:scale(1.9);opacity:0}}
.kc-actions{width:100%;max-width:360px;display:flex;justify-content:space-between;align-items:flex-end;padding:0 10px}
.kc-act{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:.9rem;color:#e5e7eb}
.kc-btn{width:60px;height:60px;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;background:rgba(255,255,255,.14);color:#fff;transition:transform .12s,background .15s;position:relative;padding:0}
.kc-btn svg{width:26px;height:26px;fill:currentColor}
.kc-btn span{position:absolute;top:100%;margin-top:6px;font-size:.72rem;color:#d1d5db;white-space:nowrap;left:50%;transform:translateX(-50%)}
.kc-act .kc-btn span{display:none}
.kc-btn:active{transform:scale(.93)}
.kc-btn.on{background:#fff;color:#111}
.kc-btn.kc-green{background:#16a34a;width:72px;height:72px}
.kc-btn.kc-red{background:#dc2626}
.kc-act .kc-btn.kc-red{width:72px;height:72px}
.kc-btn.kc-red svg,.kc-btn.kc-green svg{width:32px;height:32px}
.kc-btn.kc-red:not(.sm) svg{transform:none}
.kc-pulse{animation:kcPulse 1.4s ease-in-out infinite}
@keyframes kcPulse{0%,100%{box-shadow:0 0 0 0 rgba(22,163,74,.6)}50%{box-shadow:0 0 0 16px rgba(22,163,74,0)}}
.kc-controls{display:flex;gap:18px;justify-content:center;flex-wrap:wrap;background:rgba(17,18,20,.55);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);padding:14px 20px 30px;border-radius:28px;max-width:100%}
/* the header row on a live call */
.kc-top{flex-direction:row;justify-content:center;position:relative}
.kc-incoming .kc-top{flex-direction:column}
.kc-head{display:flex;flex-direction:column;align-items:center;gap:2px}
.kc-head h2{font-size:1.25rem;margin:0;font-weight:700}
.kc-head .kc-sub{font-size:.82rem}
.kc-status{display:flex;align-items:center;gap:8px;font-size:.9rem;color:#d1d5db;font-variant-numeric:tabular-nums}
.kc-min-btn{position:absolute;left:0;top:0;width:42px;height:42px;border-radius:50%;border:0;background:rgba(255,255,255,.12);color:#fff;display:grid;place-items:center;cursor:pointer}
.kc-min-btn svg{width:22px;height:22px;fill:currentColor}
.kc-quality{display:inline-flex;align-items:flex-end;gap:2px;height:12px}
.kc-quality i{width:3px;background:rgba(255,255,255,.3);border-radius:1px}
.kc-quality i:nth-child(1){height:4px}.kc-quality i:nth-child(2){height:8px}.kc-quality i:nth-child(3){height:12px}
.kc-quality[data-q="1"] i:nth-child(1){background:#ef4444}
.kc-quality[data-q="2"] i:nth-child(-n+2){background:#f59e0b}
.kc-quality[data-q="3"] i{background:#22c55e}
.kc-wave{display:flex;gap:4px;height:34px;align-items:center;margin-top:16px}
.kc-wave i{width:5px;height:100%;border-radius:3px;background:#22c55e;transform:scaleY(.15);transition:transform .12s}
.kc-talk{color:#9ca3af;font-size:.85rem;margin:2px 0 0}
/* video */
.kc-video .kc-stage{position:absolute;inset:0;z-index:1;background:#000;display:grid;place-items:center}
.kc-video .kc-stage video{width:100%;height:100%;object-fit:cover}
.kc-novideo{display:flex;flex-direction:column;align-items:center;gap:10px;color:#cbd5e1}
.kc-video.kc-live .kc-top{background:linear-gradient(180deg,rgba(0,0,0,.55),transparent);margin:-18px -20px 0;padding:18px 20px 30px;max-width:none;width:calc(100% + 40px)}
.kc-video.kc-live .kc-min-btn{left:20px;top:18px}
.kc-pip{position:absolute;right:16px;top:calc(96px + env(safe-area-inset-top,0px));z-index:3;width:min(28vw,128px);aspect-ratio:3/4;border-radius:16px;overflow:hidden;background:#1f2937;box-shadow:0 8px 24px rgba(0,0,0,.5);touch-action:none;cursor:grab;border:2px solid rgba(255,255,255,.25)}
.kc-pip video{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.kc-pip-off{width:100%;height:100%;display:grid;place-items:center;font-weight:800;font-size:1.4rem;color:#cbd5e1}
.kc-video .kc-controls{position:relative;z-index:3}
/* ended */
.kc-ended{margin:auto;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.kc-ended h2{margin:14px 0 0;font-size:1.6rem}
.kc-ended p{color:#d1d5db;margin:0}
/* minimised */
.kc-mini{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:1900;display:flex;align-items:center;gap:10px;background:#111;color:#fff;border-radius:18px;padding:8px 8px 8px 10px;box-shadow:0 12px 30px rgba(0,0,0,.35);max-width:520px;margin:0 auto;animation:kcIn .2s ease-out}
body.has-tabbar .kc-mini{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
.kc-mini-main{flex:1;min-width:0;display:flex;align-items:center;gap:10px;background:none;border:0;color:inherit;font:inherit;text-align:left;cursor:pointer;padding:0}
.kc-mini-main b{display:block;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kc-mini-main span{font-size:.8rem;color:#86efac;font-variant-numeric:tabular-nums}
.kc-mini-back{margin-left:auto;font-size:.75rem!important;color:#d1d5db!important;white-space:nowrap}
.kc-btn.sm{width:42px;height:42px}
.kc-btn.sm svg{width:20px;height:20px}
.kc-btn.sm span{display:none}
@media (min-width:900px){.kc-mid h2{font-size:2.2rem}.kc-pip{width:180px}}

/* ---- the "Contact your restaurant" panel and call history (customer and staff pages) ---- */
.kc-panel{background:var(--card,#fff);border:1px solid var(--card-border,#ececec);border-radius:18px;padding:14px 16px;margin:14px 0;box-shadow:var(--card-shadow,none)}
.kc-panel h3{margin:0 0 2px;font-size:1rem}
.kc-panel .kc-who{font-size:.85rem;color:var(--muted,#777);margin:0 0 10px}
.kc-callrow{display:flex;gap:10px}
.kc-callrow .btn{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.kc-callrow svg{width:18px;height:18px;fill:currentColor}
.kc-hist{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px;font-size:.85rem}
.kc-hist li{display:flex;align-items:center;gap:8px;color:var(--ink-2,#444)}
.kc-hist li svg{width:15px;height:15px;fill:currentColor;flex:none}
.kc-hist li.missed,.kc-hist li.failed{color:#b91c1c}
.kc-hist li .kc-h-when{margin-left:auto;color:var(--muted,#888);white-space:nowrap}
.kc-note{font-size:.75rem;color:var(--muted,#888);margin:10px 0 0}
.kc-missed{background:#fee2e2;color:#991b1b;border-radius:12px;padding:8px 12px;font-size:.88rem;margin:0 0 10px;display:flex;gap:8px;align-items:center}
.kc-purpose-list{display:grid;gap:8px}
.kc-purpose-list .btn{justify-content:flex-start;text-align:left}
@media (max-width:480px){
  .kc-controls{gap:10px;padding:12px 12px 28px;flex-wrap:nowrap}
  .kc-controls .kc-btn{width:52px;height:52px}
  .kc-controls .kc-btn svg{width:22px;height:22px}
  .kc-controls .kc-btn span{font-size:.64rem}
}
/* A video call has six buttons (with Speaker): narrower ones so they fit a small phone in one row. */
@media (max-width:400px){
  .kc-video .kc-controls{gap:6px;padding:12px 8px 28px}
  .kc-video .kc-controls .kc-btn{width:46px;height:46px}
  .kc-video .kc-controls .kc-btn svg{width:20px;height:20px}
  .kc-video .kc-controls .kc-btn span{font-size:.6rem}
}
@media (max-width:330px){
  .kc-video .kc-controls .kc-btn{width:40px;height:40px}
  .kc-video .kc-controls .kc-btn span{display:none}
}
.kc-ring{margin:0 0 10px}
.kc-ring-on{margin:0;font-size:.85rem;color:#166534;background:#dcfce7;border-radius:12px;padding:8px 12px}
