/* EventCentralOps v0.9.289 — targeted responsive hardening.
   Only affects platform-owned surfaces. Preserve intentional scrollrails,
   Kanban horizontal scrolling, sticky headers and the desktop layouts. */

/* Prevent a deep flex/grid child from forcing a wider mobile viewport. */
.eco-app :is(.ge-sp-main,.ge-sp-panel,.ge-sp-form-card,.ge-sp-card,.ge-pm-page-head,.ge-pm-filterbar,.ge-pm-kanban-toolbar,.eco-import-workspace,.eco-import-card,.eco-import-preview,.eco-workspace-tabs),
.eco-platform-shell :is(.eco-platform-main,.eco-platform-content,.eco-platform-card,.eco-platform-grid,.eco-platform-page-head,.eco-platform-card-head,.eco-int-hub,.eco-int-dialog-fields,.eco-domain-center-internal,.eco-domain-console-pane),
.eco-public-site :is(.eco-public-wrap,.eco-public-section,.eco-public-form,.eco-media-grid),
.eco-sales :is(.eco-pricing-grid,.eco-price-card,.eco-signup-layout,.eco-customer-setup-shell),
.eco-home-modern :is(.eco-modern-hero-copy,.eco-modern-template-carousel,.eco-modern-actions) {
  min-width: 0;
  max-width: 100%;
}

/* Long imported names, registration addresses, and client reference tokens. */
.eco-app :is(.eco-import-workspace,.eco-import-card,.ge-sp-card,.ge-pm-kanban-card),
.eco-platform-shell :is(.eco-platform-card,.eco-platform-list article,.eco-platform-table td,.eco-domain-console-pane),
.eco-public-site :is(.eco-public-form,.eco-public-detail-grid),
.eco-sales :is(.eco-price-card,.eco-purchase-intro) {
  overflow-wrap: anywhere;
}

/* Tables remain tables: offer local horizontal scroll instead of clipping
   columns, hiding actions, or pushing the entire document sideways. */
.eco-app :is(.eco-import-preview,.eco-import-review-table,.eco-table-scroll,.ge-sp-table-scroll,.ge-rbac-scroll),
.eco-platform-shell :is(.eco-platform-table-wrap,.eco-domain-console-table-wrap),
.eco-sales .eco-comparison-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.eco-app .eco-import-preview table,
.eco-app .eco-import-review-table table { min-width: 520px; }

