/* Dedicated social-account dialogs. Neutral Operate surface; no page-theme inheritance. */
.dialog.sm-dialog {
  box-sizing: border-box;
  width: min(540px, calc(100vw - 32px));
  max-width: 540px;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: #1b1b1b;
  background: #fff;
  border: 0;
  border-radius: 16px;
  font-family: var(--font-ui, "Schibsted Grotesk", "Noto Sans", sans-serif);
  font-size: 15px;
  line-height: 1.5;
  color-scheme: light;
}
.sm-dialog *, .sm-dialog *::before, .sm-dialog *::after { box-sizing: border-box; }
.sm-dialog [hidden] { display: none !important; }
.sm-dialog > header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  margin: 0;
  padding: 16px 72px;
  border: 0;
}
.sm-dialog > header h2 {
  margin: 0;
  color: #1b1b1b;
  font: 650 18px/1.35 var(--font-ui, "Schibsted Grotesk", "Noto Sans", sans-serif);
  letter-spacing: -.02em;
  text-align: center;
}
.sm-dialog button, .sm-dialog input { font: inherit; }
.sm-dialog label { margin: 0; font: inherit; }
.sm-dialog button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  padding: 10px 16px;
  color: #1b1b1b;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}
.sm-dialog button:hover { background: #f5f5f5; border-color: #a4a4a4; }
.sm-dialog button:active { background: #ededed; }
.sm-dialog button:disabled { opacity: .42; cursor: not-allowed; }
.sm-dialog button:disabled:hover { background: inherit; border-color: #d8d8d8; }
.sm-dialog :is(button,input,a):focus-visible { outline: 2px solid #1b1b1b; outline-offset: 3px; }
.sm-dialog ::selection { background: #dedede; color: #111; }
.sm-dialog input { accent-color: #1b1b1b; caret-color: #1b1b1b; }
.sm-dialog .studio-icon { display: block; flex: 0 0 auto; width: 20px; height: 20px; object-fit: contain; }
.sm-dialog > header :is(.sm-back,#close-dialog) {
  position: absolute;
  top: 16px;
  width: 44px;
  min-height: 44px;
  padding: 12px;
  border: 0;
  border-radius: 50%;
}
.sm-dialog > header .sm-back { left: 12px; }
.sm-dialog > header #close-dialog { right: 12px; }
.sm-body { padding: 4px 24px 24px; }
.sm-dialog h3 { margin: 0; font: 650 16px/1.4 var(--font-ui, "Schibsted Grotesk", "Noto Sans", sans-serif); letter-spacing: -.01em; }
.sm-intro p { margin: 8px 0 0; color: #626262; font-size: 15px; line-height: 1.6; }
.sm-position { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; }
.sm-position legend { padding: 0; font-size: 15px; font-weight: 600; }
.sm-position p { margin: 4px 0 12px; color: #626262; font-size: 14px; }
.sm-dialog .sm-position label { display: flex; align-items: center; gap: 14px; min-height: 48px; cursor: pointer; }
.sm-position input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; }
.sm-position:disabled label { cursor: not-allowed; opacity: .5; }
.sm-dialog .sm-visibility { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; margin-top: 16px; border-top: 1px solid #e4e4e4; }
.sm-visibility strong { display: block; font-size: 15px; font-weight: 600; }
.sm-visibility small { display: block; margin-top: 2px; color: #626262; font-size: 13px; }
.sm-dialog .sm-visibility input { flex: 0 0 auto; appearance: none; position: relative; width: 44px; height: 26px; min-height: 26px; margin: 0; padding: 0; border: 1px solid #828282; border-radius: 16px; background: #828282; cursor: pointer; }
.sm-visibility input::before { content: ""; display: block; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.sm-visibility input:checked { background: #1b1b1b; border-color: #1b1b1b; }
.sm-visibility input:checked::before { left: 21px; }
.sm-visibility input:disabled { cursor: not-allowed; opacity: .45; }
.sm-connected { padding-top: 20px; border-top: 1px solid #e4e4e4; }
.sm-connected h3 { display: flex; align-items: baseline; gap: 8px; font-size: 15px; }
.sm-connected h3 span { color: #626262; font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.sm-empty { margin: 12px 0 0; color: #626262; font-size: 14px; line-height: 1.6; }
.sm-accounts { padding: 0; margin: 12px 0 0; list-style: none; }
.sm-account { display: grid; grid-template-columns: 12px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 76px; border-bottom: 1px solid #ededed; }
.sm-account:last-child { border-bottom: 0; }
.sm-grip { display: flex; align-items: center; justify-content: center; color: #626262; cursor: grab; }
.sm-grip .studio-icon { width: 14px; height: 18px; }
.sm-dialog .sm-account-edit { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; justify-content: start; gap: 12px; min-width: 0; width: 100%; min-height: 60px; padding: 8px 4px; border: 0; background: transparent; text-align: left; }
.sm-account-edit .studio-icon { width: 24px; height: 24px; }
.sm-account-edit span { display: block; min-width: 0; }
.sm-account-edit strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.sm-account-edit small { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #626262; font-size: 12px; }
.sm-account-actions { display: flex; gap: 0; }
.sm-dialog .sm-account-actions button { width: 44px; height: 44px; padding: 12px; border: 0; background: transparent; }
.sm-account-actions .studio-icon { width: 18px; height: 18px; }
.sm-dialog .sm-account-actions button:hover:not(:disabled), .sm-dialog .sm-account-edit:hover:not(:disabled) { background: #f5f5f5; }
.sm-account.sm-drag-over { background: #ededed; box-shadow: inset 0 -2px #1b1b1b; }
.sm-footer { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; padding: 0; border: 0; }
.sm-dialog button.sm-primary { min-height: 48px; padding: 12px 20px; color: #fff; background: #1b1b1b; border: 1px solid #1b1b1b; border-radius: 24px; font-weight: 600; }
.sm-dialog button.sm-primary:hover { background: #383838; border-color: #383838; }
.sm-dialog button.sm-primary:active { background: #111; }
.sm-primary .studio-icon { filter: invert(1); }
.sm-dialog button.sm-secondary { min-height: 48px; border-radius: 24px; padding: 12px 20px; }
.sm-dialog .sm-search { display: flex; align-items: center; gap: 14px; height: 48px; margin: 4px 0 16px; padding: 0 16px; border-radius: 8px; background: #f5f5f5; }
.sm-dialog .sm-search input { min-width: 0; width: 100%; height: 48px; margin: 0; padding: 0; color: #1b1b1b; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.sm-search:focus-within { outline: 2px solid #1b1b1b; outline-offset: 2px; }
.sm-search input:focus-visible { outline: 0; }
.sm-search input::placeholder, .sm-input::placeholder { color: #626262; opacity: 1; }
.sm-platforms { max-height: min(400px,calc(100dvh - 240px)); overflow-y: auto; overscroll-behavior: contain; }
.sm-dialog .sm-platform { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 56px; margin: 0; padding: 12px 14px; border: 0; border-radius: 6px; background: #fff; text-align: left; }
.sm-platform > .studio-icon:first-child { width: 24px; height: 24px; }
.sm-platform strong { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.sm-platform small { color: #626262; font-size: 12px; white-space: nowrap; }
.sm-platform > .studio-icon:last-child { width: 16px; height: 16px; }
.sm-dialog .sm-platform:hover { background: #f5f5f5; }
.sm-no-results { padding: 24px 8px; text-align: center; }
.sm-no-results p { color: #626262; font-size: 14px; }
.sm-form { margin: 0; }
.sm-form-intro { margin: 4px 0 28px; text-align: center; }
.sm-form-intro > .studio-icon { width: 36px; height: 36px; margin: 0 auto 12px; }
.sm-form-intro h3 { font-size: 18px; }
.sm-form-intro p { margin: 8px 0 0; color: #626262; font-size: 14px; }
.sm-dialog .sm-field { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.dialog.sm-dialog .sm-input { width: 100%; min-height: 48px; margin: 0; padding: 12px; color: #1b1b1b; background: #fff; border: 1px solid #cecece; border-radius: 8px; box-shadow: none; }
.sm-input:hover { border-color: #969696; }
.dialog.sm-dialog .sm-input[aria-invalid="true"] { border-color: #ae2525; }
.dialog.sm-dialog .sm-input:disabled { background: #f5f5f5; color: #626262; cursor: not-allowed; }
.sm-hint { margin: 8px 0 0; color: #626262; font-size: 13px; }
.sm-error { margin: 8px 0 0; color: #ae2525; font-size: 14px; }
.sm-link-preview { margin-top: 24px; padding: 16px 0; border-top: 1px solid #e4e4e4; border-bottom: 1px solid #e4e4e4; }
.sm-link-preview > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.sm-link-preview a { display: block; color: #1b1b1b; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.sm-link-preview small { color: #626262; font-size: 13px; }
.sm-notice { margin: 16px 0; padding: 12px; color: #424242; background: #f5f5f5; border-radius: 8px; font-size: 13px; }
.sm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .dialog.sm-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .sm-dialog > header { min-height: 68px; padding: 14px 60px; }
  .sm-dialog > header :is(.sm-back,#close-dialog) { top: 12px; }
  .sm-dialog > header .sm-back { left: 6px; }
  .sm-dialog > header #close-dialog { right: 6px; }
  .sm-body { padding: 4px 20px 20px; }
  .sm-account { grid-template-columns: 8px minmax(0,1fr) auto; gap: 4px; }
  .sm-dialog .sm-account-edit { grid-template-columns: 20px minmax(0,1fr); gap: 8px; }
  .sm-account-edit .studio-icon { width: 20px; height: 20px; }
  .sm-platforms { max-height: calc(100dvh - 208px); }
  .sm-dialog .sm-platform { padding-inline: 8px; gap: 12px; }
  .sm-footer { gap: 8px; }
}
@media (max-width: 359px) {
  .sm-account { grid-template-columns: minmax(0,1fr) auto; }
  .sm-grip { display: none; }
  .sm-dialog .sm-account-edit { gap: 6px; }
  .sm-account-actions { flex-wrap: wrap; max-width: 88px; }
  .sm-platform small { max-width: 70px; white-space: normal; line-height: 1.2; }
}
