/* ── Calendar — booking ──
   Public booking-link list (Calendly-style), event-type editor row,
   and the "Meet with…" sidebar quick-share (P1-9). */

  /* ── Booking links (Calendly) ── */
  .bl-row {
    display: flex; align-items: center; gap: var(--space-md);
    padding: 10px 12px; border-radius: var(--radius-s);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    background: var(--deep);
  }
  .bl-row-main { flex: 1; min-width: 0; }
  .bl-row-title { font-weight: 600; color: var(--ink); font-size: var(--font-md); }
  .bl-row-meta { font-size: var(--font-xs); color: var(--ink-muted); margin-top: 2px; }
  .bl-row-meta code {
    background: var(--surface); padding: 1px 6px; border-radius: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--font-2xs);
  }
  /* URL block: bordered pill so the link reads as the row's primary
     affordance, with a "Скопировать" pill sitting flush right. Old
     style was a tiny font-2xs link that looked decorative. */
  .bl-row-url-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: 8px;
    padding: 6px 8px 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    flex-wrap: wrap;
  }
  .bl-row-url {
    flex: 1;
    min-width: 0;
    color: var(--accent);
    font-size: var(--font-sm);
    word-break: break-all;
    text-decoration: none;
  }
  .bl-row-url:hover { text-decoration: underline; }
  .bl-row-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--elevated);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    cursor: pointer;
    font: inherit;
    font-size: var(--font-xs);
    transition: var(--transition);
    flex-shrink: 0;
  }
  .bl-row-copy:hover { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
  .bl-row-copy--done { color: var(--success); border-color: var(--success); }

  .bl-row-actions { display: flex; gap: var(--space-xs); flex-shrink: 0; align-items: flex-start; }
  .bl-icon-btn {
    background: transparent; border: 1px solid var(--border); color: var(--ink-muted);
    width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit;
  }
  .bl-icon-btn:hover { background: var(--surface); color: var(--ink); }
  .bl-icon-btn svg { display: block; }

  .et-av-row {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 4px 0;
  }
  .et-av-dow {
    min-width: 100px; font-size: var(--font-sm); color: var(--ink-secondary);
  }

  /* ── Meet with… sidebar quick-share (P1-9) ──────────────────── */
  .cal-meet-with {
    padding: 0 var(--space-md) var(--space-md);
    display: flex; flex-direction: column; gap: 6px;
  }
  .cal-meet-with-head {
    font-size: var(--font-2xs); font-weight: 700; color: var(--ink-muted);
    text-transform: uppercase; letter-spacing: 0.04em;
    margin: 4px 0 2px;
  }
  .cal-meet-with-input {
    width: 100%; padding: 6px 10px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-s); color: var(--ink); font-size: var(--font-sm);
  }
  .cal-meet-with-input:focus {
    outline: none; border-color: var(--accent);
  }
  .cal-meet-with-results {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-s); max-height: 240px; overflow-y: auto;
  }
  .cal-meet-with-row {
    display: flex; align-items: center; gap: var(--space-sm);
    padding: 6px 8px; cursor: pointer; font-size: var(--font-sm);
  }
  .cal-meet-with-row:hover { background: var(--elevated); }
  .cal-meet-with-av {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--on-accent); font-size: var(--font-2xs); font-weight: 700;
    flex-shrink: 0;
  }
  .cal-meet-with-info { flex: 1; min-width: 0; }
  .cal-meet-with-name {
    font-size: var(--font-sm); color: var(--ink); font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .cal-meet-with-handle {
    font-size: var(--font-2xs); color: var(--ink-muted);
  }
  .cal-meet-with-picked {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-s); padding: var(--space-sm);
  }
  .cal-meet-with-picked-head {
    display: flex; align-items: center; gap: var(--space-sm);
    margin-bottom: var(--space-sm);
  }
  .cal-meet-with-close {
    background: none; border: none; color: var(--ink-muted);
    font-size: var(--font-md); cursor: pointer; padding: 2px 6px;
    margin-left: auto;
  }
  .cal-meet-with-close:hover { color: var(--ink); }
  .cal-meet-with-ets {
    display: flex; flex-direction: column; gap: var(--space-xs);
  }
  .cal-meet-with-et {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm);
    padding: 4px 6px; border-radius: var(--radius-s);
    background: var(--deep);
  }
  .cal-meet-with-et-title {
    font-size: var(--font-xs); color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .cal-meet-with-et-actions { display: flex; gap: var(--space-xs); flex-shrink: 0; }
  .cal-meet-with-et-btn {
    padding: 2px 8px; font-size: var(--font-2xs);
    background: var(--elevated); border: 1px solid var(--border);
    border-radius: var(--radius-s); color: var(--ink);
    cursor: pointer; text-decoration: none;
  }
  .cal-meet-with-et-btn:hover { border-color: var(--accent); }
  .cal-meet-with-loading,
  .cal-meet-with-empty,
  .cal-meet-with-error {
    font-size: var(--font-xs); color: var(--ink-muted);
    padding: var(--space-sm);
    display: flex; align-items: center; justify-content: space-between;
  }
  .cal-meet-with-error { color: var(--danger); }

  /* ── Phase 4 A — composer "Meet-with" inserter popover ──────────
     Anchored to the composer button (см. meet-inserter.js); content
     mirrors the booking-links row look so the user recognises it as
     the same kind of artefact. Compact, no scroll under ~6 items. */
  .kc-meet-popover {
    position: fixed; z-index: 1300;
    width: 360px; max-width: calc(100vw - 32px);
    max-height: 60vh; overflow: hidden;
    display: flex; flex-direction: column;
    background: var(--raised); border: 1px solid var(--border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-l);
  }
  .kc-meet-header {
    flex: 0 0 auto;
    padding: var(--space-md);
    font-size: var(--font-xs); font-weight: 700;
    color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
  }
  .kc-meet-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    padding: 6px;
  }
  .kc-meet-list { display: flex; flex-direction: column; gap: 4px; }
  .kc-meet-row {
    display: flex; align-items: center; gap: var(--space-md);
    padding: 8px 10px; border-radius: var(--radius-s);
    background: transparent; border: 1px solid transparent;
    color: var(--ink); cursor: pointer; text-align: left;
    font: inherit; width: 100%;
    transition: var(--transition);
  }
  .kc-meet-row:hover { background: var(--surface); border-color: var(--accent); }
  /* Instant-meeting row — sits at the top of the list, accent-tinted
     to read as the primary action. */
  .kc-meet-row--instant {
    background: var(--accent-soft);
    border-color: var(--accent-soft);
  }
  .kc-meet-row--instant:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .kc-meet-row--instant:hover .kc-meet-row-meta { color: var(--ink); opacity: 0.78; }
  .kc-meet-row-icon {
    flex-shrink: 0;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-s);
    font-size: 16px;
  }
  .kc-meet-row--instant:hover .kc-meet-row-icon { background: var(--accent-hover, var(--accent)); }
  .kc-meet-empty-hint {
    margin: 0; padding: 6px 10px;
    font-size: var(--font-2xs); color: var(--ink-muted);
  }
  .kc-meet-empty-hint strong { color: var(--ink); }
  .kc-meet-row-main { flex: 1; min-width: 0; }
  .kc-meet-row-title { font-size: var(--font-sm); font-weight: 600; }
  .kc-meet-row-meta { font-size: var(--font-2xs); color: var(--ink-muted); margin-top: 2px; }
  .kc-meet-row-url {
    flex-shrink: 0; max-width: 140px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: var(--font-2xs); color: var(--ink-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .kc-meet-empty {
    padding: var(--space-md);
    font-size: var(--font-sm); color: var(--ink-muted);
    display: flex; flex-direction: column; gap: 10px;
  }
  .kc-meet-empty p { margin: 0; }
  .kc-meet-empty strong { color: var(--ink); }
  .kc-meet-footer {
    flex: 0 0 auto;
    padding: 6px;
    border-top: 1px solid var(--border);
  }
  .kc-meet-link-btn {
    width: 100%;
    padding: 8px 10px;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--border); border-radius: var(--radius-s);
    font: inherit; font-size: var(--font-sm);
    cursor: pointer; transition: var(--transition);
  }
  .kc-meet-link-btn:hover { border-color: var(--accent); background: var(--accent-soft); }

  /* ── Phase 4 B — rich-card for booking URLs in messages ────────
     Replaces the plain autolink so a "посмотри слот → запишись"
     CTA stays visually distinct from a wall-of-text reply. Block-
     level so a card pasted alone breaks out of the run of text. */
  .kc-meet-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px 12px;
    margin: 6px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    max-width: 480px;
  }
  .kc-meet-card-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius-s);
    font-size: 20px;
  }
  .kc-meet-card-body { flex: 1; min-width: 0; }
  .kc-meet-card-title {
    font-size: var(--font-sm); font-weight: 600;
    color: var(--ink);
  }
  .kc-meet-card-meta {
    font-size: var(--font-xs); color: var(--ink-muted); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  /* Compound selectors (.kc-meet-card + child class) match the 0,2,0
     specificity of .msg-text a — иначе родительский «синяя ссылка на
     синем фоне» побеждает и текст сливается с background. */
  .kc-meet-card .kc-meet-card-btn,
  .msg-text .kc-meet-card-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--accent); color: #fff;
    border: 1px solid var(--accent);
    border-radius: var(--radius-s);
    font-size: var(--font-xs); font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
  }
  .kc-meet-card .kc-meet-card-btn:hover,
  .msg-text .kc-meet-card-btn:hover {
    background: var(--accent-hover, var(--accent));
    border-color: var(--accent-hover, var(--accent));
    color: #fff;
    text-decoration: none;
  }
