/* Restriction controls are isolated from account management and native media controls. */
body .tc-admin .camlino-restrictions-card { grid-column: 1 / -1; min-width: 0; border-color: var(--aw-line, var(--tc-line)); }
body .tc-admin .camlino-restrictions-card .cr-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-block-end: 12px; }
body .tc-admin .camlino-restrictions-card .cr-heading h2 { margin: 0; font-size: 20px; }
body .tc-admin .camlino-restrictions-card .cr-description { color: var(--aw-muted, var(--tc-muted)); font-size: 12px; line-height: 1.65; margin: 0 0 14px; }
body .tc-admin .camlino-restrictions-card .cr-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 20px 0 8px; padding: 15px 18px; border: 1px solid var(--aw-line, var(--tc-line)); border-radius: 15px; background: var(--aw-surface-soft, var(--tc-surface-2)); }
body .tc-admin .camlino-restrictions-card .cr-summary dt { color: var(--aw-muted, var(--tc-muted)); font-size: 11px; }
body .tc-admin .camlino-restrictions-card .cr-summary dd { margin: 4px 0 0; color: var(--aw-ink, var(--tc-text)); font-size: 14px; font-weight: 700; }
body .tc-admin .camlino-restrictions-card .cr-revision { margin: 0 0 20px; color: var(--aw-muted, var(--tc-muted)); font-size: 11px; font-variant-numeric: tabular-nums; }
body .tc-admin .camlino-restrictions-card .cr-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-block-end: 15px; }
body .tc-admin .camlino-restrictions-card .cr-limit { min-width: 0; margin: 0; padding: 17px; border: 1px solid var(--aw-line, var(--tc-line)); border-radius: 17px; }
body .tc-admin .camlino-restrictions-card .cr-limit legend { padding-inline: 6px; color: var(--aw-ink, var(--tc-text)); font-family: Manrope, "Noto Sans Arabic", sans-serif; font-size: 14px; font-weight: 750; }
body .tc-admin .camlino-restrictions-card .cr-current { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 0 0 16px; min-height: 52px; }
body .tc-admin .camlino-restrictions-card .cr-current strong { padding: 4px 9px; border-radius: 8px; background: var(--aw-surface-soft, var(--tc-surface-2)); color: var(--aw-muted, var(--tc-muted)); font-size: 11px; }
body .tc-admin .camlino-restrictions-card .cr-current strong[data-active="true"] { background: var(--aw-amber-soft, #fff3dd); color: var(--aw-amber, #926119); }
body .tc-admin .camlino-restrictions-card .cr-current time { color: var(--aw-ink, var(--tc-text)); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
body .tc-admin .camlino-restrictions-card .cr-field { display: grid; gap: 8px; margin: 0 0 14px; min-width: 0; }
body .tc-admin .camlino-restrictions-card .cr-field > span { color: var(--aw-ink, var(--tc-text)); font-size: 12px; font-weight: 650; }
body .tc-admin .camlino-restrictions-card .cr-field :is(input, select, textarea) { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; border-radius: 11px; color: var(--aw-ink, var(--tc-text)); background: var(--aw-surface-soft, var(--tc-surface-2)); border: 1px solid var(--aw-line-strong, var(--tc-line)); padding: 10px 12px; font: inherit; }
body .tc-admin .camlino-restrictions-card .cr-field textarea { resize: vertical; min-height: 98px; }
body .tc-admin .camlino-restrictions-card .cr-field :is(input, select, textarea):disabled { opacity: .55; cursor: not-allowed; }
body .tc-admin .camlino-restrictions-card .cr-preview { margin: -3px 0 14px; font-size: 11px; color: var(--aw-blue, var(--tc-accent)); overflow-wrap: anywhere; }
body .tc-admin .camlino-restrictions-card .cr-permission { margin: 12px 0 0; color: var(--aw-amber, #926119); font-size: 12px; line-height: 1.6; }
body .tc-admin .camlino-restrictions-card .cr-conflict { display: grid; gap: 13px; padding: 16px; margin-block: 18px; border: 1px solid var(--aw-amber, #926119); border-radius: 14px; background: var(--aw-amber-soft, #fff3dd); color: var(--aw-ink, var(--tc-text)); }
body .tc-admin .camlino-restrictions-card .cr-conflict > p { color: inherit; line-height: 1.7; font-size: 12px; }
body .tc-admin .camlino-restrictions-card .cr-review { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; font-weight: 650; cursor: pointer; }
body .tc-admin .camlino-restrictions-card .cr-review input { appearance: auto; flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; accent-color: var(--aw-blue, var(--tc-accent)); }
body .tc-admin .camlino-restrictions-card .cr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block-start: 18px; }
body .tc-admin .camlino-restrictions-card [data-restrictions-save] { background: var(--aw-blue, var(--tc-accent)); border-color: var(--aw-blue, var(--tc-accent)); color: var(--aw-paper, white); min-height: 44px; padding-inline: 20px; }
body .tc-admin .camlino-restrictions-card [data-restrictions-save]:hover:not(:disabled) { background: var(--aw-blue-hover, var(--tc-accent)); color: var(--aw-paper, white); }
body .tc-admin .camlino-restrictions-card [data-restriction-clear] { min-height: 42px; font-size: 12px; text-align: start; }
body .tc-admin .camlino-restrictions-card .cr-feedback { padding: 12px 15px; border: 1px solid var(--aw-red, #b54054); border-radius: 12px; background: var(--aw-red-soft, #fff0f2); color: var(--aw-red, #b54054); line-height: 1.6; font-size: 12px; margin-block: 15px; overflow-wrap: anywhere; }
body .tc-admin .camlino-restrictions-card .cr-feedback[data-severity="success"] { color: var(--aw-green, #147052); background: var(--aw-green-soft, #e8f5ee); border-color: var(--aw-green, #147052); }
body .tc-admin .camlino-restrictions-card .cr-loading { display: flex; align-items: center; gap: 9px; color: var(--aw-muted, var(--tc-muted)); font-size: 12px; margin-block: 12px; }
body .tc-admin .camlino-restrictions-card .cr-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--aw-line, var(--tc-line)); border-top-color: var(--aw-blue, var(--tc-accent)); border-radius: 50%; animation: cr-spin .85s linear infinite; }
body .tc-admin .camlino-restrictions-card [hidden] { display: none !important; }

body.in-app #app .camlino-chat-restriction { max-width: 900px; margin: 0 auto 10px; padding: 11px 14px; border: 1px solid var(--xp-line, var(--tc-line)); border-inline-start: 3px solid var(--xp-blue, var(--tc-accent)); border-radius: 13px; color: var(--xp-ink, var(--tc-text)); background: var(--xp-blue-soft, var(--tc-accent-soft)); text-align: start; }
body.in-app #app .camlino-chat-restriction p { margin: 0; font-size: max(11px, calc(12px * var(--ui-scale))); font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
body.in-app #app .camlino-chat-restriction small { display: block; margin-top: 5px; color: var(--xp-muted, var(--tc-muted)); font-size: max(10px, calc(11px * var(--ui-scale))); line-height: 1.5; }
body.in-app #app #chat-overlay .camlino-chat-restriction { width: 100%; margin: 0; padding: 9px 11px; background: #101b2bf2; border-color: #ffffff36; border-inline-start-color: #c5f165; color: #f4f7ff; box-shadow: 0 5px 20px #0002; backdrop-filter: blur(18px); }
body.in-app #app #chat-overlay .camlino-chat-restriction small { color: #c4d1e7; }
body.in-app #app :is(#live-form, #direct-form)[data-chat-muted="true"] input[readonly] { cursor: not-allowed; }
@media (max-width: 700px) {
  body .tc-admin .camlino-restrictions-card .cr-limits { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  body .tc-admin .camlino-restrictions-card .cr-summary { grid-template-columns: minmax(0, 1fr); padding: 13px; }
  body .tc-admin .camlino-restrictions-card .cr-heading { align-items: flex-start; gap: 10px; }
  body .tc-admin .camlino-restrictions-card .cr-heading h2 { font-size: 18px; }
  body .tc-admin .camlino-restrictions-card .cr-limit { padding: 14px; }
  body .tc-admin .camlino-restrictions-card .cr-field :is(input, select, textarea) { font-size: 16px; }
  body .tc-admin .camlino-restrictions-card [data-restriction-clear] { min-height: 44px; }
  body.in-app #app #chat-overlay .camlino-chat-restriction { padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) { body .tc-admin .camlino-restrictions-card .cr-spinner { animation: none; } }
@keyframes cr-spin { to { transform: rotate(360deg); } }
