/* ==========================================================================
   Paid meeting in-call overlay + ended screen (/join/{id} for a paid booking)
   --------------------------------------------------------------------------
   The overlay floats over the full-screen Jitsi iframe: fixed to the top,
   NON-modal (no backdrop, no focus trap) — the meeting stays usable. Like the
   booking pages it renders under EmptyLayout (default Mud palette), so the Mud
   primary vars are re-pointed at the Tansi brand tokens from app.css.
   ========================================================================== */

.pm-overlay,
.pm-ended {
    --mud-palette-primary: var(--primary);
    --mud-palette-primary-darken: var(--primary-hover);
    --mud-palette-primary-lighten: var(--primary-soft);
    --mud-palette-primary-text: var(--on-primary);
    --mud-palette-primary-hover: color-mix(in srgb, var(--primary) 8%, transparent);
    --pm-ink: #0f172a;
    --pm-ink-2: #334155;
    --pm-card: #ffffff;
    --pm-line: rgba(15, 23, 42, 0.1);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 14px;
}

.pm-overlay {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1400;
    width: min(640px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;           /* only the cards themselves take clicks */
}

.pm-bar,
.pm-panel,
.pm-toast {
    pointer-events: auto;
    background: var(--pm-card);
    color: var(--pm-ink);
    border: 1px solid var(--pm-line);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    padding: 10px 14px;
}

.pm-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    font-weight: 600;
    border-left: 4px solid var(--warn-ink, #b45309);
}

.pm-bar__countdown { font-variant-numeric: tabular-nums; }
.pm-bar__note { font-weight: 400; color: var(--pm-ink-2); }

.pm-panel { display: flex; flex-direction: column; gap: 8px; }
.pm-panel__line { margin: 0; color: var(--pm-ink-2); }
.pm-panel__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pm-panel__error { margin: 0; color: var(--error-ink, #b91c1c); font-weight: 500; }

.pm-panel__blocks { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pm-panel__blocks legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.pm-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.pm-check input { width: 16px; height: 16px; accent-color: var(--primary); }

.pm-check input:focus-visible,
.pm-link:focus-visible {
    outline: 2px solid var(--focus, var(--primary));
    outline-offset: 2px;
}

.pm-link { color: var(--primary-ink, var(--primary)); text-decoration: underline; }

.pm-toast { font-weight: 500; animation: pm-in 200ms cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes pm-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pm-toast { animation: none; }
}

.pm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Ended screen / extension-done ---------------------------------------- */

.pm-ended {
    max-width: 560px;
    margin: 48px auto;
    padding: 0 16px;
    color: var(--pm-ink);
}

.pm-ended__title { font-size: 1.5rem; font-weight: 700; margin: 0 0 12px; }
.pm-ended__body { margin: 0 0 12px; color: var(--pm-ink-2); }

.pm-receipt { width: 100%; border-collapse: collapse; margin-top: 8px; }
.pm-receipt caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
.pm-receipt th,
.pm-receipt td { padding: 6px 0; border-bottom: 1px solid var(--pm-line); font-weight: 400; }
.pm-receipt th { text-align: left; }
.pm-receipt td { text-align: right; font-variant-numeric: tabular-nums; }
.pm-receipt__tax th,
.pm-receipt__tax td { color: var(--pm-ink-2); font-size: 0.92em; }
.pm-receipt__total th,
.pm-receipt__total td { font-weight: 700; border-bottom: 0; }
