/* ==========================================================================
   ABM responsive hardening - global base
   --------------------------------------------------------------------------
   Small global guardrails kept last in the base cascade. Page-family fixes now
   live in dedicated responsive bundles loaded by the templates that need them.
   ========================================================================== */

html,
body {
  max-width: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.abm-main,
.abm-container,
.abm-shell,
.abm-shell--wide,
.abm-market-shell,
.abm-listing-page,
.abm-listing-shell,
.abm-account-page,
.abm-account-shell,
.abm-thread-shell,
.abm-inbox-shell,
.abm-admin-command,
.abm-checkout-shell {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.abm-card,
.abm-listing-card,
.abm-card-listing,
.abm-thread-card,
.abm-inbox-card,
.abm-admin-panel,
.abm-admin-module-card,
.abm-admin-table-wrap,
.abm-checkout-shell .abm-card,
.abm-pricing-card {
  min-width: 0;
  max-width: 100%;
}

.table-responsive,
.abm-table-wrap,
.abm-admin-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.abm-btn,
.abm-header-cta,
.abm-navbtn,
.abm-thread-btn,
.abm-inbox-btn,
.abm-admin-btn,
.abm-listing-conversion-cta {
  max-width: 100%;
}

.abm-chip,
.abm-listing-chip,
.abm-inbox-chip,
.abm-admin-pill,
.abm-thread-priority-pill,
.abm-market-tag,
.abm-market-slide-chip {
  max-width: 100%;
}

/* Navigation / base */
.abm-header,
.abm-header-panel,
.abm-header-main,
.abm-header-actions,
.abm-search,
.abm-search-form,
.abm-nav-wrap,
.abm-header-nav,
.abm-nav-main,
.abm-account-menu-inline,
.abm-proads-dock-inner,
.abm-proads-dock-link {
  min-width: 0;
  max-width: 100%;
}

.abm-brand-copy,
.abm-proads-dock-copy,
.abm-weather-place,
.abm-events-mini-card,
.abm-events-mini-card > * {
  min-width: 0;
}

.abm-brand-title,
.abm-proads-dock-copy,
.abm-weather-city,
.abm-weather-status,
.abm-events-mini-title {
  overflow-wrap: anywhere;
}

.abm-search-form {
  display: block;
  position: relative;
}

.abm-search-input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
}

.abm-search-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding-inline: 0;
  transform: translateY(-50%);
}

.abm-search-btn:hover {
  transform: translateY(-50%);
}

/* Shared shell/fleet primitives stay global because many legacy tools use them. */
.abm-shell .abm-hero-grid,
.abm-shell .abm-layout,
.abm-shell .abm-grid,
.abm-shell .abm-vessel-row,
.abm-shell .abm-tab-card,
.abm-shell .tab-content,
.abm-shell .tab-pane,
.abm-shell .abm-mobile-sticky {
  min-width: 0;
  max-width: 100%;
}

.abm-shell .abm-tabs-head {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 991.98px) {
  .abm-header-panel {
    overflow: clip;
  }

  .abm-header-actions,
  .abm-search-form,
  .abm-proads-dock-link {
    min-width: 0;
  }

  .abm-nav-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .abm-navbtn,
  .abm-account-inline-link,
  .abm-account-logout-btn {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 767.98px) {
  .abm-header-panel {
    border-radius: 20px;
  }

  .abm-header-actions {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .abm-header-cta,
  .abm-search-btn {
    white-space: normal;
  }

  .abm-search-form {
    align-items: stretch;
  }

  .abm-search-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding-inline: 0;
  }

  .abm-shell .abm-vessel-row,
  .abm-shell .abm-hero-grid,
  .abm-shell .abm-layout {
    grid-template-columns: 1fr !important;
  }

  .abm-shell .nav.abm-bs-tabs {
    width: max-content;
    min-width: 100%;
    flex-wrap: nowrap;
  }

  .abm-shell .abm-table {
    min-width: 640px !important;
  }
}

@media (max-width: 560px) {
  .abm-container {
    padding-inline: 12px;
  }

  .abm-header-main {
    gap: 10px;
  }

  .abm-brand-title {
    font-size: 1.02rem;
    line-height: 1.02;
  }

  .abm-nav-main {
    grid-template-columns: 1fr;
  }

  .abm-chip {
    white-space: normal;
    line-height: 1.25;
  }
}

@media (max-width: 420px) {
  .abm-container {
    padding-inline: 10px;
  }

  .abm-header-panel {
    border-radius: 18px;
  }

  .abm-search-form {
    gap: 6px;
  }

  .abm-search-btn {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .abm-shell .abm-table {
    min-width: 600px !important;
  }
}

/* Mobile header and consent hardening for beta-quality workflows. */
@media (max-width:767.98px){
  .abm-header-panel{margin:6px 0 0;padding:8px 10px;border-radius:18px}
  .abm-header-main{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:0;border-bottom:0}
  .abm-brand{grid-column:1;grid-row:1;min-height:40px;gap:.5rem}
  .abm-brand-logo{width:38px;height:38px;max-height:38px}
  .abm-brand-title{max-width:154px;font-size:.94rem;line-height:1}
  .abm-search{grid-column:1/-1;grid-row:2}
  .abm-search-input{min-height:40px;font-size:.86rem}
  .abm-search-btn{width:36px;min-width:36px;height:36px;min-height:36px}
  .abm-header-actions{grid-column:2;grid-row:1;width:auto;display:flex;gap:6px}
  .abm-header-cta{width:40px;min-width:40px;min-height:40px;padding:0;border-radius:14px}
  .abm-header-cta span:not(.abm-header-cta-icon){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .abm-language-shell{min-width:48px;min-height:40px;padding-inline:7px;border-radius:14px}
  .abm-language-flag{min-width:0;max-width:38px;overflow:hidden;font-size:.72rem}
  .abm-language-chevron,.abm-proads-dock-sub,.abm-proads-dock-cta{display:none}
  .abm-header-menu-toggle{min-width:42px;min-height:40px;padding-inline:9px;border-radius:14px}
  .abm-header-menu-toggle span{font-size:0}.abm-header-menu-toggle span::before{content:"Menu";font-size:.74rem}
  .abm-proads-dock{padding-top:6px}
  .abm-proads-dock-inner{min-height:36px;padding:0 34px 0 10px;border-radius:16px}
  .abm-proads-dock-link{min-height:36px;gap:8px}
  .abm-proads-dock-mark{min-height:22px;padding:0 8px;font-size:.56rem}.abm-proads-dock-copy{font-size:.72rem}
  .abm-proads-dock-close{width:24px;height:24px;right:7px;border-radius:8px}
}
@media (max-width:420px){
  .abm-brand-title{max-width:120px}.abm-header-actions{gap:5px}
  .abm-header-cta,.abm-language-shell,.abm-header-menu-toggle{min-height:38px}
}
.abm-consent-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.abm-consent-btn:focus-visible,.abm-consent-link:focus-visible,.abm-consent-option input:focus-visible{outline:3px solid rgba(245,179,1,.55);outline-offset:3px}
@media (max-width:640px){
  .abm-consent-banner{left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));max-height:min(22vh,160px);overflow-y:auto;padding:9px 10px;border-radius:16px}
  .abm-consent-copy{width:100%;flex-basis:auto;font-size:.76rem;line-height:1.28}
  .abm-consent-options{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .abm-consent-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .abm-consent-btn{min-width:0;min-height:40px;padding-inline:8px;font-size:.72rem}
}
@media (max-width:420px){.abm-consent-options{grid-template-columns:repeat(2,minmax(0,1fr))}.abm-consent-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
