/* Trial call — PhoneCallTrialViews.swift: sheet, full-tab call page, "Call ended" summary. 1 pt = 1 px. */

/* ---------- shared pieces ---------- */
.tr-circle { display: flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; background: var(--subtle-blue-back); color: var(--accent); }
.tr-circle.gray { background: var(--group-fill); color: var(--label); }
.tr-circle.tinted { background: var(--subtle-blue-back); color: var(--accent); }
.tr-circle.ended { background: var(--group-fill); color: var(--red); }
.tr-circle svg.ic { width: auto; height: auto; }
.tr-box, .tr-card { border: 1px solid var(--card-border); border-radius: var(--r-xl); background: transparent; }
.tr-card { display: flex; flex-direction: column; width: 100%; }
.tr-card-line { height: 1px; background: var(--card-border); margin: 0 18px; flex: none; }
.tr-hint { font-size: 13px; color: var(--label); line-height: 16px; }

/* ---------- sheet (PhoneCallTrialSheet) ---------- */
.tr-sheet { position: relative; display: flex; flex-direction: column; align-items: center; padding: 32px 28px 24px; }
.tr-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--group-fill); color: var(--label); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tr-close:hover { background: var(--hover-fill); filter: brightness(.96); }
.tr-sheet-title { margin: 16px 0 0; font-size: 26px; font-weight: 700; line-height: 31px; }
.tr-sheet-sub { margin: 8px 0 0; max-width: 440px; font-size: 15px; line-height: 20px; text-align: center; }
.tr-lang { margin-top: 24px; width: 100%; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 18px; font-size: 15px; }
.tr-lang .pick-inline { min-width: 0; height: 32px !important; }
.tr-info { margin-top: 16px; width: 100%; padding: 4px 0; display: flex; flex-direction: column; }
.tr-info-row { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 16px 18px; }
.tr-info-tile { width: 44px; height: 44px; border-radius: var(--r-l); display: flex; align-items: center; justify-content: center; flex: none; }
.tr-info-tile.orange { background: rgba(255, 149, 0, .14); color: var(--orange); }
.tr-info-tile.accent { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tr-info-tile.green { background: rgba(52, 199, 89, .14); color: var(--green); }
.tr-info-tile svg.ic { width: 20px; height: 20px; }
.tr-info-labels { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tr-info-title { font-size: 15px; font-weight: 600; line-height: 19px; }
.tr-info-line { height: 1px; background: var(--card-border); margin: 0 18px 0 76px; }
.tr-start { margin-top: 24px; width: 100%; height: 48px; }
.tr-cancel { margin-top: 14px; font-size: 15px; font-weight: 500; }

/* ---------- call page (PhoneCallTrialCallView, live) ---------- */
.trial-call { display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--window-bg); }
.tr-head { flex: none; height: 104px; display: flex; align-items: center; gap: 20px; padding: 0 32px; border-bottom: 1px solid var(--card-border); }
.tr-head-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 22px; }
.tr-head-title { margin: 0 6px 0 0; font-size: 26px; font-weight: 700; white-space: nowrap; }
.tr-status { display: flex; align-items: center; gap: 10px; font-size: 17px; flex: none; }
.tr-status-label { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }
.tr-dots { display: flex; gap: 5px; width: 46px; flex: none; }
.tr-dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); opacity: .4; animation: tr-dot 1.05s steps(1, end) infinite; }
.tr-dots span:nth-child(2) { animation-delay: -.7s; }
.tr-dots span:nth-child(3) { animation-delay: -.35s; }
@keyframes tr-dot { 0% { opacity: 1; } 33.33% { opacity: .4; } 100% { opacity: .4; } }
.tr-head-sep { width: 1px; height: 30px; background: var(--card-border); flex: none; }
.tr-head-langs { font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-end { flex: none; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 28px; border: 0; border-radius: var(--r-l); background: var(--red); color: #fff; font-size: 17px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tr-end:active { filter: brightness(.8); }
.tr-end svg.ic { width: 24px; height: 24px; }

.tr-body { flex: 1; min-height: 0; display: flex; }
.tr-left { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 16px 10px 20px 22px; }
.tr-feed-wrap { flex: 1; min-height: 0; position: relative; display: flex; }
.tr-feed { flex: 1; min-height: 0; overflow-y: auto; }
.tr-feed-list { display: flex; flex-direction: column; gap: 4px; padding: 12px 20px; }
.tr-connecting { position: absolute; inset: 0; margin: auto; height: max-content; max-width: calc(100% - 40px); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tr-connecting .tr-circle { margin-bottom: 18px; }
.tr-connecting-title { font-size: 30px; font-weight: 700; line-height: 36px; }
.tr-connecting-hint { font-size: 18px; }
.tr-turn { flex: none; display: flex; align-items: center; gap: 8px; margin: 6px 0 0 22px; font-size: 14px; font-weight: 500; color: var(--accent); }
.tr-turn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.tr-turn[data-turn="translating"] { color: var(--label); }
.tr-turn[data-turn="translating"] .tr-turn-dot { background: var(--orange); }
.tr-turn[data-turn="youCanSpeak"] { color: var(--green); }
.tr-turn[data-turn="youCanSpeak"] .tr-turn-dot { background: var(--green); }

.tr-right { flex: none; width: 462px; border-left: 1px solid var(--card-border); overflow-y: auto; padding: 22px 22px 16px 20px; }
.tr-col { display: flex; flex-direction: column; gap: 14px; }
.tr-col-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 27px; }
.tr-col-title.suggested { font-size: 20px; margin-top: 8px; }

.tr-control { display: flex; align-items: flex-start; gap: 18px; padding: 18px; }
.tr-control-labels { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tr-control-title { font-size: 17px; font-weight: 500; line-height: 21px; }
.tr-control-labels .tr-hint { max-width: 240px; }
.tr-control-switch { flex: none; height: 44px; display: flex; align-items: center; }
.tr-device-wrap { padding: 0 18px 16px 80px; }
.tr-device { height: 48px; font-size: 14px; }

.tr-action { display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 16px 20px 16px 18px; width: 100%; border: 0; background: transparent; text-align: left; position: relative; font: inherit; color: inherit; }
.tr-action.pressable { cursor: pointer; }
.tr-action.pressable::before { content: ""; position: absolute; inset: 2px 4px; border-radius: var(--r-l); background: transparent; z-index: 0; }
.tr-action.pressable:hover::before { background: var(--hover-fill); }
.tr-action.pressable:active::before { background: var(--subtle-blue-back); }
.tr-action > * { position: relative; z-index: 1; }
.tr-action-icon { width: 28px; display: flex; justify-content: center; flex: none; color: var(--label); }
.tr-action-icon svg.ic { width: 22px; height: 22px; }
.tr-action-labels { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tr-action-title { font-size: 17px; font-weight: 500; line-height: 21px; }
.tr-action-title.regular { font-weight: 400; }
.tr-chevron { flex: none; display: flex; color: var(--label); }
.tr-chevron svg.ic { width: 14px; height: 14px; }
.tr-type-row { display: flex; align-items: center; gap: 8px; padding: 0 18px 14px; }
.tr-type-field { flex: 1; min-width: 200px; font-size: 14px; }
.tr-send { min-width: 72px; height: 28px; font-size: 13px; }

/* feed bubbles (PhoneCallBubbleView: incoming, soft mine, system) */
.tr-bubble-row { display: flex; padding: 3px 0; }
.tr-bubble-row.soft { justify-content: flex-end; }
.tr-bubble-row.interim { opacity: .6; }
.tr-bubble { max-width: min(420px, 80%); border-radius: var(--r-xl); padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--group-fill); user-select: text; overflow-wrap: anywhere; }
.tr-bubble-row.soft .tr-bubble { background: var(--subtle-blue-back); }
.tr-b1, .tr-b2 { white-space: pre-wrap; }
.tr-bubble-row.incoming .tr-b1 { font-size: 12px; line-height: 15px; }
.tr-bubble-row.incoming .tr-b2 { font-size: 14px; font-weight: 600; line-height: 18px; }
.tr-bubble-row.soft .tr-b1 { font-size: 14px; line-height: 18px; color: var(--accent); }
.tr-bubble-row.soft .tr-b2 { font-size: 12px; line-height: 15px; }
.tr-bubble-row.system { justify-content: center; padding: 4px 0; }
.tr-sys-text { max-width: 80%; font-size: 12px; text-align: center; }

/* ---------- summary (ended) ---------- */
.trial-ended { overflow-y: auto; background: var(--window-bg); }
.tr-ended-page { display: flex; flex-direction: column; align-items: center; padding: 24px 36px 28px; }
.tr-ended-page > * { width: 100%; }
.tr-ended-top { display: flex; align-items: center; gap: 16px; }
.tr-ended-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tr-ended-titles h2 { margin: 0; font-size: 22px; font-weight: 700; line-height: 27px; }
.tr-ended-langs { font-size: 15px; }
.tr-ended-badge { display: flex; align-items: center; gap: 8px; font-size: 17px; flex: none; }
.tr-ended-dot { width: 10px; height: 10px; border-radius: 50%; background: #8E8E93; }
.tr-hline { height: 1px; background: var(--card-border); margin-top: 18px; flex: none; }
.tr-ended-center { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tr-ended-center .tr-circle { margin-bottom: 16px; }
.tr-ended-title { font-size: 30px; font-weight: 700; line-height: 36px; }
.tr-ended-duration { font-size: 20px; font-variant-numeric: tabular-nums; }
.tr-ended-buttons { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.tr-big { height: 48px; min-width: 210px; }
.tr-hline.mid { margin-top: 40px; }
.tr-last-head { margin-top: 26px; display: flex; align-items: baseline; gap: 12px; }
.tr-last-title { flex: 1; margin: 0; font-size: 17px; font-weight: 700; }
.tr-full { font-size: 14px; font-weight: 500; }
.tr-last-card { margin-top: 18px; padding: 4px 0; display: flex; flex-direction: column; }
.tr-last-line { height: 1px; background: var(--card-border); margin: 0 22px; }
.tr-trow { display: flex; align-items: flex-start; min-height: 58px; padding: 12px 22px 16px; }
.tr-trow-time { width: 52px; flex: none; font-size: 14px; font-variant-numeric: tabular-nums; line-height: 34px; }
.tr-trow-badge { width: 46px; height: 34px; flex: none; margin-left: 14px; border-radius: var(--r-m); background: var(--subtle-blue-back); color: var(--accent); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.tr-trow-text { flex: 1; min-width: 0; margin: 6px 0 0 22px; font-size: 16px; line-height: 21px; user-select: text; overflow-wrap: anywhere; }

/* ---------- phone width ---------- */
@media (max-width: 900px) {
    .tr-sheet { padding: 28px 16px 20px; }
    .tr-close { top: 12px; right: 12px; }
    .tr-sheet .tr-circle { transform: scale(.85); }
    .trial-call { overflow-y: auto; }
    .tr-head { height: auto; min-height: 72px; flex-wrap: wrap; padding: 12px 16px; gap: 10px 12px; }
    .tr-head-left { flex-wrap: wrap; gap: 8px 14px; flex-basis: 100%; }
    .tr-head-title { font-size: 22px; }
    .tr-status, .tr-head-langs { font-size: 15px; }
    .tr-head-sep { display: none; }
    .tr-head-langs { flex-basis: 100%; white-space: normal; }
    .tr-end { width: 100%; height: 44px; }
    .tr-body { flex-direction: column; flex: none; }
    .tr-left { padding: 12px 6px 12px 6px; min-height: 55vh; }
    .tr-feed-list { padding: 8px 10px; }
    .tr-connecting .tr-circle { width: 140px !important; height: 140px !important; }
    .tr-connecting-title { font-size: 24px; line-height: 29px; }
    .tr-connecting-hint { font-size: 16px; }
    .tr-turn { margin-left: 10px; }
    .tr-right { width: auto; border-left: 0; border-top: 1px solid var(--card-border); overflow: visible; padding: 18px 16px 24px; }
    .tr-device-wrap { padding-left: 18px; }
    .tr-type-field { min-width: 0; }
    .tr-ended-page { padding: 18px 16px 24px; }
    .tr-ended-center { margin-top: 28px; }
    .tr-big { min-width: 0; flex: 1 1 160px; }
    .tr-ended-buttons { width: 100%; }
    .tr-trow { padding: 12px 14px 14px; flex-wrap: wrap; }
    .tr-trow-time { width: 44px; }
    .tr-trow-badge { margin-left: 8px; }
    .tr-trow-text { margin-left: 12px; }
}
