.activity-message-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.activity-message-heading .pill{margin:0;min-width:0}.activity-message-slot{flex:none}.activity-message-slot:empty{display:none}
.activity-message-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;padding:7px 10px;border-radius:12px;border:1px solid #b9dcd1;background:#e3f2ee;color:#176b61;cursor:pointer;font:inherit;font-size:13px;font-weight:800}
.activity-message-button.has-unread{background:#fbe3de;border-color:#e4aaa1;color:#ad3428}.activity-message-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}.activity-message-button:focus-visible{outline:3px solid #173f5f;outline-offset:3px}
.activity-message-dialog{box-sizing:border-box;font-family:inherit;width:min(620px,calc(100vw - 24px));max-height:90dvh;padding:22px;border:1px solid #eadfce;border-radius:20px;background:#fff9ed;color:#17232b;overflow:auto;margin:auto}.activity-message-dialog::backdrop{background:#17232b88}
.activity-message-dialog .message-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.activity-message-dialog h2{margin:0;color:#173f5f;font-size:22px}.activity-message-dialog h3{margin:10px 0;color:#173f5f;font-size:17px;overflow-wrap:anywhere}.activity-message-dialog button{font:inherit;min-height:44px;padding:9px 13px;border:1px solid #eadfce;border-radius:11px;background:#fffdf8;color:#173f5f;cursor:pointer}.activity-message-dialog button.primary{background:#e85d3f;color:white;border-color:#e85d3f}.activity-message-dialog button:disabled{opacity:.6;cursor:wait}
.activity-message-dialog label{display:grid;gap:8px;margin:16px 0;font-weight:600}.activity-message-dialog textarea{box-sizing:border-box;width:100%;font:inherit;font-size:16px;min-height:100px;padding:12px;border:1px solid #ccbfae;border-radius:12px;background:white;color:#17232b}.activity-message-history{display:grid;gap:12px;margin-top:18px}.activity-message-item{border:1px solid #eadfce;border-radius:14px;background:#fffdf8;padding:14px}.activity-message-item p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;margin:8px 0}.activity-message-item time{color:#526269;font-size:12px}.activity-message-dialog [role=alert]{color:#ad3428;white-space:pre-wrap}.activity-message-dialog .message-help{color:#526269;font-size:13px;line-height:1.5}.activity-message-dialog .message-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.activity-message-dialog .message-actions [role=status]{color:#176b61;font-size:13px}

.private-message-section{margin:20px 0;padding:16px;border:1px solid #bedbd2;border-radius:16px;background:#f1f8f4}.private-message-section small{font-size:12px;color:#176b61}.private-message-section .activity-message-item{margin-top:10px}.private-new{display:inline-block;margin-left:8px;padding:3px 7px;background:#fbe3de;color:#ad3428;border-radius:7px;font-size:12px}.has-private-unread{color:#ad3428!important;border-color:#e4aaa1!important;background:#fbe3de!important}

.attendance-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.attendance-actions>span{font-size:13px;font-weight:700;color:#176b61}

.activity-message-dialog .message-trash{display:flex;align-items:center;justify-content:center;width:44px;padding:10px;margin:8px 0 0 auto;color:#ad3428}.message-trash svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.activity-message-slot{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.activity-message-button .message-button-label{font-size:12px}.activity-message-button svg{flex:none}.activity-message-dialog.private-chat-dialog{width:min(620px,calc(100vw - 16px));height:min(720px,92dvh);max-height:92dvh;padding:16px;overflow:hidden}.private-chat-dialog[open]{display:flex;flex-direction:column;gap:10px}.private-chat-dialog .message-dialog-head{flex:none}.private-chat-dialog h2{font-size:19px;overflow-wrap:anywhere}.chat-subtitle{font-size:12px;color:#526269;margin:5px 0 0}.chat-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px;background:#f8eddc;border-radius:14px}.chat-bubbles{display:flex;flex-direction:column;gap:10px}.chat-bubble{max-width:88%;padding:10px 12px;border-radius:15px;border:1px solid #eadfce;overflow-wrap:anywhere}.chat-bubble.is-mine{align-self:flex-end;background:#e3f2ee;border-color:#b9dcd1;border-bottom-right-radius:4px}.chat-bubble.is-theirs{align-self:flex-start;background:#fffdf8;border-bottom-left-radius:4px}.chat-bubble p{white-space:pre-wrap;line-height:1.45;margin:5px 0}.chat-sender{font-size:11px;font-weight:700;color:#176b61}.chat-meta{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;font-size:11px;color:#526269}.private-chat-dialog .message-trash{margin:0;width:36px;min-height:36px;padding:7px;border:0;background:transparent}.chat-compose{display:flex;align-items:flex-end;gap:8px;flex:none}.private-chat-dialog .chat-input-label{flex:1;margin:0;min-width:0;font-size:12px;gap:4px}.private-chat-dialog textarea{min-height:58px;max-height:120px;margin:0;padding:9px;resize:vertical}.chat-compose>button{margin-bottom:0}.private-chat-dialog .chat-error{margin:0;font-size:13px}.chat-error:empty{display:none}.chat-empty{text-align:center;color:#526269;font-size:13px}.private-chat-dialog [data-older]{display:block;margin:0 auto 12px}.activity-player-chat{display:inline-flex;align-items:center;gap:4px;flex:none}.activity-player-chat svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}.activity-player-chat.has-private-unread{font-weight:700}.activity-chat-others{border-top:1px solid #eadfce;padding-top:8px}.activity-chat-others:empty{display:none}

.chat-activity-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #eadfce}.activity-message-heading{flex-wrap:wrap}.activity-message-heading .activity-message-slot{margin-left:auto}@media(max-width:420px){.activity-message-button{padding:7px;gap:3px}.activity-message-button svg{width:18px}.chat-bubble{max-width:92%}}

.activity-message-dialog .message-header-actions{display:flex;gap:6px;flex:none;flex-wrap:wrap;justify-content:flex-end}.activity-message-dialog .message-header-actions button{padding:8px 10px;font-size:14px}.message-edit-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:none;padding:10px;border:1px solid #eadfce;border-radius:12px;background:#fff0dc}.message-edit-toolbar [data-selection-count]{font-size:12px;color:#526269;flex:1 0 100%}.activity-message-dialog .message-edit-toolbar button{font-size:13px;padding:8px 10px;color:#ad3428}.activity-message-dialog .message-select{display:flex;align-items:center;gap:8px;margin:0 0 8px;min-height:36px;font-size:12px;font-weight:600;color:#173f5f;cursor:pointer}.activity-message-dialog .message-select input{width:22px;height:22px;min-height:22px;padding:0;margin:0;accent-color:#176b61}.activity-message-dialog [hidden]{display:none!important}

.activity-message-dialog .message-icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:10px;flex:none}.message-icon-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.activity-message-dialog,.activity-message-dialog::backdrop{overscroll-behavior:none}.private-chat-dialog .chat-scroll,.private-chat-dialog textarea{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
/* Distinct public/private icons with compact, touch-friendly controls. */
.activity-message-slot .activity-message-button{position:relative;flex:0 0 44px;width:44px;height:44px;padding:9px;gap:0}
.activity-message-slot .activity-message-button svg{width:23px;height:23px}
.activity-message-slot .message-unread-count{position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 3px;border:1px solid #fffdf8;border-radius:9px;background:#ad3428;color:white;font-size:10px;line-height:15px;text-align:center}
.activity-message-heading .activity-message-slot{flex-wrap:nowrap;gap:8px}
.schedule-event .activity-message-heading>small{white-space:nowrap}

/* One close control: identical geometry in the header, profile, forms, PDF and chats. */
button.ludi-close,.activity-message-dialog button.ludi-close,.program-pdf-dialog button.ludi-close,button.modal-close.ludi-close {
  appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:14px;background:#173f5f;color:#fff;box-shadow:none;background-image:none;line-height:1;letter-spacing:normal;text-decoration:none;cursor:pointer;overflow:hidden;
}
button.ludi-close svg,.activity-message-dialog button.ludi-close svg { display:block;flex:none;width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
button.ludi-close::before,button.ludi-close::after { content:none;display:none; }
button.ludi-close:focus-visible { outline:3px solid #2a9d8f;outline-offset:3px; }
