/* SubAccount sites selector */
.diore-sub-account-sites-select:invalid {
  color: var(--diore-text-light);
}

.diore-sub-account-sites-select option {
  color: var(--diore-text);
}

/* SubAccount order page */
.diore-sub-account-order-products-header,
.diore-sub-account-order-products-row {
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 160px) minmax(0, 150px) minmax(0, 120px);
}

.diore-sub-account-order-actions {
  justify-content: space-between;
}

.diore-sub-account-order-actions-main {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.diore-sub-account-order-cart-button,
.diore-sub-account-order-place-button {
  white-space: nowrap;
}

.diore-sub-account-order-shipping-notice {
  margin: 16px 0 0;
  color: var(--diore-text-secondary);
  font-size: var(--diore-font-size-xs);
  line-height: 1.5;
}

/* Expand order list request modal */
.diore-sub-account-order-expand-modal {
  --diore-modal-width: 780px;
}

.diore-sub-account-order-expand-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.diore-sub-account-order-expand-label {
  margin-bottom: 12px;
}

.diore-sub-account-order-expand-article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.diore-sub-account-order-expand-article-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diore-sub-account-order-expand-article-input {
  flex: 1 1 auto;
}

.diore-sub-account-order-expand-article-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--diore-text-light);
  font-size: var(--diore-font-size-3xl);
  line-height: 1;
  cursor: pointer;
  transition: color var(--diore-transition);
}

.diore-sub-account-order-expand-article-remove:hover {
  color: var(--diore-error);
}

.diore-sub-account-order-expand-article-remove.is-placeholder {
  visibility: hidden;
}

.diore-sub-account-order-expand-add-article-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--diore-success-dark);
  font-size: var(--diore-font-size-md);
  font-weight: 600;
  cursor: pointer;
}

.diore-sub-account-order-expand-add-article-button:hover .text {
  text-decoration: underline;
}

.diore-sub-account-order-expand-add-article-button .icon {
  font-size: var(--diore-font-size-lg);
}

@media (max-width: 768px) {
  .diore-sub-account-order-products-row {
    grid-template-columns: 56px minmax(0, 1fr);
    row-gap: 8px;
  }

  .diore-sub-account-order-products-row .cell-image {
    grid-row: 1 / -1;
  }

  .diore-sub-account-order-products-row .cell-description,
  .diore-sub-account-order-products-row .cell-price,
  .diore-sub-account-order-products-row .cell-quantity,
  .diore-sub-account-order-products-row .cell-subtotal {
    grid-column: 2;
  }

  .diore-sub-account-order-products-row .cell-price {
    font-size: var(--diore-font-size-sm);
  }

  .diore-sub-account-order-products-row .cell-quantity,
  .diore-sub-account-order-products-row .cell-subtotal {
    grid-row: 3;
  }

  .diore-sub-account-order-products-row .cell-subtotal {
    justify-self: end;
  }

  /* Three buttons in two groups: stack them all instead of the default two-column grid */
  .diore-sub-account-order-actions,
  .diore-sub-account-order-actions-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-left: 0;
  }

  .diore-sub-account-order-expand-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Catalogue site cart */
.diore-catalog-site-cart {
  margin-top: 12px;
}

  .diore-catalog-site-cart-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    font-size: 14px;
    font-weight: 700;
  }

  .diore-catalog-site-cart--product-page {
    flex: 1 1 auto;
    margin-top: 0;
  }

    .diore-catalog-site-cart--product-page .diore-catalog-site-cart-button {
      padding: 14px 18px;
    }

.diore-catalog-site-cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  z-index: 1048;
}

  .diore-catalog-site-cart-modal[hidden] {
    display: none;
  }

  .diore-catalog-site-cart-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
  }

  .diore-catalog-site-cart-modal-panel {
    position: relative;
    max-width: 480px;
    margin: 80px auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  }

  .diore-catalog-site-cart-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e6e9ed;
  }

    .diore-catalog-site-cart-modal-header h2 {
      margin: 0;
      font-size: 16px;
      color: #3f4f5f;
    }

  .diore-catalog-site-cart-modal-close {
    background: transparent;
    border: 0;
    font-size: 22px;
    color: #8893a0;
    cursor: pointer;
  }

  .diore-catalog-site-cart-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 18px;
  }

  .diore-catalog-site-cart-modal-product {
    margin: 0;
    color: var(--black);
    font-weight: 600;
  }

  .diore-catalog-site-cart-modal-label {
    display: block;
    margin-bottom: 6px;
    color: #3f4f5f;
    font-weight: 600;
  }

  .diore-catalog-site-cart-modal-site,
  .diore-catalog-site-cart-modal-quantity {
    width: 100%;
    padding: 8px 10px;
    color: var(--black);
    background: #fff;
    border: 1px solid #d8dde3;
    border-radius: 3px;
  }

  .diore-catalog-site-cart-modal-quantity {
    max-width: 120px;
  }

  .diore-catalog-site-cart-modal-notice,
  .diore-catalog-site-cart-modal-empty {
    margin: 0;
    color: #526273;
    font-size: 13px;
    line-height: 1.5;
  }

  .diore-catalog-site-cart-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid #e6e9ed;
  }

  .diore-catalog-site-cart-modal-submit:disabled {
    cursor: not-allowed;
    opacity: .55;
  }

@media (max-width: 768px) {
  .diore-catalog-site-cart-modal-panel {
    margin: 24px 16px;
  }

  .diore-catalog-site-cart-modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}
