/* Additive group appointment workspace. */
.appt-group-modal { width:min(980px,calc(100vw - 32px)); max-width:980px; max-height:min(900px,calc(100vh - 32px)); max-height:min(900px,calc(100dvh - 32px)); display:flex; flex-direction:column; overflow:hidden; }
.appt-group-modal .modal-header,.appt-group-modal .modal-footer { flex:0 0 auto; }
.appt-group-modal .modal-body { min-height:0; flex:1 1 auto; overflow:auto; overscroll-behavior:contain; }
.appt-group-modal .form-label { color:var(--text-secondary); }
.appt-group-modal .btn-danger { background:var(--danger-hover,#dc2626); border-color:var(--danger-hover,#dc2626); }
#appt-group-action-modal .appt-group-modal { width:min(560px,calc(100vw - 32px)); max-width:560px; }
.appt-group-intro,.appt-group-review-note { padding:12px 14px; border:1px solid var(--border-color); border-radius:10px; background:var(--bg-secondary); color:var(--text-secondary); font-size:.84rem; line-height:1.45; }
.appt-group-review-note { display:flex; gap:9px; align-items:flex-start; color:#047857; border-color:#a7f3d0; background:#ecfdf5; }
.appt-group-main-grid { display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:12px; margin:16px 0; align-items:end; }
.appt-group-main-grid .form-group { margin:0; }
.appt-group-main-grid .appt-time24 { width:100%; }
.appt-group-main-grid .appt-time24-select { flex:1; }
.appt-group-attendee-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:18px 0 10px; }
.appt-group-attendee-heading div div { color:var(--text-secondary); font-size:.76rem; margin-top:3px; }
.appt-group-attendees { display:flex; flex-direction:column; gap:9px; margin-bottom:16px; }
.appt-group-attendee { display:grid; grid-template-columns:28px minmax(130px,1.2fr) minmax(140px,1.2fr) minmax(130px,1fr) minmax(130px,1fr) 38px; align-items:end; gap:8px; padding:12px; border:1px solid var(--border-color); border-radius:10px; background:var(--bg-card,#fff); }
.appt-group-attendee > label > span,.appt-group-name-field > label:first-child > span { display:block; color:var(--text-secondary); font-size:.7rem; font-weight:700; margin-bottom:5px; }
.appt-group-contact-check { display:flex; align-items:center; gap:5px; margin-top:5px; color:var(--text-secondary); font-size:.65rem; }
.appt-group-attendee > label[hidden] { display:block; visibility:hidden; }
.appt-group-attendee-index { align-self:center; display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#eef2ff; color:#4f46e5; font-weight:800; font-size:.75rem; }
.appt-group-attendee .appt-icon-btn { min-width:38px; min-height:38px; }
.appt-group-review { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.appt-group-review-row,.appt-group-detail-row { display:grid; grid-template-columns:minmax(140px,1fr) minmax(180px,1fr); gap:12px; padding:12px 14px; border:1px solid var(--border-color); border-radius:10px; }
.appt-group-review-row > div,.appt-group-detail-row > div { display:flex; flex-direction:column; gap:3px; }
.appt-group-review-row span,.appt-group-detail-row span { color:var(--text-secondary); font-size:.76rem; }
.appt-group-meta { display:grid; grid-template-columns:auto 1fr; gap:6px 12px; padding:12px; margin-bottom:12px; border-radius:10px; background:var(--bg-secondary); font-size:.78rem; }
.appt-group-meta span { color:var(--text-secondary); }
.appt-group-meta code { overflow-wrap:anywhere; }
.appt-group-detail-row { grid-template-columns:minmax(130px,1.2fr) minmax(170px,1fr) auto auto; align-items:center; }
.appt-group-detail-row.is-cancelled { opacity:.58; }
.appt-group-detail-row .appt-row-actions { justify-content:flex-end; }
.appt-group-btn { white-space:nowrap; }

[data-theme="dark"] .appt-group-review-note { background:#052e24; border-color:#065f46; color:#a7f3d0; }
[data-theme="dark"] .appt-group-attendee-index { background:#312e81; color:#e0e7ff; }

@media (max-width:900px) {
    .appt-group-attendee { grid-template-columns:28px 1fr 1fr; }
    .appt-group-attendee > label:nth-of-type(3),.appt-group-attendee > label:nth-of-type(4) { grid-column:auto; }
    .appt-group-attendee .appt-icon-btn { grid-column:3; justify-self:end; }
    .appt-group-detail-row { grid-template-columns:1fr 1fr; }
}

@media (max-width:640px) {
    .appt-group-modal,#appt-group-action-modal .appt-group-modal { width:100%; max-width:none; max-height:calc(100vh - var(--mobile-nav-height,64px)); max-height:calc(100dvh - var(--mobile-nav-height,64px)); margin:0; border-radius:14px 14px 0 0; align-self:flex-end; }
    .appt-group-main-grid,.appt-group-attendee,.appt-group-review-row,.appt-group-detail-row { grid-template-columns:1fr; }
    .appt-group-attendee-index { position:absolute; transform:translate(-5px,-5px); }
    .appt-group-attendee { position:relative; padding-top:32px; }
    .appt-group-attendee .appt-icon-btn { grid-column:1; justify-self:end; }
    .appt-group-attendee > label[hidden] { display:none; }
    .appt-group-attendee-heading { align-items:flex-start; }
    .appt-group-detail-row .appt-row-actions { justify-content:flex-start; }
    .appt-group-modal .modal-footer { flex-wrap:wrap; padding-bottom:max(.75rem,env(safe-area-inset-bottom)); }
    .appt-group-modal .modal-footer .btn { flex:1 1 150px; min-height:44px; }
}
