/* Native radio values keep submission and keyboard navigation consistent in every layout. */
html body #modal-root #communication-form .communication-type{grid-column:1}
html body #modal-root #communication-form .communication-priority{grid-column:1/-1;min-width:0;margin:0;padding:0!important;border:0!important}
html body #modal-root #communication-form .communication-priority legend{padding:0;margin-bottom:.4rem;font:inherit;color:var(--ink)}
html body #modal-root #communication-form .communication-priority-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem;min-width:0}
html body #modal-root #communication-form .communication-priority-choice{position:relative;display:block;min-width:0;margin:0;cursor:pointer}
html body #modal-root #communication-form .communication-priority-choice input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap}
html body #modal-root #communication-form .communication-priority-choice span{display:flex;align-items:center;justify-content:center;gap:.2rem;min-width:0;min-height:44px;padding:.45rem .3rem;border:1px solid var(--priority-border,var(--line));border-radius:999px;background:#fff!important;color:var(--priority-ink,var(--ink))!important;font-size:.8rem;line-height:1.2;white-space:nowrap;box-sizing:border-box}
html body #modal-root #communication-form .communication-priority-choice span::before{content:'';display:block;width:.75rem;flex:none;text-align:center}
html body #modal-root #communication-form .communication-priority-choice input[value="normalni"]+span{--priority-ink:var(--club-text);--priority-border:var(--club-border);--priority-selected:var(--club-control-border);--priority-bg:var(--club-soft)}
html body #modal-root #communication-form .communication-priority-choice input[value="dulezita"]+span{--priority-ink:#925811;--priority-border:#ead0a6;--priority-selected:#bc741a;--priority-bg:#fff3df}
html body #modal-root #communication-form .communication-priority-choice input[value="urgentni"]+span{--priority-ink:#ae3041;--priority-border:#e8c0c7;--priority-selected:#c74353;--priority-bg:#fff0f2}
html body #modal-root #communication-form .communication-priority-choice input:checked+span{border-color:var(--priority-selected)!important;background:var(--priority-bg)!important;box-shadow:inset 0 0 0 1px var(--priority-selected);font-weight:600}
html body #modal-root #communication-form .communication-priority-choice input:checked+span::before{content:'✓'}
html body #modal-root #communication-form .communication-priority-choice input:focus-visible+span{outline:2px solid var(--club-control-border);outline-offset:3px}
html body #modal-root .communication-editor-modal .modal-head{align-items:center;gap:.5rem}
html body #modal-root .communication-editor-modal .modal-head h2{flex:1;min-width:0}
html body #modal-root .communication-editor-modal .communication-pin{flex:none;width:2.75rem;height:2.75rem;min-height:44px;min-width:44px;padding:.6rem;border:1px solid var(--line);background:#fff!important;color:var(--muted)!important;box-shadow:none!important}
html body #modal-root .communication-editor-modal .communication-pin[aria-pressed="true"]{border-color:var(--club-control-border)!important;background:var(--club-soft)!important;color:var(--club-text)!important}
html body #modal-root .communication-editor-modal .communication-pin svg{width:1.25rem;height:1.25rem}

/* Mail folders sit directly above the message cards. */
html body #app-screen #view-communication .communication-mailboxes{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:1rem 0 .5rem}
html body #app-screen #view-communication .communication-mailbox-chip{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px;padding:.45rem .8rem;border-radius:999px;white-space:nowrap}
html body #app-screen #view-communication .communication-mailbox-count{font-size:.75rem;font-variant-numeric:tabular-nums;opacity:.8}
@media(max-width:480px){html body #app-screen #view-communication .communication-mailboxes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}html body #app-screen #view-communication .communication-mailbox-chip{min-width:0;padding-inline:.5rem;font-size:.85rem}}

html body #app-screen #view-communication .communication-parties{display:grid;gap:.2rem;margin-top:.5rem;overflow-wrap:anywhere}
html body #app-screen #view-communication .communication-parties small{display:block;white-space:normal;line-height:1.45}

.communication-message-actions{margin-top:.75rem;gap:.5rem}
.message-conversation{display:flex;flex-direction:column;gap:.75rem;padding:.5rem 0 1rem;max-height:50dvh;overflow:auto}
.message-bubble{align-self:flex-start;max-width:92%;border:1px solid var(--border);border-radius:16px 16px 16px 4px;padding:.75rem 1rem;background:var(--surface,#fff)}
.message-bubble.is-mine{align-self:flex-end;border-radius:16px 16px 4px 16px;background:var(--primary-soft,#eaf5ff)}
.message-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;margin:.35rem 0 0}
#message-reply-form textarea{margin-top:.4rem;width:100%}
.communication-push-hint{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;margin:.75rem 0;padding:.75rem 1rem;border:1px solid var(--border);border-radius:16px}
