/* Circle's grouped directory, using the shared Coherio surface and typography. */
body[data-workspace=true]:has(#spaces-directory) #main{padding:0;max-width:none;background:var(--canvas)}
body[data-workspace=true]:has(#spaces-directory) .topbar .workspace-page-tools{justify-content:flex-end;margin-left:auto}
body[data-workspace=true]:has(#spaces-directory) .shell{padding-bottom:0}
.spaces-directory{min-width:0;min-height:calc(100dvh - var(--workspace-header-height));padding:32px 40px 48px;color:var(--ink)}
body[data-workspace=true] .spaces-directory-title{font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.6px;margin:0 0 26px}
.spaces-directory-tabs{display:flex;gap:12px;align-items:flex-end;border-bottom:1px solid var(--line);padding:0;margin-bottom:16px}
.spaces-directory-tab{display:inline-flex;align-items:center;gap:9px;min-height:38px;padding:6px 16px;border:1px solid transparent;border-radius:12px 12px 0 0;background:transparent;color:var(--muted);font-size:14px;cursor:pointer;margin-bottom:-1px;white-space:nowrap}
.spaces-directory-tab[aria-selected=true]{color:var(--ink);border-color:var(--line);border-bottom-color:var(--surface);background:var(--surface)}
.spaces-directory-tab>span{display:grid;place-items:center;min-width:25px;height:25px;padding:0 6px;border:1px solid var(--line);border-radius:9px;color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums}
.spaces-directory-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;min-height:32px}
.spaces-directory-toolbar>strong{font-size:16px;font-weight:600;letter-spacing:-.25px}
.spaces-directory .spaces-directory-filter-toggle{display:flex;align-items:center;gap:8px;min-height:34px;padding:6px 12px;background:var(--surface);font-size:14px;border-color:var(--line);border-radius:9px}
.spaces-directory-filter-toggle .icon{width:16px;height:16px}
.spaces-directory-filters{display:flex;flex-wrap:wrap;gap:8px;margin:-4px 0 16px}
.spaces-directory-filters[hidden]{display:none}
.spaces-directory .spaces-directory-filter{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:250px;font-size:13px;border-radius:8px;min-height:32px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.spaces-directory-filter .icon{width:13px;height:13px;flex-shrink:0}
.spaces-directory .is-active{border-color:var(--ink);color:var(--ink)}
.spaces-directory-clear{padding:6px 8px;color:var(--muted);background:none;border:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.spaces-directory-table-scroll{max-width:100%;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:8px;isolation:isolate;scrollbar-width:thin}
.spaces-directory-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:14px;line-height:1.4}
.spaces-directory-table .space-name-column{width:232px}
.spaces-directory-table .space-type-column,.spaces-directory-table .space-members-column,.spaces-directory-table .space-access-column{width:120px}
.spaces-directory-table .space-moderators-column{width:140px}
.spaces-directory-table .space-post-column{width:212px}
.spaces-directory-table .space-invite-column,.spaces-directory-table .space-hide-column{width:252px}
.spaces-directory-table.is-deleted .space-name-column{width:366px}
.spaces-directory-table .space-archived-column{width:184px}
.spaces-directory-table .space-deadline-column{width:232px}
.spaces-directory-table .space-actions-column{width:44px}
.spaces-directory-table th,.spaces-directory-table td{height:52px;padding:12px 16px;border-bottom:1px solid var(--line);text-align:left;font-weight:400;vertical-align:middle;background:var(--surface)}
.spaces-directory-table thead th{height:40px;padding-top:9px;padding-bottom:9px;color:var(--muted);font-weight:500;white-space:nowrap}
.spaces-directory-table .spaces-directory-name-cell,.spaces-directory-table .spaces-directory-row-actions{position:sticky;z-index:1}
.spaces-directory-table .spaces-directory-name-cell{left:0}
.spaces-directory-table .spaces-directory-row-actions{right:0;padding:6px}
.spaces-directory-table-scroll[data-scrolled-left] .spaces-directory-name-cell{box-shadow:8px 0 12px -10px rgb(0 0 0 / .24)}
.spaces-directory-table-scroll[data-scrolled-right] .spaces-directory-row-actions{box-shadow:-8px 0 12px -10px rgb(0 0 0 / .24)}
.spaces-directory-table td time{white-space:nowrap;font-variant-numeric:tabular-nums}
.spaces-directory-table tbody:last-child tr:last-child td,.spaces-directory-table tbody:last-child tr:last-child th{border-bottom:0}
.spaces-directory-group-row th{padding:9px 16px;height:52px}
.spaces-directory-group-toggle{display:flex;align-items:center;gap:10px;max-width:100%;border:0;padding:4px 0;background:transparent;color:var(--ink);font-size:14px;cursor:pointer;text-align:left}
.spaces-directory-group-toggle>span:first-of-type{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.spaces-directory-group-toggle>.icon{flex:none;width:13px;height:13px;transition:transform 160ms ease}
.spaces-directory-group-toggle[aria-expanded=false]>.icon{transform:rotate(-90deg)}
.spaces-directory-group-count{flex:none;white-space:nowrap;font-variant-numeric:tabular-nums}
.spaces-directory-group-items[hidden]{display:none}
.spaces-directory-table:not(.is-deleted) .spaces-directory-group-items tr:hover>td,.spaces-directory-table.is-deleted .spaces-directory-group-items tr:has(.spaces-directory-more:hover)>td{background:var(--soft)}
.spaces-directory-name{display:flex;align-items:center;gap:11px;min-width:0;margin-left:26px;color:var(--ink);text-decoration:none;font-weight:500}
.spaces-directory-name>span:nth-child(2){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.spaces-directory-icon{flex:0 0 16px;display:grid;place-items:center;width:16px;height:18px}
.spaces-directory-icon :is(svg,img,.space-icon-shape){display:block;width:16px;height:16px;object-fit:contain}
.spaces-directory-icon .space-icon-emoji{font-size:16px;line-height:1}
.spaces-directory-hidden{display:flex;flex:0 0 13px;color:var(--muted)}
.spaces-directory-hidden .icon{width:13px;height:13px}
.spaces-directory-more{display:grid;place-items:center;width:30px;height:32px;border:0;border-radius:7px;background:transparent;color:var(--muted);cursor:pointer}
.spaces-directory-more .icon{width:18px;height:18px}
.spaces-directory-more:hover,.spaces-directory-more[aria-expanded=true]{background:var(--hover);color:var(--ink)}
.spaces-directory-empty{display:grid;border:1px solid var(--line);border-radius:8px;background:var(--surface);justify-items:center;align-content:center;gap:16px;min-height:230px;color:var(--muted);text-align:center;padding:24px}
.spaces-directory-error{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:var(--error);font-size:13px;margin:0 0 16px}
.spaces-directory-pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:16px;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.spaces-directory-pagination>span{margin-right:8px}
.spaces-directory-pagination .btn{width:32px;height:32px;padding:6px}
.spaces-directory-menu{position:fixed;z-index:160;min-width:215px;max-width:calc(100vw - 24px);max-height:min(420px,calc(100dvh - 24px));overflow-y:auto;padding:5px;border:1px solid var(--line);border-radius:9px;background:var(--popup);color:var(--ink);box-shadow:var(--shadow-menu);animation:spaces-directory-menu-in 120ms ease-out}
.spaces-directory-menu>button{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:35px;width:100%;padding:8px 11px;border:0;border-radius:5px;text-align:left;font-size:13px;font-weight:400;background:transparent;color:var(--ink);cursor:pointer;white-space:normal}
.spaces-directory-menu>button:hover,.spaces-directory-menu>button:focus-visible{background:var(--popup-hover)}
.spaces-directory-menu>button.is-danger{color:var(--error)}
.spaces-directory-menu>button .icon{width:14px;height:14px;flex-shrink:0}
.spaces-directory-menu hr{margin:5px -5px;border:0;border-top:1px solid var(--line)}
.spaces-directory-row-menu{padding:8px}
.spaces-directory-row-menu>button{justify-content:flex-start;gap:10px;padding:8px 6px;font-size:14px}
.spaces-directory-row-menu>button .icon{width:16px;height:16px}
.spaces-directory-row-menu hr{margin:5px 0}
.spaces-directory-menu form{display:grid;gap:12px;padding:7px}
.spaces-directory-menu form label{display:grid;gap:7px;font-size:13px}
.spaces-directory-menu form input{width:230px;max-width:100%;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:7px;padding:9px;font-size:14px}
.spaces-directory-menu form>.btn{justify-self:end}
.spaces-directory :is(button,a,[tabindex]):focus-visible,.spaces-directory-menu :is(button,input):focus-visible{outline:2px solid var(--ink);outline-offset:2px}
.spaces-directory-sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@keyframes spaces-directory-menu-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){body[data-workspace=true] .spaces-directory-title{font-size:21px;line-height:28px;margin-bottom:22px}.spaces-directory{padding:20px 16px 24px}.spaces-directory-tabs{gap:4px}.spaces-directory-tab{padding:6px 12px;font-size:14px}.spaces-directory-toolbar>strong{font-size:15px}.spaces-directory-table-scroll{border-radius:8px}.spaces-directory-table .space-name-column,.spaces-directory-table.is-deleted .space-name-column{width:clamp(128px,45vw,200px)}.spaces-directory-name{margin-left:8px}.spaces-directory-menu>button{min-height:40px}}
@media(prefers-reduced-motion:reduce){.spaces-directory-group-toggle>.icon{transition:none}.spaces-directory-menu{animation:none}}

.course-placements{display:grid;gap:12px}
.course-placements>p{margin:0;color:var(--muted)}
.course-placements>p strong{color:var(--ink)}
.course-placements [type=search]{width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:var(--surface);font:inherit}
.placement-selected,.placement-choices label{display:flex;align-items:center;gap:10px;cursor:pointer}
.placement-choices{max-height:min(40dvh,330px);overflow:auto;overscroll-behavior:contain;border-block:1px solid var(--line)}
.placement-choices label{padding:10px 4px;min-height:40px}
.placement-choices label+label{border-top:1px solid var(--line)}
.placement-choices span{overflow-wrap:anywhere}
.placement-choices small{margin-left:auto;color:var(--muted)}
.course-placements [type=checkbox]{flex:none;width:16px;height:16px;accent-color:var(--ink)}
.course-placements [data-more]{justify-self:start}
.course-placements [role=alert]{color:var(--error)}
.course-placements [role=alert]:empty{display:none}

body[data-workspace=true] dialog:has([data-directory-delete]){width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);background:var(--soft);border-radius:16px}
body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-header{padding:24px 24px 7px;border:0;background:var(--surface);align-items:flex-start}
body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-header h2{font-size:20px;line-height:1.35;font-weight:650}
body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-body{padding:0 24px 24px;background:var(--surface);border-radius:0 0 12px 12px}
body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-actions{position:sticky;bottom:0;padding:16px 24px 20px;border:0;background:var(--soft)}
body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-actions .btn{min-height:36px;padding:8px 16px}
body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-actions .btn.danger:disabled{opacity:.52}
[data-directory-delete]{display:grid;gap:16px}
body[data-workspace=true] [data-directory-delete] p{margin:0;font-size:14px;line-height:1.45}
[data-directory-delete] .spaces-delete-warning:empty,[data-directory-delete] [data-directory-delete-error]:empty{display:none}
.spaces-delete-contents{display:grid;gap:16px;padding:24px;border:1px solid var(--line);border-radius:16px}
.spaces-delete-contents h3{margin:0;font-size:16px;line-height:1.35;font-weight:650;overflow-wrap:anywhere}
.spaces-delete-contents ul,.spaces-delete-connections ul{display:grid;gap:5px;margin:0;padding-inline-start:20px;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.spaces-delete-connections{display:grid;gap:12px}
body[data-workspace=true] [data-directory-delete] .spaces-delete-connections>p:not([role]){font-size:16px;color:var(--ink)}
.spaces-delete-connections details{overflow:hidden;border:1px solid var(--line);border-radius:8px}
.spaces-delete-connections summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;background:var(--soft);cursor:pointer;font-size:12px;text-transform:uppercase;list-style:none}
.spaces-delete-connections summary::-webkit-details-marker{display:none}
.spaces-delete-connections summary>.icon{width:16px;height:16px;flex:none;transform:rotate(-90deg)}
.spaces-delete-connections details[open] summary>.icon{transform:none}
.spaces-delete-connections ul{max-height:min(28dvh,220px);overflow:auto;padding:14px 16px 14px 36px;border-top:1px solid var(--line)}
.spaces-delete-connections>.btn{justify-self:start}
.spaces-delete-confirmation{display:grid;gap:8px;font-size:16px}
.spaces-delete-confirmation input{min-width:0;width:100%;height:36px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit}
.spaces-delete-confirmation input:focus-visible,.spaces-delete-connections summary:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
@media(max-width:700px){
 body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-header{padding:18px 16px 7px}
 body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-body{padding:0 16px 16px}
 body[data-workspace=true] dialog:has([data-directory-delete]) .dialog-actions{padding:12px 16px}
 .spaces-delete-contents{padding:14px 16px}
}
