/* call.css — the single, simple "Start Call" screen (PizzaTwist).
   Faithful to the brief: logo, location, a call orb, and a Start Call button. Nothing else. */

:root {
    --pt-red: #e3242b;
    --pt-red-dark: #b51d22;
    --pt-yellow: #ffcc00;
    --pt-green-1: #34c759;
    --pt-green-2: #1faa4d;
    --pt-ink: #c0473f;
    --pt-bg-1: #fff4ec;
    --pt-bg-2: #ffe9dd;
    --pt-bg-3: #ffd9c9;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body.call-page {
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--pt-ink);
    /* Soft peach gradient like the mock */
    background:
        radial-gradient(120% 90% at 50% 0%, var(--pt-bg-1) 0%, var(--pt-bg-2) 45%, var(--pt-bg-3) 100%);
    background-attachment: fixed;
}

.call-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: clamp(32px, 7vh, 80px) 20px clamp(28px, 6vh, 64px);
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

/* ── Logo ─────────────────────────────────────────────── */
.call-logo {
    margin-top: 6px;
}
.call-logo img {
    max-width: min(540px, 78vw);
    height: auto;
    display: block;
    margin: 0 auto;
}
/* SVG/text fallback wordmark when no logo asset is present */
.logo-fallback {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-weight: 900;
    letter-spacing: -1px;
}
.logo-fallback .lf-mark {
    width: 86px; height: 86px;
    border-radius: 50%;
    background: var(--pt-yellow);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 46px; line-height: 1;
    box-shadow: 0 6px 18px rgba(227, 36, 43, .18);
}
.logo-fallback .lf-text {
    font-size: clamp(34px, 7vw, 60px);
    color: var(--pt-red);
}
.logo-fallback .lf-text em { font-style: italic; color: var(--pt-red-dark); }

/* ── Location ─────────────────────────────────────────── */
.call-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 22px;
    width: 100%;
}
.call-location .loc-line {
    height: 1px;
    width: clamp(40px, 12vw, 120px);
    background: linear-gradient(90deg, transparent, rgba(227, 36, 43, .35));
}
.call-location .loc-line.right { background: linear-gradient(90deg, rgba(227, 36, 43, .35), transparent); }
.call-location .loc-text {
    display: inline-flex; align-items: center; gap: 9px;
    font-weight: 700;
    letter-spacing: 4px;
    font-size: clamp(15px, 2.4vw, 20px);
    color: var(--pt-ink);
    text-transform: uppercase;
    white-space: nowrap;
}
.call-location .loc-pin { width: 18px; height: 18px; color: var(--pt-red); flex: none; }

/* ── Call orb ─────────────────────────────────────────── */
.call-orb-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.call-orb {
    position: relative;
    width: clamp(210px, 34vw, 290px);
    height: clamp(210px, 34vw, 290px);
    border-radius: 50%;
    /* Orange → yellow → green ring around a white face */
    padding: 6px;
    background:
        conic-gradient(from 220deg, var(--pt-red) 0deg, var(--pt-yellow) 130deg, var(--pt-green-1) 250deg, var(--pt-red) 360deg);
    cursor: pointer;
    border: none;
    transition: transform .18s ease;
}
.call-orb:focus-visible { outline: 3px solid var(--pt-green-2); outline-offset: 6px; }
.call-orb:hover { transform: scale(1.02); }
.call-orb .orb-face {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: radial-gradient(120% 120% at 50% 30%, #ffffff 0%, #fff6f1 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 2px 6px rgba(0,0,0,.04);
}
.call-orb .orb-icon { width: 42%; height: 42%; color: var(--pt-red); }

/* Pulsing rings while a call is connecting/active */
.call-orb::before,
.call-orb::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid var(--pt-green-1);
    opacity: 0;
}
body.in-call .call-orb::before { animation: orbPulse 2s ease-out infinite; }
body.in-call .call-orb::after  { animation: orbPulse 2s ease-out infinite 1s; }
@keyframes orbPulse {
    0%   { transform: scale(1);    opacity: .55; }
    100% { transform: scale(1.35); opacity: 0; }
}
body.in-call .call-orb { animation: orbBreathe 2.4s ease-in-out infinite; }
@keyframes orbBreathe { 0%,100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); } 50% { box-shadow: 0 0 40px 6px rgba(52,199,89,.22); } }

/* ── Status text + error ──────────────────────────────── */
.call-status {
    min-height: 26px;
    margin-top: 18px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .3px;
    color: var(--pt-ink);
    opacity: .85;
}
.call-status .dot {
    display: inline-block; width: 9px; height: 9px; border-radius: 50%;
    background: var(--pt-green-1); margin-right: 8px; vertical-align: middle;
}
.call-status[data-state="thinking"] .dot { background: var(--pt-yellow); }
.call-status[data-state="speaking"] .dot { background: var(--pt-red); }
.call-error {
    margin-top: 14px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #fde8e8;
    color: #a12525;
    font-size: 14px;
    font-weight: 600;
    max-width: 460px;
}

/* ── Buttons ──────────────────────────────────────────── */
.call-actions { width: 100%; max-width: 520px; margin-top: 10px; }
.btn-call {
    -webkit-appearance: none; appearance: none;
    border: none;
    width: 100%;
    padding: 20px 28px;
    border-radius: 999px;
    font-size: clamp(18px, 3.4vw, 22px);
    font-weight: 700;
    letter-spacing: .3px;
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-call svg { width: 24px; height: 24px; }
.btn-start {
    background: linear-gradient(180deg, var(--pt-green-1), var(--pt-green-2));
    box-shadow: 0 12px 30px rgba(31, 170, 77, .45), 0 0 22px rgba(52, 199, 89, .35);
}
.btn-start:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn-start:active { transform: translateY(1px); }
.btn-end {
    background: linear-gradient(180deg, #ff5a52, var(--pt-red-dark));
    box-shadow: 0 12px 30px rgba(181, 29, 34, .4);
}
.btn-end:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn-call[hidden] { display: none; }

@media (max-width: 480px) {
    .call-location .loc-text { letter-spacing: 2px; }
}
