/* Dial page — PhoneCallTranslatorController / PhoneCallTranslatorViews / PhoneCallDialingView (Mac). */

.dial-page { display: flex; flex-direction: column; }
.dial-page > .cols { flex: 1; min-height: 0; }

/* ---------- left column ---------- */
.trial-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 16px; border-radius: 15px; border: 1px solid var(--card-border); background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; flex: none; }
.trial-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.trial-pill:hover:not(:disabled) { background: var(--hover-fill); }
.trial-pill:active:not(:disabled) { background: var(--subtle-blue-back); }
.trial-pill:disabled { color: rgba(0, 0, 0, .35); cursor: default; }
.trial-pill:disabled .dot { opacity: .4; }

.center-scroll { display: flex; flex-direction: column; }
.dial-stack { margin: auto 0; padding: 4px 24px 16px; display: flex; flex-direction: column; align-items: center; }
.number-box { width: 100%; height: 52px; border-radius: 10px; border: 1px solid var(--card-border); background: var(--control-bg); display: flex; align-items: center; padding: 0 14px 0 10px; cursor: text; }
.number-box .country-btn { flex: none; }
.number-box .country-btn:disabled { opacity: .5; cursor: default; }
.number-box .vsep { width: 1px; height: 28px; background: var(--card-border); margin: 0 14px 0 10px; flex: none; }
.number-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 20px; font-weight: 400; direction: ltr; text-overflow: ellipsis; }
.number-input::placeholder { color: var(--placeholder); }
.tone-label { margin-top: 20px; font-size: 13px; font-variant-numeric: tabular-nums; min-height: 16px; }

