/* Catalog: products and services */
.dolo-catalog-index,
.dolo-catalog-detail,
.dolo-catalog-form-workspace,
.dolo-catalog-form {
  display: grid;
  min-width: 0;
  gap: 1rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.dolo-catalog-index__frame {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.dolo-catalog-index__header,
.dolo-catalog-detail__hero,
.dolo-catalog-detail__section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dolo-catalog-index__header {
  flex-wrap: wrap;
}

.dolo-catalog-index__header .dolo-button {
  width: 100%;
}

.dolo-catalog-index__header > div,
.dolo-catalog-detail__hero > div,
.dolo-catalog-detail__section-heading > div {
  min-width: 0;
}

.dolo-catalog-index__workspace,
.dolo-catalog-form__section,
.dolo-catalog-detail__section,
.dolo-catalog-detail__danger {
  min-width: 0;
  overflow: hidden;
}

.dolo-catalog-index__workspace {
  container: catalog-index / inline-size;
  overflow: visible;
  padding: 0;
}

.dolo-catalog-index__count {
  flex: 0 0 auto;
  border: 1px solid var(--dolo-border);
  border-radius: 999px;
  background: var(--dolo-surface-sunken);
  padding: 0.35rem 0.65rem;
  color: var(--dolo-text-soft);
  font-size: 0.68rem;
  font-weight: 750;
}

.dolo-catalog-index__item-link {
  color: inherit;
  text-decoration: none;
}

.dolo-catalog-index__row-action {
  width: 9.75rem;
  overflow: visible !important;
  text-align: end;
}

.dolo-catalog-index__actions {
  width: 100%;
}

.dolo-catalog-items-index__table {
  min-width: 58rem;
}

.dolo-catalog-items-index__table col[data-column="item"] {
  width: 24%;
}

.dolo-catalog-items-index__table col[data-column="type"] {
  width: 11%;
}

.dolo-catalog-items-index__table col[data-column="sku"] {
  width: 10%;
}

.dolo-catalog-items-index__table col[data-column="price"] {
  width: 14%;
}

.dolo-catalog-items-index__table col[data-column="inventory"] {
  width: 12%;
}

.dolo-catalog-items-index__table col[data-column="status"] {
  width: 13%;
}

.dolo-catalog-items-index__table col[data-column="actions"] {
  width: 16%;
}

.dolo-catalog-items-index__table[data-inventory-enabled="false"] col[data-column="item"] {
  width: 28%;
}

.dolo-catalog-items-index__table[data-inventory-enabled="false"] col[data-column="type"],
.dolo-catalog-items-index__table[data-inventory-enabled="false"] col[data-column="sku"] {
  width: 13%;
}

.dolo-catalog-items-index__table[data-inventory-enabled="false"] col[data-column="price"],
.dolo-catalog-items-index__table[data-inventory-enabled="false"] col[data-column="status"] {
  width: 14%;
}

.dolo-catalog-items-index__table[data-inventory-enabled="false"] col[data-column="actions"] {
  width: 16%;
}

.dolo-catalog-index__empty {
  margin: 1rem;
}

.dolo-catalog-index__workspace.dolo-pos-products-index__workspace {
  container: pos-products-index / inline-size;
  gap: 0;
  overflow: visible;
  padding: 0;
}

.dolo-pos-products-index__workspace .dolo-index-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.dolo-pos-products-index .dolo-catalog-index__header {
  flex-wrap: wrap;
}

.dolo-pos-products-index .dolo-catalog-index__header .dolo-button {
  width: 100%;
}

.dolo-pos-products-index__workspace .dolo-catalog-index__result-summary {
  border-bottom: 1px solid var(--dolo-divider);
  border-radius: 0;
  padding-inline: 1rem;
}

.dolo-pos-products-index__workspace .dolo-catalog-index__pagination {
  display: flex;
  justify-content: center;
  padding: 1rem;
  border-top: 1px solid var(--dolo-divider);
}

.dolo-pos-products-index__empty {
  margin: 1rem;
}

.dolo-pos-products-index__workspace .dolo-catalog-index__row-action {
  width: auto;
}

.dolo-pos-products-index__table {
  min-width: 52rem;
}

.dolo-pos-products-index__table col[data-column="product"] {
  width: 29%;
}

.dolo-pos-products-index__table col[data-column="sku"] {
  width: 17%;
}

.dolo-pos-products-index__table col[data-column="register"] {
  width: 11%;
}

.dolo-pos-products-index__table col[data-column="price"] {
  width: 12%;
}

.dolo-pos-products-index__table col[data-column="status"] {
  width: 16%;
}

.dolo-pos-products-index__table col[data-column="actions"] {
  width: 15%;
}

.dolo-pos-products-index__table[data-inventory-enabled="true"] col[data-column="product"] {
  width: 24%;
}

.dolo-pos-products-index__table[data-inventory-enabled="true"] col[data-column="sku"] {
  width: 15%;
}

.dolo-pos-products-index__table[data-inventory-enabled="true"] col[data-column="register"] {
  width: 9%;
}

.dolo-pos-products-index__table[data-inventory-enabled="true"] col[data-column="price"],
.dolo-pos-products-index__table[data-inventory-enabled="true"] col[data-column="inventory"] {
  width: 11%;
}

.dolo-pos-products-index__table[data-inventory-enabled="true"] col[data-column="status"],
.dolo-pos-products-index__table[data-inventory-enabled="true"] col[data-column="actions"] {
  width: 15%;
}

@media (min-width: 42rem) {
  .dolo-catalog-index__header .dolo-button,
  .dolo-pos-products-index .dolo-catalog-index__header .dolo-button {
    width: auto;
  }
}

.dolo-catalog-form__section {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.dolo-catalog-form__section-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.dolo-catalog-form__section-heading > span {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: var(--dolo-brand-soft);
  color: var(--dolo-brand);
  place-items: center;
}

.dolo-catalog-form__section-heading h2,
.dolo-catalog-form__section-heading p {
  margin: 0;
}

.dolo-catalog-form__section-heading h2 {
  color: var(--dolo-text);
  font-family: var(--dolo-font-display);
  font-size: 0.92rem;
}

.dolo-catalog-form__section-heading p {
  margin-top: 0.2rem;
  color: var(--dolo-text-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.dolo-catalog-form__grid {
  display: grid;
  min-width: 0;
  align-items: start;
  gap: 0.9rem;
}

.dolo-catalog-form__dependent[hidden] {
  display: none;
}

.dolo-pos-product-form {
  container: pos-product-form / inline-size;
}

.dolo-pos-product-form__layout,
.dolo-pos-product-form__primary,
.dolo-pos-product-form__secondary {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 1rem;
}

.dolo-pos-product-form__inventory-boundary {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  border-radius: var(--dolo-radius-control);
  background: var(--dolo-surface-sunken);
  padding: 0.8rem;
  color: var(--dolo-text-soft);
}

.dolo-pos-product-form__inventory-boundary > span {
  color: var(--dolo-action-quiet);
}

.dolo-pos-product-form__inventory-boundary strong,
.dolo-pos-product-form__inventory-boundary p {
  margin: 0;
}

.dolo-pos-product-form__inventory-boundary strong {
  color: var(--dolo-text);
  font-size: 0.72rem;
}

.dolo-pos-product-form__inventory-boundary p {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  line-height: 1.5;
}

@container pos-product-form (min-width: 62rem) {
  .dolo-pos-product-form__layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 0.8fr);
  }

  .dolo-pos-product-form__secondary .dolo-catalog-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.dolo-catalog-detail__hero {
  flex-direction: column;
}

.dolo-catalog-detail__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dolo-catalog-detail__actions {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 0.5rem;
}

.dolo-catalog-detail__actions > * {
  flex: 1 1 auto;
  justify-content: center;
}

.dolo-catalog-detail__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--dolo-border);
  border-radius: var(--dolo-radius-card);
  background: var(--dolo-surface-raised);
}

.dolo-catalog-detail__summary > div {
  min-width: 0;
  padding: 0.8rem;
  border-inline-end: 1px solid var(--dolo-border);
  border-block-end: 1px solid var(--dolo-border);
}

.dolo-catalog-detail__summary > div:nth-child(2n) {
  border-inline-end: 0;
}

.dolo-catalog-detail__summary dt,
.dolo-catalog-detail__facts dt,
.dolo-catalog-detail__channel-list dt {
  color: var(--dolo-text-muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dolo-catalog-detail__summary dd,
.dolo-catalog-detail__facts dd,
.dolo-catalog-detail__channel-list dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
  color: var(--dolo-text);
  font-size: 0.78rem;
  font-weight: 750;
}

.dolo-catalog-detail__layout,
.dolo-catalog-detail__main,
.dolo-catalog-detail__rail {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.dolo-catalog-detail__section,
.dolo-catalog-detail__danger {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.dolo-catalog-detail__facts,
.dolo-catalog-detail__channel-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  gap: 0.85rem;
}

.dolo-catalog-detail__channel-list {
  grid-template-columns: 1fr;
}

.dolo-catalog-detail__channel-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--dolo-divider);
  padding-bottom: 0.6rem;
}

.dolo-catalog-detail__channel-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dolo-catalog-detail__movement-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dolo-catalog-detail__movement-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 0.75rem;
  border-bottom: 1px solid var(--dolo-divider);
  padding: 0.7rem 0;
  color: var(--dolo-text);
  font-size: 0.72rem;
}

.dolo-catalog-detail__movement-list li:first-child {
  padding-top: 0;
}

.dolo-catalog-detail__movement-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dolo-catalog-detail__movement-list li div {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.dolo-catalog-detail__movement-list li span {
  overflow: hidden;
  color: var(--dolo-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dolo-catalog-detail__movement-list [data-tone="success"] {
  color: var(--dolo-success);
}

.dolo-catalog-detail__movement-list [data-tone="danger"] {
  color: var(--dolo-danger);
}

.dolo-catalog-detail__danger {
  border-color: color-mix(in srgb, var(--dolo-danger) 42%, var(--dolo-border));
}

.dolo-catalog-detail__danger h2,
.dolo-catalog-detail__danger p {
  margin: 0;
}

.dolo-catalog-detail__danger h2 {
  color: var(--dolo-danger);
  font-family: var(--dolo-font-display);
  font-size: 0.88rem;
}

.dolo-catalog-detail__danger p {
  color: var(--dolo-text-muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

@media (min-width: 48rem) {
  .dolo-catalog-form__section,
  .dolo-catalog-detail__section,
  .dolo-catalog-detail__danger {
    padding: 1.2rem;
  }

  .dolo-catalog-detail__stock-table-wrap {
    display: block;
  }

  .dolo-catalog-detail__stock-cards {
    display: none;
  }

  .dolo-catalog-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dolo-catalog-form__wide {
    grid-column: 1 / -1;
  }

  .dolo-catalog-detail__hero {
    flex-direction: row;
  }

  .dolo-catalog-detail__actions {
    width: auto;
  }

  .dolo-catalog-detail__actions > * {
    flex: 0 0 auto;
  }

  .dolo-catalog-detail__summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dolo-catalog-detail__summary > div {
    border-block-end: 0;
  }

  .dolo-catalog-detail__summary > div:nth-child(2n) {
    border-inline-end: 1px solid var(--dolo-border);
  }

  .dolo-catalog-detail__summary > div:last-child {
    border-inline-end: 0;
  }
}

@container catalog-index (min-width: 56rem) {
  .dolo-catalog-index__table-wrap {
    display: block;
  }

  .dolo-catalog-index__cards {
    display: none;
  }
}

@media (min-width: 64rem) {
  .dolo-catalog-detail__layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(17rem, 0.7fr);
    align-items: start;
  }

  .dolo-catalog-detail__rail {
    position: sticky;
    top: 5.5rem;
  }
}

/* The application rail can leave a desktop viewport too narrow for this table. */
.dolo-pos-products-index__workspace .dolo-catalog-index__table-wrap {
  display: none;
}

.dolo-pos-products-index__workspace .dolo-catalog-index__cards {
  display: grid;
}

@container pos-products-index (min-width: 56rem) {
  .dolo-pos-products-index__workspace .dolo-catalog-index__table-wrap {
    display: block;
  }

  .dolo-pos-products-index__workspace .dolo-catalog-index__cards {
    display: none;
  }
}

@media (forced-colors: active) {
  .dolo-catalog-index__count,
  .dolo-catalog-detail__summary {
    border: 1px solid CanvasText;
  }
}
