/* Mobile RFQ file picker: keep the control content-sized on real iOS devices. */
@media screen and (max-width: 768px) {
  html:has(> body.global-tech-page) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page
    .quote-form .file-upload-field {
    display: block !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  html:has(> body.global-tech-page) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page
    .quote-form .file-upload-field > .field-label {
    display: block !important;
    margin: 0 0 8px !important;
  }

  html:has(> body.global-tech-page) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page
    .quote-form .file-picker-control {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    align-items: start !important;
    align-self: start !important;
    gap: 8px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    block-size: auto !important;
    min-block-size: 0 !important;
    max-block-size: none !important;
    padding: 10px !important;
  }

  html:has(> body.global-tech-page) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page
    .quote-form .file-picker-button {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html:has(> body.global-tech-page) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page
    .quote-form .file-picker-control .file-status {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
  }

  /* EN/ZH home pages carry an older #contact rule. Match that scope so the
   * final mobile model is genuinely grid-based in iOS, not a mixed flex/grid. */
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #contact .quote-form .file-upload-field {
    display: block !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #contact .quote-form .file-picker-control {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    align-items: start !important;
    align-self: start !important;
    gap: 8px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    block-size: auto !important;
    min-block-size: 0 !important;
    max-block-size: none !important;
    padding: 10px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #contact .quote-form .file-picker-button {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #contact .quote-form .file-picker-control .file-status {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
  }
}
