@import url('./chat-space-settings.css');

/* Circle's space settings fill the cabinet or a viewport-sized member dialog.
   Scope every override so chat settings keep their independent presentation. */
.learning-space-settings-surface{--lss-surface:var(--surface,#fff);--lss-ink:var(--ink,#191b1f);--lss-muted:var(--muted,#5f6470);--lss-line:var(--line,#e3e5e8);--lss-subtle:var(--soft,var(--surface-subtle,#f7f8f9));color:var(--lss-ink);font:400 15px/1.5 var(--font-ui,system-ui,sans-serif);box-sizing:border-box}
.learning-space-settings-surface *{box-sizing:border-box}
dialog.learning-space-settings-dialog,#learner-dialog.learning-space-settings-dialog{position:fixed;inset:16px;margin:0;width:calc(100vw - 32px);max-width:none;height:calc(100dvh - 32px);max-height:none;padding:0;border:1px solid var(--lss-line);border-radius:16px;overflow:hidden;background:var(--lss-surface)}
.learning-space-settings-dialog::backdrop{background:#191b1f66}
.learning-space-settings-dialog>.dialog-header{display:none!important}
.learning-space-settings-dialog>.dialog-body{height:100%;max-height:none!important;display:flex;flex-direction:column;padding:0!important;overflow:hidden}
.learning-space-settings-inline.chat-settings-dialog{display:flex;flex-direction:column;width:100%;max-width:none;height:100%;min-height:0;max-height:none;padding:0;border:0;border-radius:0;background:var(--lss-surface);box-shadow:none;overflow:hidden}
.learning-space-settings-surface .learning-space-settings-header{display:flex;align-items:center;gap:28px;flex:none;min-height:72px;padding:16px 24px;border-bottom:1px solid var(--lss-line);background:var(--lss-surface)}
.learning-space-settings-surface .learning-space-settings-header h2,#learner-dialog.learning-space-settings-dialog .learning-space-settings-header h2{flex:0 1 260px;min-width:100px;margin:0;padding:0;font:600 18px/1.4 var(--font-ui,system-ui,sans-serif);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.learning-space-settings-surface .chat-settings-tabs{flex:1;display:flex;gap:4px;min-width:0;padding:0;border:0;scrollbar-width:thin}
.learning-space-settings-surface .chat-settings-tabs button{font-size:14px;font-weight:500;border-radius:8px;padding:8px 12px;line-height:20px;transition:background .15s ease,color .15s ease}
.learning-space-settings-surface .chat-settings-tabs button[aria-selected=true]{background:var(--lss-subtle);border-color:transparent;color:var(--lss-ink)}
.learning-space-settings-surface .chat-settings-tabs button:disabled{opacity:.4;cursor:not-allowed}
.learning-space-settings-surface .learning-space-settings-close{display:grid;place-items:center;width:32px;height:32px;flex:none;border:0;border-radius:7px;color:var(--lss-ink);background:transparent;cursor:pointer}
.learning-space-settings-surface .learning-space-settings-close:hover{background:var(--lss-subtle)}
.learning-space-settings-surface .learning-space-settings-close svg{width:20px;height:20px}
.learning-space-settings-surface [data-space-settings-form]{display:flex;flex:1;min-height:0;margin:0;padding:0;overflow:hidden}
.learning-space-settings-surface fieldset{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;padding:0;margin:0;border:0;overflow:hidden}
.learning-space-settings-surface .chat-settings-content{display:flex;flex-direction:column;flex:1;min-height:0;gap:24px;padding:40px 24px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;animation:none}
.learning-space-settings-surface .chat-settings-content>*{width:100%;max-width:768px;flex:none;margin-inline:auto}
.learning-space-settings-surface .chat-settings-content.is-members>*{max-width:1024px}
.learning-space-settings-surface .chat-settings-card{display:grid;gap:28px;padding:24px;border:1px solid var(--lss-line);border-radius:16px;background:var(--lss-surface);box-shadow:0 1px 2px #00000008}
.learning-space-settings-surface .chat-settings-card h3,.learning-space-settings-surface .chat-settings-members h3{margin:0;font-size:16px;line-height:24px;font-weight:600;letter-spacing:0}
.learning-space-settings-surface .chat-settings-card p{margin:0;font-size:14px;line-height:1.5;color:var(--lss-muted)}
.learning-space-settings-surface .chat-settings-field{gap:8px;font-size:14px;line-height:22px}
.learning-space-settings-surface .chat-settings-field>span:first-child{font-weight:400}
.learning-space-settings-surface .learning-space-field-row{display:grid;grid-template-columns:180px minmax(0,1fr);align-items:center;gap:16px}
.learning-space-settings-surface input:not([type=checkbox]):not([type=radio]),.learning-space-settings-surface textarea,.learning-space-settings-surface select{padding:9px 12px;border:1px solid var(--lss-line);border-radius:8px;color:var(--lss-ink);background:var(--lss-surface);font:400 14px/20px var(--font-ui,system-ui,sans-serif);box-shadow:0 1px 2px #00000008;min-width:0;width:100%;transition:border-color .15s ease,box-shadow .15s ease}
.learning-space-settings-surface input:focus-visible,.learning-space-settings-surface textarea:focus-visible,.learning-space-settings-surface select:focus-visible{outline:0;border-color:var(--lss-muted);box-shadow:0 0 0 3px #8a909b24}
.learning-space-settings-surface .chat-settings-name{border-radius:8px;box-shadow:0 1px 2px #00000008}
.learning-space-settings-surface .chat-settings-name>button{height:38px;width:44px}
.learning-space-settings-surface .chat-settings-name input{padding:9px 10px}
.learning-space-settings-surface .chat-settings-name .space-icon-shape,.learning-space-settings-surface .chat-settings-name>button svg{height:18px;width:18px}
.learning-space-settings-surface .chat-settings-toggle{font-size:14px;gap:24px;line-height:22px}
.learning-space-settings-surface .chat-settings-toggle strong{font-weight:400}
.learning-space-settings-surface .chat-settings-toggle small{font-size:14px}
.learning-space-settings-surface .chat-settings-switch{width:36px;height:20px}
.learning-space-settings-surface .chat-settings-switch:after{width:16px;height:16px}
.learning-space-settings-surface .chat-settings-toggle input{width:36px;height:20px}
.learning-space-settings-surface .chat-settings-toggle input:checked+.chat-settings-switch{background:var(--lss-ink)}
.learning-space-settings-surface .chat-settings-access-options{gap:24px}
.learning-space-settings-surface .chat-settings-access{display:flex;gap:12px;padding:0;background:transparent;border:0;border-radius:0;cursor:pointer}
.learning-space-settings-surface .chat-settings-access:hover,.learning-space-settings-surface .chat-settings-access.is-selected{background:transparent;border:0}
.learning-space-settings-surface .chat-settings-access>input{width:16px;height:16px;margin:3px 0 0;accent-color:var(--lss-ink)}
.learning-space-settings-surface .chat-settings-access>span:first-of-type{display:grid;gap:14px;min-width:0;padding:0;flex:1}
.learning-space-settings-surface .chat-settings-access strong{font-weight:500;font-size:15px;line-height:22px}
.learning-space-settings-surface .learning-space-access-rule{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:21px;color:var(--lss-muted)}
.learning-space-settings-surface .learning-space-access-rule svg{width:16px;height:16px;flex:none;margin-top:2px}
.learning-space-settings-surface .learning-space-access-rule b{font-weight:500;color:var(--lss-ink)}
.learning-space-settings-surface .learning-space-publish-intro{display:grid;gap:8px}
.learning-space-settings-surface .learning-space-publish-intro h4{margin:0;font-size:18px;line-height:26px;font-weight:600}
.learning-space-settings-surface .learning-space-draft-notice{display:flex;gap:12px;padding:18px;border:0;border-radius:14px;background:#eff6ff;color:#191b1f;font-size:14px;line-height:22px}
.learning-space-settings-surface .learning-space-draft-notice>.icon{width:18px;height:18px;flex:none;margin-top:2px;color:#1e40af}
.learning-space-settings-surface .learning-space-draft-notice p{margin:0;color:inherit}
.learning-space-settings-surface .learning-space-draft-rule{display:flex;gap:10px;align-items:flex-start;margin-top:12px!important}
.learning-space-settings-surface .learning-space-draft-rule svg{width:16px;height:16px;flex:none;margin-top:2px}
.learning-space-settings-surface .learning-space-draft-rule b{font-weight:500}
.learning-space-settings-surface .learning-space-layouts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.learning-space-settings-surface .learning-space-layout{position:relative;display:grid;gap:12px;padding:16px;border:1px solid var(--lss-line);border-radius:10px;background:var(--lss-surface);cursor:pointer;transition:background .15s,border-color .15s}
.learning-space-settings-surface .learning-space-layout:hover{background:var(--lss-subtle)}
.learning-space-settings-surface .learning-space-layout.is-selected{border-color:var(--lss-ink);background:var(--lss-subtle)}
.learning-space-settings-surface .learning-space-layout:has(input:focus-visible){outline:3px solid #89909a66;outline-offset:3px}
.learning-space-settings-surface .learning-space-layout input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.learning-space-settings-surface .learning-space-layout strong{font-size:14px;font-weight:500;text-align:center}
.learning-space-settings-surface .learning-space-layout-preview{display:grid;place-items:center;height:100px;background:transparent;color:var(--lss-muted)}
.learning-space-settings-surface .learning-space-layout-preview svg{height:100%;max-width:100%}
.learning-space-settings-surface .learning-space-topics{position:relative;display:grid;gap:12px}
.learning-space-settings-surface .learning-space-topic-input{display:flex;align-items:center;gap:12px;border:1px solid var(--lss-line);border-radius:8px;padding-right:12px;box-shadow:0 1px 2px #00000008}
.learning-space-settings-surface .learning-space-topic-input:focus-within{border-color:var(--lss-muted);box-shadow:0 0 0 3px #8a909b24}
.learning-space-settings-surface .learning-space-topic-input textarea{resize:none;min-height:38px;height:38px;border:0;box-shadow:none;outline:0;overflow:auto}
.learning-space-settings-surface .learning-space-topic-input textarea:focus{box-shadow:none}
.learning-space-settings-surface .learning-space-topic-input svg{height:16px;width:16px;flex:none;color:var(--lss-muted)}
.learning-space-settings-surface .learning-space-topic-menu{position:absolute;z-index:3;top:46px;left:0;right:0;max-height:220px;overflow:auto;padding:4px;border:1px solid var(--lss-line);border-radius:10px;background:var(--lss-surface);box-shadow:0 8px 24px #0002}
.learning-space-settings-surface .learning-space-topic-menu[hidden]{display:none}
.learning-space-settings-surface .learning-space-topic-menu button{display:block;width:100%;text-align:left;padding:9px 12px;border:0;border-radius:7px;background:none;color:var(--lss-ink);font:inherit;cursor:pointer}
.learning-space-settings-surface .learning-space-topic-menu button:hover{background:var(--lss-subtle)}
.learning-space-settings-surface .learning-space-topic-chips{display:flex;flex-wrap:wrap;gap:8px}
.learning-space-settings-surface .learning-space-topic-chips:empty{display:none}
.learning-space-settings-surface .learning-space-topic-chips>span{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:3px 8px;background:var(--lss-subtle);border:1px solid var(--lss-line);border-radius:7px;font-size:13px;overflow-wrap:anywhere}
.learning-space-settings-surface .learning-space-topic-chips button{border:0;padding:0;display:grid;place-items:center;background:transparent;color:var(--lss-muted);cursor:pointer}
.learning-space-settings-surface .learning-space-topic-chips svg{width:14px;height:14px}
.learning-space-settings-surface .learning-space-topics small,.learning-space-settings-surface .learning-space-image-field small{font-size:13px;color:var(--lss-muted);line-height:20px}
.learning-space-settings-surface .learning-space-image-field{display:grid;gap:12px;font-size:14px}
.learning-space-settings-surface .learning-space-image-label{font-weight:400}
.learning-space-settings-surface .learning-space-upload{display:flex;align-items:center;justify-content:center;gap:10px;min-height:96px;padding:20px;border:1px dashed var(--lss-line);border-radius:9px;background:var(--lss-surface);color:var(--lss-muted);font:400 14px/20px var(--font-ui,system-ui,sans-serif);cursor:pointer;transition:border-color .15s,background .15s}
.learning-space-settings-surface .learning-space-upload:hover{background:var(--lss-subtle);border-color:var(--lss-muted)}
.learning-space-settings-surface .learning-space-upload svg{height:20px;width:20px}
.learning-space-settings-surface .learning-space-image-preview>img{width:100%;max-height:220px;object-fit:cover;border-radius:9px;border:1px solid var(--lss-line)}
.learning-space-settings-surface .learning-space-image-actions{display:flex;gap:10px}
.learning-space-settings-surface .learning-space-notification{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:22px;cursor:pointer}
.learning-space-settings-surface .learning-space-notification input{appearance:none;width:16px;height:16px;flex:none;margin:3px 0 0;border:1px solid var(--lss-line);border-radius:4px;background:var(--lss-surface);cursor:pointer}
.learning-space-settings-surface .learning-space-notification input:checked{background:var(--lss-ink);border-color:var(--lss-ink)}
.learning-space-settings-surface .learning-space-notification input:checked:after{content:'';display:block;width:8px;height:5px;border-left:2px solid var(--lss-surface);border-bottom:2px solid var(--lss-surface);transform:translate(3px,3px) rotate(-45deg)}
.learning-space-settings-surface .learning-space-notification input:focus-visible{outline:3px solid #89909a66;outline-offset:3px}
.learning-space-settings-surface .learning-space-notification strong{display:block;font-weight:400}
.learning-space-settings-surface .learning-space-notification small{display:block;margin-top:4px;font-size:14px;line-height:22px;color:var(--lss-muted)}
.learning-space-settings-surface .learning-space-notification.is-disabled{opacity:.5;cursor:not-allowed}
.learning-space-settings-surface .learning-space-notification input:disabled{cursor:not-allowed}
.learning-space-settings-surface .chat-settings-footer{flex:none;display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid var(--lss-line);background:var(--lss-subtle)}
.learning-space-settings-surface .chat-settings-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;font:500 14px/20px var(--font-ui,system-ui,sans-serif);border-radius:8px;padding:9px 14px;min-height:40px}
.learning-space-settings-surface .chat-settings-button:disabled{opacity:.4;cursor:default}
.learning-space-settings-surface .chat-settings-error{font-size:14px;line-height:22px;color:#b71c1c;margin:0 auto}
.learning-space-settings-surface .chat-settings-members{gap:24px}
.learning-space-settings-surface .chat-settings-members-header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.learning-space-settings-surface .chat-settings-members-header h3{display:flex;gap:10px;align-items:center}
.learning-space-settings-surface .chat-settings-members-header h3>span{padding:0 6px;border:1px solid var(--lss-line);border-radius:6px;font-size:13px;font-weight:400;color:var(--lss-muted)}
.learning-space-settings-surface .learning-space-member-actions{display:flex;gap:8px}
.learning-space-settings-surface .learning-space-search-button{padding:9px;width:40px}
.learning-space-settings-surface .learning-space-search-button svg{width:18px;height:18px}
.learning-space-settings-surface .chat-settings-search{width:100%;max-width:360px}
.learning-space-settings-surface .learning-space-add-members{display:grid;gap:16px;padding:20px;border:1px solid var(--lss-line);border-radius:12px;background:var(--lss-subtle)}
.learning-space-settings-surface .learning-space-add-members>.chat-settings-button{justify-self:end}
.learning-space-settings-surface .chat-settings-invite-notify{display:flex;align-items:center;gap:8px;margin:0;font-size:14px}
.learning-space-settings-surface .chat-settings-invite-notify input{accent-color:var(--lss-ink)}
.learning-space-settings-surface .chat-settings-table-wrap{overflow:auto;border-radius:8px}
.learning-space-settings-surface .chat-settings-table-wrap table{min-width:640px}
.learning-space-settings-surface .chat-settings-members th{font-size:14px;padding:12px 16px}
.learning-space-settings-surface .chat-settings-members td{font-size:14px;padding:14px 16px}
.learning-space-settings-surface .learning-space-member-name{display:flex;align-items:center;gap:12px}
.learning-space-settings-surface .learning-space-member-name strong{font-weight:500}
.learning-space-settings-surface .learning-space-member-avatar{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:50%;background:var(--lss-subtle);border:1px solid var(--lss-line);font-size:14px}
.learning-space-settings-surface .learning-space-member-remove{display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--lss-muted);cursor:pointer}
.learning-space-settings-surface .learning-space-member-remove:hover{background:var(--lss-subtle);color:#b71c1c}
.learning-space-settings-surface .learning-space-member-remove svg{width:16px;height:16px}
.learning-space-settings-confirm{width:min(420px,calc(100vw - 32px));padding:24px;border:1px solid var(--line,#e3e5e8);border-radius:14px;color:var(--ink,#191b1f);background:var(--surface,#fff);font:400 14px/22px var(--font-ui,system-ui,sans-serif)}
.learning-space-settings-confirm::backdrop{background:#191b1f66}
.learning-space-settings-confirm h2{font-size:18px;line-height:26px;margin:0 0 12px}
.learning-space-settings-confirm p{color:var(--muted,#5f6470)}
.learning-space-settings-confirm footer{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:24px}
[data-appearance=dark] .learning-space-settings-surface .learning-space-draft-notice{background:#182d45;color:#bfdbfe}
[data-appearance=dark] .learning-space-settings-surface .learning-space-draft-notice>.icon{color:#bfdbfe}
@media(max-width:960px){.learning-space-settings-surface .learning-space-settings-header{gap:16px;flex-wrap:wrap}.learning-space-settings-surface .learning-space-settings-header h2{flex:1;min-width:0}.learning-space-settings-surface .learning-space-settings-close{order:1}.learning-space-settings-surface .chat-settings-tabs{order:2;flex-basis:100%}}
@media(max-width:600px){dialog.learning-space-settings-dialog,#learner-dialog.learning-space-settings-dialog{inset:8px;width:calc(100vw - 16px);height:calc(100dvh - 16px);border-radius:12px}.learning-space-settings-surface .learning-space-settings-header{padding:12px 16px;gap:12px}.learning-space-settings-surface .chat-settings-tabs{margin-inline:-4px}.learning-space-settings-surface .chat-settings-tabs button{padding:8px 10px;font-size:13px}.learning-space-settings-surface .chat-settings-content{padding:24px 16px;gap:16px;scrollbar-gutter:auto}.learning-space-settings-surface .chat-settings-card{padding:20px 16px;gap:24px;border-radius:12px}.learning-space-settings-surface .learning-space-field-row{grid-template-columns:1fr;gap:8px}.learning-space-settings-surface .learning-space-layouts{gap:8px}.learning-space-settings-surface .learning-space-layout{padding:10px 6px}.learning-space-settings-surface .learning-space-layout-preview{height:64px}.learning-space-settings-surface .learning-space-layout strong{font-size:12px}.learning-space-settings-surface .chat-settings-footer{padding:12px 16px}.learning-space-settings-surface .chat-settings-footer .chat-settings-button{padding-inline:12px}.learning-space-settings-surface .chat-settings-members-header{align-items:stretch;flex-direction:column}.learning-space-settings-surface .learning-space-member-actions{justify-content:flex-end}.learning-space-settings-surface .learning-space-draft-notice{padding:14px;gap:8px}}
@media(prefers-reduced-motion:reduce){.learning-space-settings-surface *{transition:none!important;animation:none!important}}
.learning-space-settings-surface .learning-space-layouts.is-events{grid-template-columns:repeat(2,minmax(0,1fr))}
.learning-space-settings-surface .is-compact .learning-space-layout{display:flex;align-items:center;justify-content:center;gap:10px;padding:18px}
.learning-space-settings-surface .is-compact .learning-space-layout>svg{width:20px;height:20px}

.learning-space-settings-surface .learning-space-draft-notice strong{display:block;font-weight:600;margin-bottom:6px}
.learning-space-settings-surface .learning-space-banner-fields{display:flex;flex:none;gap:24px;overflow:visible}
.learning-space-settings-surface .learning-space-banner-fields:disabled{opacity:.5}
.learning-space-settings-surface .learning-space-banner-reset{display:grid;gap:12px}
.learning-space-settings-surface .learning-space-banner-reset .chat-settings-button{justify-self:start}
.learning-space-settings-surface .learning-space-banner-description{display:grid;gap:8px;font-size:14px}
.learning-space-settings-surface [data-space-banner-document]{padding:16px 30px;min-height:148px;border:1px solid var(--lss-line);border-radius:8px;background:var(--lss-surface);overflow-wrap:anywhere}
.learning-space-settings-surface [data-space-banner-document]:focus-within{border-color:var(--lss-muted);box-shadow:0 0 0 3px #8a909b24}
.learning-space-settings-surface [data-space-banner-document] .studio-rich-text{font-size:14px;line-height:22px}
.learning-space-settings-surface .learning-space-banner-media>.learning-space-image-preview>img,.learning-space-settings-surface .learning-space-banner-media>video{display:block;width:100%;max-height:260px;aspect-ratio:16/6;object-fit:contain;border:1px solid var(--lss-line);border-radius:9px;background:var(--lss-subtle)}
.learning-space-settings-surface [data-space-banner-file][hidden]{display:none}

.learning-space-member-avatar img,.community-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
