/* ============================================================================
   K4 "Freigabe mit einem Tipp" (W21, webapp-v4/seiten/07 #freigabe, 05/06 hint,
   12 WhatsApp row, public approval page). All scoped under .bl-v4.
   ========================================================================= */

/* AI settings, section #freigabe: switch left, phone preview right */
.bl-v4 .bl-k4-notify { display: grid; grid-template-columns: minmax(0, 1fr) 252px; gap: 32px; align-items: start; }
.bl-v4 .bl-k4-note { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.bl-v4 .bl-k4-note .bl-ic { margin-top: 2px; color: var(--muted); }
.bl-v4 .bl-k4-sw .bl-switch { align-items: flex-start; gap: 14px; }
.bl-v4 .bl-k4-sw .bl-switch-track { margin-top: 2px; }
.bl-v4 .bl-k4-sw:has(input:disabled) .bl-switch { opacity: .55; cursor: not-allowed; }
.bl-v4 .bl-k4-sw-text { display: flex; flex-direction: column; gap: 4px; }
.bl-v4 .bl-k4-sw-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.bl-v4 .bl-k4-sw-sub { font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.bl-v4 .bl-k4-sw-lock { margin: 10px 0 0 54px; }
.bl-v4 .bl-k4-channels { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 0 54px; padding: 0; list-style: none; }
.bl-v4 .bl-k4-channels li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink-2); }
.bl-v4 .bl-k4-channels li .bl-ic { color: var(--accent); }
.bl-v4 .bl-k4-channels li.bl-is-off { color: var(--muted); }
.bl-v4 .bl-k4-channels li.bl-is-off .bl-ic { color: var(--muted-2); }
.bl-v4 .bl-k4-keys { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.bl-v4 .bl-k4-keys .bl-tag { height: 22px; padding: 0 8px; font-size: 11.5px; color: var(--accent-ink); }
.bl-v4 .bl-is-off .bl-k4-keys .bl-tag { color: var(--muted); }
.bl-v4 .bl-k4-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.bl-v4 .bl-k4-foot .bl-ic { color: var(--accent); }
.bl-v4 .bl-k4-foot .bl-link { display: inline-flex; align-items: center; gap: 4px; }
.bl-v4 .bl-k4-preview { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bl-v4 .bl-k4-preview .bl-phone-frame { width: 252px; }
.bl-v4 .bl-k4-preview .bl-chat { min-height: 300px; }
.bl-v4 .bl-k4-preview-cap { max-width: 252px; font-size: 12px; line-height: 1.45; text-align: center; color: var(--muted); }

/* Mail preview inside the phone frame (always light, like a mail client) */
.bl-v4 .bl-phone-screen.bl-k4-mail, .dark .bl-v4 .bl-phone-screen.bl-k4-mail { background: #ffffff; color: #1f2a2c; }
.bl-v4 .bl-k4-mail-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid #e6ebeb; font-size: 12px; color: #5d7275; }
.bl-v4 .bl-k4-mail-head .bl-brand-tile { width: 28px; height: 28px; font-size: 10px; }
.bl-v4 .bl-k4-mail-head b { display: block; font-size: 13px; color: #1f2a2c; }
.bl-v4 .bl-k4-mail-head span:last-child { margin-left: auto; font-size: 11px; }
.bl-v4 .bl-k4-mail-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 18px; min-height: 300px; font-size: 12.5px; line-height: 1.5; }
.bl-v4 .bl-k4-mail-subj { font-size: 14px; font-weight: 700; color: #1f2a2c; line-height: 1.35; }
.bl-v4 .bl-k4-mail-quote { padding-left: 10px; border-left: 2px solid #e2c27a; color: #5d7275; font-style: italic; }
.bl-v4 .bl-k4-mail-draft { padding: 10px 12px; border-radius: 10px; background: #f1f6f6; border: 1px solid #d5e5e4; }
.bl-v4 .bl-k4-mail-btn { display: flex; justify-content: center; align-items: center; height: 36px; border-radius: 999px; background: #0f766e; color: #fff; font-weight: 700; }
.bl-v4 .bl-k4-mail-link { text-align: center; color: #0f766e; font-weight: 600; text-decoration: underline; }

/* Dashed hint under the approval queue (05/06) */
.bl-v4 .bl-k4-hint { display: flex; align-items: center; gap: 14px; margin-top: 32px; padding: 14px 18px; border-radius: 14px; border: 1px dashed var(--line-strong); font-size: 13.5px; color: var(--ink-2); }
.bl-v4 .bl-k4-hint-ics { display: inline-flex; gap: 6px; color: var(--accent); flex: none; }
.bl-v4 .bl-k4-hint-text { flex: 1 1 auto; min-width: 0; }
.bl-v4 .bl-k4-hint-text strong { color: var(--ink); }

/* Settings, notifications tab (21): channel chips per row, WhatsApp foot */
.bl-v4 .bl-set-chrow { cursor: default; }
.bl-v4 .bl-set-nlink { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 13px; }
.bl-v4 .bl-set-chs { display: flex; gap: 8px; flex: none; }
.bl-v4 .bl-set-ch { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.bl-v4 .bl-set-ch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bl-v4 .bl-set-ch .bl-ic-on { display: none; }
.bl-v4 .bl-set-ch:hover { border-color: var(--accent); color: var(--ink); }
.bl-v4 .bl-set-ch:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.bl-v4 .bl-set-ch:has(input:checked) .bl-ic-on { display: inline; }
.bl-v4 .bl-set-ch:has(input:checked) .bl-ic-off { display: none; }
.bl-v4 .bl-set-ch:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.bl-v4 .bl-set-ch:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.bl-v4 .bl-set-ch:has(input:disabled):hover { border-color: var(--line-strong); color: var(--muted); }
.bl-v4 .bl-set-wa-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.bl-v4 .bl-set-wa-foot > .bl-ic { color: var(--accent); }
.bl-v4 .bl-set-wa-foot .bl-link { display: inline-flex; align-items: center; gap: 4px; }

/* WhatsApp page: the switch saves right away; locked while the request runs */
.bl-v4 .bl-k4-wa-form[aria-busy="true"] .bl-switch { pointer-events: none; opacity: .6; }

/* Public approval page (no login, signed mail link) */
.bl-v4.bl-k4-public { min-height: 100vh; padding: 48px 16px; background: var(--bg); }
.bl-v4 .bl-k4-public-card { max-width: 560px; margin: 0 auto; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.bl-v4 .bl-k4-public-card--msg { align-items: center; text-align: center; }
.bl-v4 .bl-k4-public-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.bl-v4 .bl-k4-public-review { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.bl-v4 .bl-k4-public-who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.bl-v4 .bl-k4-public-quote { margin-top: 6px; font-size: 13.5px; line-height: 1.5; font-style: italic; color: var(--muted); }
.bl-v4 .bl-k4-public-draft { padding: 12px 14px; border-radius: 12px; background: var(--good-soft); border: 1px solid var(--good-line); font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.bl-v4 .bl-k4-public-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.bl-v4 .bl-k4-public-actions--center { justify-content: center; }
.bl-v4 .bl-k4-public-note { margin-top: 4px; }
.bl-v4 .bl-k4-public-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.bl-v4 .bl-k4-public-ic--good { background: var(--good-soft); color: var(--good); }
.bl-v4 .bl-k4-public-ic--warn { background: var(--warn-soft); color: var(--warn); }
.bl-v4 .bl-k4-public-ic--bad { background: var(--bad-soft); color: var(--bad); }

@media (max-width: 1023.98px) {
  .bl-v4 .bl-k4-notify { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 639.98px) {
  .bl-v4 .bl-k4-channels, .bl-v4 .bl-k4-sw-lock { margin-left: 0; }
  .bl-v4 .bl-set-chrow { flex-direction: column; gap: 12px; }
  .bl-v4 .bl-k4-hint { flex-wrap: wrap; align-items: flex-start; padding: 14px 16px; }
  .bl-v4 .bl-k4-hint-text { flex-basis: calc(100% - 60px); }
  .bl-v4 .bl-k4-hint .bl-btn { width: 100%; height: 40px; }
  .bl-v4 .bl-k4-public-card { padding: 20px; }
  .bl-v4 .bl-k4-public-actions .bl-btn { width: 100%; }
}
