/* Page families measured in the live Shopify admin. Shared controls stay in style.css. */
.theme-library {
  padding-top: 24px;
}
.theme-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  gap: 8px;
  margin-bottom: 16px;
}
.theme-library-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
}
.theme-library .theme-row {
  padding: 20px;
}
.theme-library .version-head {
  margin-bottom: 0;
}
.theme-library .theme-row:hover {
  background: var(--tc-surface);
}
.theme-library .theme-row-title {
  gap: 16px;
  flex-wrap: nowrap;
}
.theme-row-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.theme-library .theme-row-title h3 {
  font-size: 14px;
  line-height: 20px;
}
.theme-library .theme-thumbnail {
  flex-basis: 92px;
  width: 92px;
  height: 74px;
  border-radius: 6px;
}
.license-layout {
  display: grid;
  grid-template-columns: minmax(480px, 638px) minmax(240px, 312px);
  align-items: start;
  gap: 16px;
}
.license-layout > *,
.license-main,
.license-support {
  min-width: 0;
}
.license-layout .grid-form {
  gap: 16px;
}
.license-layout .form-actions {
  flex-wrap: wrap;
}
.license-main > .panel:last-child,
.license-support > .panel:last-child {
  margin-bottom: 0;
}
.license-layout .panel p:last-child {
  margin-bottom: 0;
}
.license-layout form > small {
  display: block;
  margin-top: 8px;
}
:is(.settings-content, .theme-layout, .license-layout) :is(small, small.muted) {
  font-size: 12px;
  line-height: 16px;
}
.license-customer,
.license-summary dd {
  overflow-wrap: anywhere;
}
.license-summary {
  display: grid;
  gap: 12px;
  margin: 0;
}
.license-summary dt {
  color: var(--tc-muted);
}
.license-summary dd {
  margin: 2px 0 0;
}
.page-heading-main.license-heading {
  display: flex;
  flex: 1 1 0%;
  align-items: center;
  flex-wrap: wrap;
  min-height: 28px;
  max-width: 100%;
  gap: 8px;
}
.license-heading-title {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.license-heading h1 {
  display: block;
  min-width: 0;
  min-height: 24px;
  margin-left: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.license-back,
.license-link {
  border: 0;
  background: transparent;
  color: var(--tc-text);
  text-align: left;
}
.license-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  min-height: 28px;
  margin-left: -4px;
  padding: 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
  line-height: 16px;
}
.license-back svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
.license-heading-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 2px -3px 0;
  color: var(--tc-muted);
}
.license-heading-separator svg {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  color: #8a8a8a;
}
.license-back:hover {
  background: #ebebeb;
}
.license-back:active {
  background: #e3e3e3;
}
.license-link {
  display: block;
  max-width: 100%;
  padding: 0;
  font-size: inherit;
  line-height: 16px;
}
.license-link > span {
  font-weight: 550;
}
.license-link small {
  display: block;
  margin-top: 0;
  font-size: inherit;
  font-weight: 450;
}
.license-link:hover > span {
  text-decoration: underline;
}
.license-back:focus-visible,
.license-link:focus-visible {
  outline: 2px solid var(--tc-focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.license-index table {
  min-width: 680px;
}
.license-index td {
  height: 52px;
}
.license-index tbody tr + tr td {
  height: 53px;
}
.license-index td:first-child {
  width: 32%;
}
.license-index td:last-child {
  width: 120px;
}
.compact-index {
  border-collapse: separate;
  border-spacing: 0;
}
.table-wrap.compact-desktop > table > thead {
  position: relative;
  z-index: 1;
}
.compact-index td {
  height: 32px;
}
.compact-index tbody tr + tr td {
  height: 33px;
}
.compact-index td > small {
  margin-top: 0;
}
.compact-index td > .error-text {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 16px;
}
.compact-list {
  display: none;
}
.table-panel > .table-description {
  padding: 12px 16px;
}
.shell--settings {
  grid-template-columns: minmax(0, 1fr);
}
.workspace--settings {
  container-name: settings-workspace;
  grid-column: 1 / -1;
  width: calc(100% - 1px);
  padding: 24px 32px 48px;
  overflow-y: scroll;
  scrollbar-gutter: auto;
  border-radius: 12px 12px 0 0;
}
.settings-layout {
  /* The page's 748px basis includes its two 16px content insets. */
  display: flex;
  align-items: start;
  gap: 9px;
  max-width: 1045px;
  min-width: 0;
  margin: 0 auto;
}
.settings-sidebar {
  flex: 0 1 288px;
  width: 288px;
  min-width: 240px;
  position: static;
  overflow: hidden;
  border-radius: 12px;
  background: var(--tc-surface);
  box-shadow: var(--tc-card-shadow);
}
.settings-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 69px;
  padding: 12px;
  border-bottom: 1px solid var(--tc-border);
  background: #f3f3f3;
}
.settings-identity strong {
  display: block;
  margin: 4px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 16px;
}
.settings-identity > div > span {
  display: block;
  color: var(--tc-muted);
}
.settings-nav {
  gap: 4px;
  padding: 12px;
}
.settings-nav button {
  min-height: 28px;
  padding: 4px;
}
.settings-nav button.active {
  background: #f3f3f3;
  color: #4a4a4a;
  font-weight: 550;
}
.settings-nav button:not(:disabled):hover {
  background: #f1f1f1;
}
.settings-nav button:not(:disabled):active {
  background: #ebebeb;
}
.settings-content {
  container: settings-page / inline-size;
  flex: 0 1 748px;
  width: 748px;
  max-width: calc(100% - 288px);
  min-width: 0;
  padding: 0;
}
.settings-mobile-header {
  display: none;
}
.settings-content .page-heading {
  min-height: 28px;
  margin: 8px 16px 12px;
}
.settings-content > .panel {
  margin-inline: 16px;
}
.settings-content .panel {
  padding: 16px;
  border-radius: 12px;
}
.settings-content .table-panel {
  padding: 0;
}
.settings-content .settings-card {
  padding: 0;
  overflow: hidden;
}
.settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}
.settings-card-heading {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding-block: 4px;
}
.settings-card-heading h2,
.settings-card-heading p,
.settings-card-body > p:last-child,
.settings-card-footer > p {
  margin: 0;
}
.settings-card-body {
  min-width: 0;
  padding: 0 16px 16px;
}
.settings-card-body .inline-form {
  margin-top: 0;
}
.settings-card-body .form-actions {
  flex-wrap: wrap;
}
.settings-card-body > .form-actions:first-child {
  margin-top: 0;
}
.settings-card-body .form-actions > small {
  min-width: 0;
  flex: 1 1 220px;
  overflow-wrap: anywhere;
}
.settings-card-body .shopify-status {
  margin-top: 0;
}
.settings-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--tc-border);
  background: #f3f3f3;
}
@container settings-page (width <= 490px) {
  .settings-card-body .form-actions > small {
    flex-basis: auto;
  }
}
.settings-content .shopify-guide h2 {
  margin-top: 0;
}
.settings-close {
  position: fixed;
  z-index: 25;
  top: 68px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: #e3e3e3;
  color: #616161;
}
.workspace--settings::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.workspace--settings::-webkit-scrollbar-thumb {
  border-width: 3px;
}
@media (max-width: 900px) and (min-width: 768px) {
  .settings-sidebar {
    flex-basis: 240px;
    width: 240px;
  }
  .settings-content {
    max-width: calc(100% - 240px);
  }
}
@container admin-page (width < 784px) {
  .license-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@container admin-page (width <= 490px) {
  .theme-library-heading {
    margin-left: 20px;
  }
}
@media (min-width: 768px) {
  .license-heading-title {
    flex: 1 1 0%;
    max-width: max-content;
  }
}
@container settings-page (width <= 490px) {
  .settings-content > .panel {
    margin-inline: 0;
  }
  .page-heading h1 {
    gap: 4px;
  }
}
@media (max-width: 767.98px) {
  .settings-card-body .form-actions > small {
    flex-basis: auto;
  }
  .workspace--settings {
    padding: 0 0 28px;
  }
  .settings-layout {
    display: block;
    max-width: none;
  }
  .settings-sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
  .workspace--settings:not(.settings-navigation-visible) .settings-sidebar,
  .settings-navigation-visible .settings-content,
  .settings-navigation-visible .settings-back,
  .workspace--settings:not(.settings-navigation-visible) .settings-mobile-title {
    display: none;
  }
  .settings-content {
    width: 100%;
    max-width: 748px;
    padding-top: 8px;
  }
  .settings-nav button {
    min-height: 28px;
    font-size: 13px;
  }
  .settings-mobile-header {
    position: sticky;
    z-index: 24;
    top: 0;
    display: flex;
    align-items: center;
    height: 52px;
    margin-bottom: -8px;
    background: var(--tc-bg);
  }
  .settings-mobile-title {
    margin: 0;
    padding: 0 44px;
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
  }
  .settings-back {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 46px;
    padding: 12px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--tc-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
  }
  .settings-back svg {
    width: 20px;
    height: 20px;
    color: #1a1a1a;
  }
  .settings-back-label {
    display: block;
    font-size: 20px;
    line-height: 20px;
  }
  .settings-back-label > span {
    font-size: 13px;
  }
  .settings-back:focus-visible {
    outline: 2px solid var(--tc-focus);
    outline-offset: -2px;
  }
  .settings-close {
    right: 16px;
    width: 28px;
    height: 28px;
  }
  .license-back {
    width: 24px;
    height: 24px;
    min-height: 24px;
    margin-left: 0;
    margin-right: 4px;
    background: #e3e3e3;
  }
  .license-back svg {
    flex-basis: 15px;
    width: 15px;
    height: 15px;
  }
  .license-back:hover {
    background: #d4d4d4;
  }
  .license-back:active {
    background: #ccc;
    box-shadow: 0 2px 1px rgb(26 26 26 / .2) inset, 1px 0 1px #1a1a1a1f inset, -1px 0 1px #1a1a1a1f inset;
  }
}
/* Themes has its own viewport: above 768px the main navigation occupies 240px. */
@media (max-width: 1007.96px) and (pointer: coarse) {
  .theme-library .theme-index {
    border-radius: 0;
    box-shadow: none;
  }
  .theme-library,
  .theme-library .theme-row-meta {
    font-size: 16px;
    line-height: 24px;
  }
  .theme-library .theme-row-title h3 {
    font-size: 16px;
    line-height: 20px;
  }
  .theme-library small {
    font-size: 14px;
    line-height: 20px;
  }
  .theme-library .badge {
    min-height: 24px;
    font-size: 14px;
    line-height: 20px;
  }
}
/* Keep library buttons in the same touch viewport as the embedded Themes page. */
@media (min-width: 768px) and (max-width: 1007.96px) and (pointer: coarse) {
  .theme-library .button {
    min-height: 44px;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 20px;
  }
  .theme-library .button:active:not(:disabled):not(.auth-submit) {
    padding-block: 12px;
  }
  .theme-library .button.secondary,
  .theme-library .button.secondary:is(:hover, :focus-visible):not(:disabled) {
    background: #fff;
    color: #303030;
    box-shadow: 0 0 0 1px #e3e3e3 inset;
  }
  .theme-library .button.secondary:active:not(:disabled) {
    background: #f7f7f7;
    box-shadow: none;
  }
  .theme-library .button.secondary:disabled {
    background: #0000000d;
    color: #b5b5b5;
    box-shadow: none;
  }
  .theme-library input[type=checkbox],
  .theme-library .asset-checkbox,
  .theme-library .asset-checkmark {
    flex-basis: 20px;
    width: 20px;
    min-height: 20px;
    height: 20px;
  }
  .theme-library .asset-checkmark path {
    d: path("M2.625 6.5L4.31197 8.74929C4.40826 8.87769 4.59887 8.88338 4.70266 8.76097L9.375 3.25");
    transform: translate(2px, 2px);
    stroke-width: 1.5;
  }
  .theme-library input[type=checkbox]:not(:checked):not(:indeterminate):not(:disabled):not(:hover) {
    background-color: #fff;
  }
  .theme-library input[type=checkbox]:is(:checked, :indeterminate):not(:disabled) {
    box-shadow: 0 0 0 .66px #303030 inset;
  }
}
/* The main admin uses its full viewport for touch typography. */
@media (max-width: 767.98px) and (pointer: coarse) {
  .settings-nav button {
    min-height: 32px;
    font-size: 16px;
    line-height: 24px;
  }
  .sidebar .nav button,
  .sidebar-buyer-link {
    min-height: 40px;
    font-size: 16px;
    line-height: 24px;
  }
  :is(.settings-content, .theme-layout, .license-layout) {
    font-size: 16px;
    line-height: 24px;
  }
  :is(.settings-content, .theme-layout, .license-layout) :is(.muted, .form-help) {
    font-size: inherit;
    line-height: inherit;
  }
  :is(.settings-content, .theme-layout, .license-layout) :is(h2, h3) {
    font-size: 16px;
    line-height: 20px;
  }
  :is(.settings-content, .theme-layout, .license-layout) :is(small, small.muted) {
    font-size: 14px;
    line-height: 20px;
  }
  .settings-back,
  .settings-back-label {
    line-height: 24px;
  }
  .settings-back-label > span {
    font-size: 16px;
  }
  .license-link {
    font-size: 14px;
    line-height: 20px;
  }
  .license-link > span {
    font-weight: 600;
  }
  .license-link small {
    margin: 1px 0 0;
    font-size: 12px;
    line-height: 16px;
  }
  .compact-desktop {
    display: none;
  }
  .compact-list {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
    line-height: 24px;
  }
  .compact-list > li {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    padding: 12px 16px;
    background: var(--tc-surface);
    font-size: inherit;
    line-height: inherit;
  }
  .compact-list > li + li {
    border-top: 1px solid var(--tc-border);
  }
  .compact-list-content,
  .compact-list-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    gap: 6px;
    overflow-wrap: anywhere;
  }
  .compact-list-header {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .compact-list-titles {
    display: flex;
    align-items: start;
    gap: 4px;
  }
  .compact-list-kicker,
  .compact-list-primary small {
    color: var(--tc-muted);
    font-size: 12px;
    font-weight: 450;
    line-height: 16px;
  }
  .compact-list-primary {
    min-width: 0;
    flex: 1 1 0%;
    font-weight: 600;
  }
  .compact-list-secondary {
    flex-shrink: 0;
    font-weight: 600;
  }
  .compact-list-primary > div {
    display: flex;
    flex-direction: column;
  }
  .compact-list-primary small {
    order: -1;
    margin-bottom: 1px;
  }
  .compact-list-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
  }
  .compact-list .error-text {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
  }
  .compact-list small.error-text {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 20px;
  }
  .compact-list p {
    margin: 6px 0 0;
  }
  .table-panel > .table-description {
    font-size: 16px;
    line-height: 24px;
  }
}
@media (forced-colors: active) {
  .settings-sidebar {
    border: 1px solid CanvasText;
  }
  .settings-nav button.active {
    outline: 1px solid Highlight;
  }
}
