/* Special-request dialog only: no shared shop, search or eBay selectors. */
.product-request-dialog .request-photo-status {
  display: block;
  margin-top: .4rem;
  overflow-wrap: anywhere;
}
.product-request-dialog .request-submit-status {
  flex-basis: 100%;
  font-size: .9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.product-request-dialog .request-submit-status.is-error { color: #a32626; }
.product-request-dialog .request-submit-status[hidden],
.product-request-dialog .request-photo-status[hidden] { display: none; }
.product-request-dialog .add-enquiry-basket-btn[aria-disabled="true"] { opacity: .7; }

/* Also cover phones held in landscape without changing desktop dialogs. */
@media (max-width: 700px), (max-height: 600px) and (pointer: coarse) {
  html.g2-request-dialog-open { overflow: hidden; }
  .product-request-dialog {
    --g2-request-fallback-height: 100vh;
    position: fixed;
    top: calc(var(--g2-request-viewport-top, 0px) + 6px);
    bottom: auto;
    left: 6px;
    right: 6px;
    margin: 0;
    width: calc(100% - 12px);
    max-width: none;
    height: calc(var(--g2-request-viewport-height, var(--g2-request-fallback-height)) - 12px);
    max-height: calc(var(--g2-request-viewport-height, var(--g2-request-fallback-height)) - 12px);
    box-sizing: border-box;
    overflow: hidden;
  }
  @supports (height: 100dvh) {
    .product-request-dialog { --g2-request-fallback-height: 100dvh; }
  }
  .product-request-dialog .product-request-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  .product-request-dialog .product-request-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: .85rem;
    padding-top: max(.85rem, env(safe-area-inset-top, 0px));
    scroll-padding: .85rem;
  }
  .product-request-dialog .product-request-actions {
    /* Outside the scrolling fields, so the submit control cannot scroll away. */
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin: 0;
    padding: .65rem .85rem;
    padding-bottom: calc(.65rem + env(safe-area-inset-bottom, 0px));
    background: #fff;
    box-shadow: 0 -3px 9px rgba(0, 0, 0, .08);
  }
  .product-request-dialog .product-request-actions button {
    width: 100%;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: .65rem .7rem;
    white-space: normal;
    line-height: 1.2;
    touch-action: manipulation;
  }
  .product-request-dialog .product-request-actions .add-enquiry-basket-btn {
    order: 1;
    min-height: 48px;
    font-size: 1rem;
  }
  .product-request-dialog .product-request-actions .product-request-close {
    order: 2;
    font-size: .9rem;
  }
  .product-request-dialog .request-submit-status { flex-basis: auto; order: 0; }
  .product-request-dialog .product-request-head .product-request-close {
    flex: 0 0 44px;
    min-width: 44px;
    height: 44px;
    touch-action: manipulation;
  }
  .product-request-dialog .product-request-form input,
  .product-request-dialog .product-request-form textarea { font-size: 16px; }
  .product-request-dialog .product-request-two-col { grid-template-columns: 1fr; }
  .product-request-dialog .request-photo-options { grid-template-columns: 1fr; }
  .product-request-dialog .request-photo-camera { display: flex; }
  .product-request-dialog .request-photo-choice {
    min-width: 0;
    padding: .65rem;
    border: 1px solid #c8ced3;
    border-radius: 6px;
    background: #f7f8f8;
  }
  .product-request-dialog .request-photo-camera { background: #fff4b8; border-color: #d2a900; }
}
