/* A23 Community, "Spaces and access" (design: Sterling Connect Admin.dc.html, caxVals() › cax).
   Values copied from the design's inline styles. Prefix cx-. */

.cx-screen { display: flex; flex-direction: column; gap: 20px; }
.cx-screen form { margin: 0; }
.cx-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; }
.cx-eyebrow { display: flex; align-items: center; gap: 10px; font: 600 12px/16px 'DM Sans', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #127A00; }
.cx-eyebrow > span { width: 20px; height: 3px; background: #31FE01; flex: none; }
.cx-h1 { margin: 10px 0 6px; font: 800 36px/44px 'Plus Jakarta Sans', sans-serif; letter-spacing: -.02em; color: #01204E; }
.cx-intro { margin: 0; max-width: 700px; }
.cx-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: #FDECEA; color: #9E2A21; font: 600 14px/20px 'DM Sans', sans-serif; }
.cx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Buttons */
.cx-btn { height: 40px; padding: 0 16px; border: none; border-radius: 999px; background: #01204E; color: #FFFFFF; font: 600 14px/18px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.cx-btn:hover { background: #0D2F63; color: #FFFFFF; text-decoration: none; }
.cx-btn-44 { height: 44px; }
.cx-btn-sm { height: 34px; font-size: 13px; }
.cx-btn-outline { height: 34px; padding: 0 16px; border: 1.5px solid #01204E; border-radius: 999px; background: #FFFFFF; color: #01204E; font: 600 13px/18px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; text-decoration: none; }
.cx-btn-outline:hover { background: #F2F5FA; color: #01204E; text-decoration: none; }
.cx-ghost { height: 36px; padding: 0 12px; border: none; border-radius: 999px; background: transparent; color: #01204E; font: 600 13px/18px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; text-decoration: none; }
.cx-ghost:hover { background: #F2F5FA; color: #01204E; text-decoration: none; }
.cx-ghost[disabled] { cursor: default; background: transparent; }
.cx-danger, .cx-danger:hover { color: #9E2A21; }
.cx-btn:focus-visible, .cx-btn-outline:focus-visible, .cx-ghost:focus-visible, .cx-tab:focus-visible, .cx-space:focus-visible, .cx-tag-x:focus-visible, .cx-seg-btn:focus-visible { outline: 3px solid #31FE01; outline-offset: 2px; }

/* Tabs */
.cx-tabs { display: flex; gap: 24px; border-bottom: 1px solid #E6EAF0; overflow-x: auto; scrollbar-width: none; }
.cx-tabs::-webkit-scrollbar { display: none; }
.cx-tab { padding: 12px 0; border: none; background: transparent; color: #3A4352; font: 500 15px/20px 'DM Sans', sans-serif; box-shadow: none; cursor: pointer; white-space: nowrap; text-decoration: none; }
.cx-tab:hover { color: #01204E; text-decoration: none; }
.cx-tab[aria-current="page"] { color: #01204E; font-weight: 600; box-shadow: inset 0 -2px 0 #01204E; }

/* Pills (design ST, CST, ESt) */
.cx-pill { height: 24px; padding: 0 9px; border-radius: 999px; font: 600 12px/24px 'DM Sans', sans-serif; white-space: nowrap; flex: none; }
.cx-pill.is-green { background: #E4FFD9; color: #0E5C00; }
.cx-pill.is-grey { background: #F2F5FA; color: #3A4352; }
.cx-pill.is-amber { background: #FFF3DC; color: #7A4600; }
.cx-pill.is-muted { background: #EEF0F4; color: #6B7485; }
.cx-pill.is-red { background: #FDECEA; color: #9E2A21; }

/* Layout helpers */
.cx-grow { flex: 1; min-width: 0; }
.cx-minw { min-width: 0; }
.cx-center { text-align: center; }
.cx-col8 { display: flex; flex-direction: column; gap: 8px; }
.cx-col10 { display: flex; flex-direction: column; gap: 10px; }
.cx-col12 { display: flex; flex-direction: column; gap: 12px; }
.cx-col16 { display: flex; flex-direction: column; gap: 16px; }
.cx-end { display: flex; justify-content: flex-end; }
.cx-end8 { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.cx-card { background: #FFFFFF; border: 1px solid #E6EAF0; border-radius: 24px; overflow: hidden; }
.cx-card.cx-pad { padding: 20px 22px; overflow: visible; }
.cx-card.cx-scroll { overflow-x: auto; }
.cx-card-rows { background: #FFFFFF; border: 1px solid #E6EAF0; border-radius: 24px; padding: 6px 22px; }
.cx-h3 { font: 700 18px/24px 'Plus Jakarta Sans', sans-serif; color: #01204E; }
.cx-hint { font-size: 13px; line-height: 20px; color: #6B7485; }
.cx-name { font: 600 15px/22px 'DM Sans', sans-serif; color: #01204E; }
.cx-meta { font-size: 13px; line-height: 20px; color: #6B7485; }
.cx-meta12 { font-size: 12px; line-height: 18px; color: #6B7485; }

/* Spaces */
.cx-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cx-list { flex: 2 1 420px; min-width: 0; background: #FFFFFF; border: 1px solid #E6EAF0; border-radius: 24px; overflow: hidden; }
.cx-space { padding: 14px 20px; border-bottom: 1px solid #EEF0F4; display: flex; gap: 12px; align-items: center; background: #FFFFFF; cursor: pointer; color: inherit; text-decoration: none; }
.cx-space:hover { text-decoration: none; color: inherit; }
.cx-space.is-on { background: #F2F5FA; }
.cx-editor { flex: 3 1 480px; min-width: 0; background: #FFFFFF; border: 1px solid #E6EAF0; border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.cx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px 18px; }
.cx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cx-full { grid-column: 1 / -1; }
.cx-label { font: 600 13px/18px 'DM Sans', sans-serif; color: #01204E; }
.cx-input-name { height: 44px; padding: 0 12px; border: 1px solid #C5CBD5; border-radius: 12px; font: 600 15px/20px 'DM Sans', sans-serif; color: #01204E; outline: none; background: #FFFFFF; min-width: 0; }
.cx-input { height: 44px; padding: 0 12px; border: 1px solid #C5CBD5; border-radius: 12px; font-size: 15px; color: #121826; outline: none; background: #FFFFFF; min-width: 0; }
.cx-input-42 { height: 42px; padding: 0 12px; border: 1px solid #C5CBD5; border-radius: 12px; font-size: 14px; color: #121826; outline: none; background: #FFFFFF; min-width: 0; width: 100%; box-sizing: border-box; }
.cx-textarea { padding: 10px 12px; border: 1px solid #C5CBD5; border-radius: 12px; font-size: 14px; line-height: 22px; color: #121826; resize: vertical; outline: none; font-family: inherit; background: #FFFFFF; }
.cx-sel-wrap { position: relative; }
.cx-select { width: 100%; height: 42px; padding: 0 36px 0 12px; border: 1px solid #C5CBD5; border-radius: 12px; font-size: 14px; color: #121826; background: #FFFFFF; appearance: none; -webkit-appearance: none; box-sizing: border-box; font-family: inherit; }
.cx-select[disabled] { background: #F7F8FA; color: #6B7485; }
.cx-caret { position: absolute; right: 10px; top: 11px; width: 20px; height: 20px; pointer-events: none; display: block; }
.cx-input-name:focus, .cx-input:focus, .cx-input-42:focus, .cx-textarea:focus, .cx-select:focus, .cx-tag-input:focus { border-color: #01204E; }
.cx-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 12px; border-top: 1px solid #EEF0F4; }
.cx-note { font-size: 13px; line-height: 20px; color: #6B7485; }

/* Chips (design chip()) */
.cx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-chip { position: relative; display: inline-flex; }
.cx-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cx-chip span { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #DFE3EA; background: #FFFFFF; color: #01204E; font: 600 13px/18px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; box-sizing: border-box; }
.cx-chip input:checked + span { background: #01204E; color: #FFFFFF; border-color: #01204E; }
.cx-chip input:focus-visible + span { outline: 3px solid #31FE01; outline-offset: 2px; }
.cx-chip.is-locked span { cursor: default; }

/* Segments (design seg()) */
.cx-seg { display: flex; padding: 3px; background: #EEF0F4; border-radius: 999px; gap: 3px; width: max-content; max-width: 100%; overflow-x: auto; box-sizing: border-box; }
.cx-seg-opt { position: relative; display: inline-flex; flex: none; }
.cx-seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cx-seg-opt span, .cx-seg-btn { height: 34px; padding: 0 14px; border: none; border-radius: 999px; background: transparent; color: #01204E; box-shadow: none; font: 600 13px/18px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; flex: none; }
.cx-seg-opt input:checked + span, .cx-seg-btn.is-on { background: #FFFFFF; box-shadow: 0 1px 3px rgba(1, 32, 78, .12); }
.cx-seg-opt input:focus-visible + span { outline: 3px solid #31FE01; outline-offset: 1px; }
.cx-seg-btn[disabled] { cursor: default; }

/* Rows (circle rules, settings segments) */
.cx-segrow { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #EEF0F4; }
.cx-segrow-text { flex: 1 1 240px; min-width: 0; }
.cx-row-title { font: 600 15px/22px 'DM Sans', sans-serif; color: #01204E; }
.cx-row-desc { font-size: 13px; line-height: 20px; color: #6B7485; }
.cx-row-desc:empty { display: none; }

/* Circles and events lists */
.cx-row { padding: 14px 22px; border-bottom: 1px solid #EEF0F4; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.cx-row-text { flex: 1 1 260px; min-width: 0; }
.cx-event { padding: 14px 22px; border-bottom: 1px solid #EEF0F4; display: flex; flex-direction: column; gap: 10px; }
.cx-row-in { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.cx-qs { padding: 12px 14px; border-radius: 14px; background: #F7F8FA; display: flex; flex-direction: column; gap: 8px; }
.cx-qs[hidden] { display: none; }
.cx-q { display: flex; gap: 10px; justify-content: space-between; font-size: 14px; line-height: 21px; }
.cx-q-t { color: #121826; min-width: 0; }
.cx-q-who { color: #6B7485; flex: none; }
.cx-rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 16px; }
.cx-evform { background: #FFFFFF; border: 1.5px solid #01204E; border-radius: 24px; padding: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px 18px; }
.cx-evform[hidden] { display: none; }

/* Who can do what (design matrix()) */
.cx-mx { min-width: 680px; }
.cx-mx-head, .cx-mx-row { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(5, minmax(84px, 1fr)); gap: 8px; padding: 12px 22px; }
.cx-mx-head { border-bottom: 1px solid #E6EAF0; font: 600 12px/16px 'DM Sans', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #6B7485; }
.cx-mx-row { border-bottom: 1px solid #EEF0F4; align-items: center; }
.cx-mx-label { font: 600 14px/20px 'DM Sans', sans-serif; color: #01204E; }
.cx-mx-desc { font-size: 12px; line-height: 16px; color: #6B7485; }
.cx-mx-cell { display: flex; justify-content: center; }
.cx-tick { position: relative; display: inline-flex; }
.cx-tick input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.cx-tick span { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid #01204E; background: #FFFFFF; color: transparent; font: 700 14px/22px 'DM Sans', sans-serif; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.cx-tick input:checked + span { background: #01204E; color: #31FE01; }
.cx-tick.is-locked span { border-color: #DFE3EA; }
.cx-tick.is-locked input { cursor: default; }
.cx-tick input:focus-visible + span { outline: 3px solid #31FE01; outline-offset: 2px; }

/* Exceptions */
.cx-ex-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; align-items: end; }
.cx-ex { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding-top: 10px; border-top: 1px solid #EEF0F4; }
.cx-ex-list { display: flex; flex-direction: column; gap: 12px; }
.cx-ex-list:empty { display: none; }
.cx-ex-user { font: 600 14px/20px 'DM Sans', sans-serif; color: #01204E; flex: 1 1 200px; min-width: 0; }
.cx-ex-feat { font-size: 14px; color: #3A4352; flex: 1 1 200px; min-width: 0; }

/* Settings switches (design swRow()) */
.cx-swrow { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid #EEF0F4; cursor: pointer; }
.cx-switch { display: block; width: 44px; height: 26px; border-radius: 999px; background: #C5CBD5; position: relative; flex: none; transition: background .2s; }
.cx-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.cx-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(1, 32, 78, .3); transition: left .2s; }
.cx-switch:has(input:checked) { background: #01204E; }
.cx-switch:has(input:checked) i { left: 21px; }
.cx-switch:has(input:focus-visible) { outline: 3px solid #31FE01; outline-offset: 2px; }

/* Topic tags */
.cx-tag { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-radius: 999px; background: #F2F5FA; color: #01204E; font: 600 13px/18px 'DM Sans', sans-serif; }
.cx-tag-x { width: 22px; height: 22px; border: none; border-radius: 50%; background: #FFFFFF; color: #01204E; font: 700 13px/22px 'DM Sans', sans-serif; cursor: pointer; padding: 0; }
.cx-tag-add { display: flex; gap: 8px; max-width: 420px; }
.cx-tag-input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid #C5CBD5; border-radius: 999px; font-size: 14px; color: #121826; outline: none; background: #FFFFFF; }

@media (max-width: 600px) {
  .cx-h1 { font-size: 30px; line-height: 38px; }
}