/* Text fields never overflow their cards; mobile input sizes avoid iOS zoom. */
@media (max-width: 760px) {
  .eco-app :is(.ge-sp-form-grid,.eco-import-map-grid,.eco-import-options,.eco-import-summary) > *,
  .eco-platform-shell :is(.eco-platform-form-grid,.eco-int-dialog-fields) > *,
  .eco-sales :is(.eco-signup-layout,.eco-customer-setup-shell) > * { min-width: 0; }

  .eco-app :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea),
  .eco-platform-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea),
  .eco-public-site :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea),
  .eco-sales :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea) {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 16px;
  }

  .eco-app :is(.ge-sp-section-head,.ge-pm-page-head,.eco-import-head),
  .eco-platform-shell :is(.eco-platform-page-head,.eco-platform-card-head) {
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
  }

  .eco-app :is(.eco-workspace-tabs,.ge-sp-subnav,.ge-sp-tabs,.ge-pm-tabs),
  .eco-platform-shell :is(.eco-domain-console-tabs,.eco-int-controls) {
    max-width: 100%;
    min-width: 0;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  /* Some inherited staff styles force tables back to 100%/min-width:0,
     leaving five-column import previews unreadably squeezed. */
  .eco-app .eco-import-preview table,
  .eco-app .eco-import-review-table table { min-width: 520px !important; table-layout: auto !important; }

  body.eco-internal-platform-host .eco-platform-shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea) { font-size: 16px !important; }

  .eco-app .eco-import-map-grid :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .eco-app .eco-import-preview-head { flex-wrap: wrap; }
  .eco-app :is(.eco-import-upload-actions,.eco-import-form-actions) > * { min-width: 0; }

  .eco-app :is(.ge-sp-section-head,.ge-pm-page-head,.eco-import-head) :is(h1,h2),
  .eco-platform-shell :is(.eco-platform-page-head,.eco-platform-card-head) :is(h1,h2) {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  /* Dialog content scrolls internally and does not disappear under mobile UI. */
  .eco-app :is(.eco-event-dialog,.ge-pm-ticket-modal-card,.eco-email-dialog,.eco-task-dialog,.eco-workflow-dialog),
  .eco-platform-shell :is(.eco-int-dialog-panel,.eco-integration-dialog-shell) {
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    box-sizing: border-box;
  }
  .eco-app :is(.eco-event-dialog-body,.ge-pm-ticket-modal-body,.eco-email-dialog-body),
  .eco-platform-shell :is(.eco-int-dialog-body,.eco-integration-dialog-body) {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* Public event content: avoid embeds and media overflowing narrow sections. */
  .eco-public-site :is(img,video,iframe),
  .eco-home-modern :is(img,video,iframe) { max-width: 100%; }
  .eco-public-site :is(.eco-public-detail-grid,.eco-public-form) > * { min-width: 0; }
}

@media (max-width: 520px) {
  .eco-app .eco-import-card { padding: 15px; }
  .eco-app .eco-import-template-copy { min-width: 0; }
  .eco-app :is(.eco-import-steps,.eco-import-map-grid,.eco-import-options,.eco-import-summary) {
    grid-template-columns: minmax(0,1fr);
  }
  .eco-app .eco-import-template-actions > * { max-width: 100%; }

  .eco-platform-shell .eco-platform-list article { flex-wrap: wrap; }
  .eco-platform-shell .eco-platform-list article > div { min-width: 0; }
  .eco-platform-shell .eco-platform-list article > :last-child { max-width: 100%; }
  .eco-platform-shell .eco-domain-console-detail > div { max-width: 100%; box-sizing: border-box; }

  .eco-app :is(.ge-sp-section-head,.ge-pm-page-head) > :is(.ge-sp-action-group,.ge-pm-focused-actions),
  .eco-platform-shell .eco-platform-page-head > :is(.eco-platform-button,.eco-platform-actions) {
    min-width: 0;
    max-width: 100%;
  }
  .eco-app .eco-workspace-tabs { overflow-x: auto; }

  .eco-public-site :is(.eco-public-form,.eco-public-section) { min-width: 0; }
  /* Long brand names must wrap as words, not leave single letters behind. */
  .eco-sales .eco-sales-hero h1 {
    font-size: clamp(29px, 7.5vw, 36px);
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
  }
  .eco-sales .eco-pricing-heading h2 { overflow-wrap: break-word; }
  .eco-sales .eco-signup-form :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

@media (max-width: 360px) {
  .eco-platform-shell .eco-platform-content { padding-inline: 12px !important; }
  .eco-platform-shell .eco-platform-card { padding: 14px !important; }
  .eco-app .eco-import-steps li { gap: 8px; padding: 12px; }
  .eco-sales .eco-customer-setup-shell { padding-inline: 14px; }
}

/* Comfortable primary touch actions; deliberately exclude inline/icon-only
   table controls and drag handles, which have separate interaction rules. */
@media (hover: none) and (pointer: coarse) and (max-width: 760px) {
  .eco-platform-shell :is(.eco-platform-button,.eco-platform-menu-toggle),
  .eco-app :is(.ge-sp-primary-action,.ge-sp-secondary-action,.eco-import-form-actions button),
  .eco-public-site :is(.eco-public-primary,.eco-public-secondary),
  .eco-sales :is(.eco-price-card a,.eco-signup-form button) { min-height: 44px; }
}