.keypad { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 60px); column-gap: 28px; row-gap: 12px; }
.dial-key { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--group-fill); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; padding: 0; user-select: none; }
.dial-key:hover { background: var(--hover-fill); }
.dial-key:active { background: var(--subtle-blue-back); }
.dial-key .digit { font-size: 24px; line-height: 26px; order: 2; }
.dial-key .sub { font-size: 9px; font-weight: 600; letter-spacing: 1.2px; line-height: 9px; margin-bottom: -2px; order: 1; }
.keypad-bottom { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 60px); column-gap: 28px; margin-top: 4px; align-items: center; justify-items: center; }
.call-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; background: #33BD66; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.call-btn:hover:not(:disabled) { filter: brightness(1.08); }
.call-btn:active:not(:disabled) { filter: brightness(.82); }
.call-btn.gray { background: #8E8E93; }
.call-btn.red { background: var(--red); }
.call-btn:disabled { opacity: .4; cursor: default; }
.call-btn svg.ic { stroke-width: 0; }
.delete-btn { width: 60px; height: 60px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.delete-btn:disabled { opacity: .35; cursor: default; }
.ai-caption { margin-top: 18px; font-size: 15px; font-weight: 600; }
.price-line { margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--accent); text-align: center; }
.ai-caption + .price-line[hidden] + .limit-line, .keypad + .ai-caption[hidden] + .price-line[hidden] + .limit-line { margin-top: 18px; }
.limit-line { margin-top: 4px; font-size: 12px; text-align: center; }
.keypad + .ai-caption[hidden] + .price-line:not([hidden]) { margin-top: 18px; }

/* ---------- right column: settings ---------- */
.setup-view { padding: 12px 24px 24px; }
.setup-stack { display: flex; flex-direction: column; gap: 12px; }
.row-title.big { font-size: 22px; font-weight: 700; }
.translation-card .row { min-height: 56px; }
.language-card { display: flex; align-items: center; gap: 10px; }
.side-panel { flex: 1 1 0; min-width: 0; border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 14px 14px; display: flex; flex-direction: column; align-items: flex-start; }
.side-panel .cap { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.side-panel .cap + .pick-inline { margin-top: 4px; margin-left: -6px; max-width: calc(100% + 6px); }
.side-panel .hline { align-self: stretch; height: 1px; background: var(--card-border); margin: 8px 0 10px; }
.side-panel .cap + .pick-field { margin-top: 4px; }
.pick-inline.open { box-shadow: inset 0 0 0 1px rgba(66, 112, 192, .6); color: var(--active-blue); }
.swap-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--group-fill); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.swap-btn:hover { filter: brightness(1.05); background: var(--hover-fill); }
.swap-btn:active { background: var(--subtle-blue-back); }
.extras-card { margin-bottom: 10px; }
.extras-card .pick-field { width: 180px; }
.ai-task-row { display: block; padding: 0; min-height: 0; }
.options-title { margin: 0; font-size: 18px; font-weight: 700; }
.options-card { margin-top: -2px; }

/* ---------- right column: call view ---------- */
.call-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.call-status { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; flex: none; }
.transcript-area { flex: 1; min-height: 0; position: relative; }
.transcript-scroll { position: absolute; inset: 0; overflow: auto; }
.transcript { display: flex; flex-direction: column; gap: 4px; padding: 12px 20px; }
.transcript-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; padding: 0 10%; pointer-events: none; }
.bubble-row { display: flex; margin: 3px 0; }
.bubble-row.mine, .bubble-row.ai { justify-content: flex-end; }
.bubble { max-width: min(420px, 80%); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; user-select: text; overflow-wrap: anywhere; }
.bubble-row.mine .bubble { background: var(--accent); color: #fff; }
.bubble-row.ai .bubble { background: #339E5C; color: #fff; }
.bubble-row.theirs .bubble { background: var(--group-fill); }
.bubble-row.mine .l1, .bubble-row.ai .l1 { font-size: 14px; }
.bubble-row.mine .l2, .bubble-row.ai .l2 { font-size: 12px; }
.bubble-row.theirs .l1 { font-size: 12px; }
.bubble-row.theirs .l2 { font-size: 14px; font-weight: 600; }
.bubble-row.interim .bubble { opacity: .6; }
.system-line { align-self: center; text-align: center; font-size: 12px; max-width: 80%; padding: 4px 0; }
.turn-line { margin-top: 8px; padding: 0 24px; text-align: center; font-size: 13px; font-weight: 600; min-height: 16px; }
.turn-line.green { color: #28CD41; }
.turn-line.red { color: var(--red); }
.turn-line.orange { color: var(--orange); }
.call-view .hrule { height: 1px; background: var(--card-border); margin-top: 8px; flex: none; }
.call-controls { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px 16px 16px; flex: none; }
.call-controls.ended { gap: 12px; }
.ended-label { font-size: 13px; font-weight: 500; }
.type-row { display: flex; gap: 8px; align-items: center; }
.type-input { width: 280px; height: 26px; border-radius: 6px; border: 1px solid var(--card-border); padding: 0 8px; font-size: 13px; background: var(--text-bg); outline: none; }
.type-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(66, 112, 192, .25); }
.type-input:disabled { opacity: .5; }
.round-row { display: flex; gap: 24px; align-items: flex-start; }
.round-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.round { border-radius: 50%; border: 0; background: var(--group-fill); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--label); padding: 0; }
.round:hover:not(:disabled) { background: var(--hover-fill); filter: brightness(1.04); }
.round:active:not(:disabled) { filter: brightness(.85); }
.round.on { background: var(--accent); }
.round.red { background: var(--red); color: #fff; }
.round:disabled { opacity: .4; cursor: default; }
.round-cap { font-size: 11px; }
.round-cap.big { font-size: 16px; margin-top: 4px; }

/* ---------- full-tab dialing view ---------- */
.dialing-view { display: flex; flex-direction: column; background: var(--window-bg); }
.dv-header { height: 104px; flex: none; display: flex; align-items: center; gap: 28px; padding: 0 32px; border-bottom: 1px solid var(--card-border); min-width: 0; }
.dv-header h1 { margin: 0; font-size: 26px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dv-header .status { display: flex; align-items: center; gap: 14px; font-size: 17px; flex: none; }
.dots { display: flex; gap: 5px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); opacity: .4; }
.dots span.on { opacity: 1; }
.vsep-tall { width: 1px; height: 44px; background: var(--card-border); flex: none; }
.langs { display: flex; align-items: center; gap: 22px; font-size: 17px; min-width: 0; }
.langs > span:not(.swap-circle) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swap-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--group-fill); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dv-header .grow { flex: 1; }
.end-call { height: 48px; padding: 0 45px; border-radius: 10px; border: 0; background: var(--red); color: #fff; font-size: 17px; font-weight: 600; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex: none; }
.end-call:active { filter: brightness(.8); }
.end-call .ic-slot { width: 24px; display: inline-flex; justify-content: center; }
.end-call svg.ic { stroke-width: 0; }
.dv-body { flex: 1; min-height: 0; display: flex; }
.dv-center { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; border-right: 1px solid var(--card-border); }
.art-circle { width: 200px; height: 200px; border-radius: 50%; background: var(--subtle-blue-back); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.dv-title { margin-top: 30px; font-size: 34px; font-weight: 700; }
.dv-hint { margin-top: 10px; font-size: 18px; max-width: 520px; }
.dv-tonepad { display: grid; grid-template-columns: repeat(3, 60px); column-gap: 20px; row-gap: 12px; }
.dv-side { flex: none; width: 484px; padding: 22px; overflow: auto; }
.dv-card { width: 440px; border: 1px solid var(--card-border); border-radius: 12px; padding: 26px 22px; display: flex; flex-direction: column; gap: 22px; }
.dv-card .hrule { height: 1px; background: var(--card-border); }
.dv-rounds { display: grid; grid-template-columns: repeat(3, 1fr); }
.dv-rounds .round { width: 64px; height: 64px; }
.dv-row { display: flex; align-items: center; gap: 14px; }
.circle44 { width: 44px; height: 44px; border-radius: 50%; background: var(--group-fill); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dv-row .ot { font-size: 16px; font-weight: 500; }
.dv-row .oh, .dv-card .oh { font-size: 14px; margin-top: 2px; }
.device-field { height: 48px; margin: -8px 0 0 58px; width: calc(100% - 58px); }
.dv-price { font-size: 17px; font-weight: 500; color: var(--accent); }

.dialing-view.result .dv-header .status .dots { display: none; }
.dv-result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 32px 52px; }
.res-icon { width: 156px; height: 156px; border-radius: 50%; background: rgba(255, 59, 48, .14); color: var(--red); display: flex; align-items: center; justify-content: center; }
.res-icon svg.ic { stroke-width: 0; }
.res-icon.cancelled { background: var(--group-fill); color: var(--secondary-label); }
.res-title { margin-top: 36px; font-size: 40px; font-weight: 700; }
.res-hint { margin-top: 12px; font-size: 18px; max-width: 720px; }
.res-buttons { margin-top: 44px; display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; }
.res-btn { width: 250px; height: 52px; font-size: 17px; }
.res-btn.quiet { color: var(--label); }

@media (max-width: 1100px) {
    .dv-side { width: auto; flex: 0 1 484px; }
    .dv-card { width: 100%; }
}
@media (max-width: 900px) {
    .dial-stack { padding: 4px 16px 16px; }
    .setup-view { padding: 12px 16px 24px; }
    .language-card { flex-direction: column; align-items: stretch; }
    .language-card .swap-btn { align-self: center; transform: rotate(90deg); }
    .extras-card .row { flex-wrap: wrap; }
    .extras-card .pick-field { width: 160px; }
    /* Call from: the number button goes under its text, the text keeps the full width. */
    .extras-card .row:has(.pick-field) .row-text { flex-basis: calc(100% - 40px); }
    .extras-card .row:has(.pick-field) .row-control { margin-left: 40px; }
    .call-view { min-height: 70vh; }
    .type-input { width: 100%; }
    .type-row { width: 100%; }
    .dv-header { height: auto; flex-wrap: wrap; padding: 16px; gap: 12px; }
    .dv-header h1 { font-size: 20px; width: 100%; }
    .vsep-tall { display: none; }
    .langs { font-size: 14px; gap: 10px; }
    .swap-circle { width: 32px; height: 32px; }
    .dv-body { flex-direction: column; overflow: auto; }
    .dv-center { border-right: 0; border-bottom: 1px solid var(--card-border); padding: 16px; }
    .art-circle { width: 120px; height: 120px; }
    .art-circle svg.ic { width: 44px !important; height: 44px !important; }
    .dv-title { font-size: 26px; margin-top: 16px; }
    .dv-side { width: auto; padding: 16px; }
    .dv-card { width: 100%; padding: 18px; }
    .res-title { font-size: 28px; }
    .res-btn { width: 100%; max-width: 300px; }
    .res-icon { width: 110px; height: 110px; }
}
