/* MSW satellite layout: scoped to the observed Portal42 and OnePress themes. */
/* Embedded maps use a 600px HTML width; let them fit the article column. */
body.wp-theme-onepress .entry-content iframe {
  max-width: 100% !important;
}

/* A long native select must not set the minimum width of the whole form. */
body.wp-theme-msw-portal-42 .mswpc38-form,
body.wp-theme-msw-portal-42 .mswpc38-form label {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
body.wp-theme-msw-portal-42 .mswpc38-form :is(input:not([type="checkbox"]), select, textarea, .mswpc38-double) {
  min-width: 0;
}
body.wp-theme-msw-portal-42 .mswpc38-form .mswpc38-double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 768px) {
  body.wp-theme-msw-portal-42 .mswpc38-form .mswpc38-double {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  /* OnePress: allow the title to wrap beside a stable 44px menu target. */
  body.wp-theme-onepress #masthead > .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    column-gap: 12px;
    min-height: 76px;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: normal;
  }
  body.wp-theme-onepress #masthead > .container::before,
  body.wp-theme-onepress #masthead > .container::after {
    content: none;
  }
  body.wp-theme-onepress #masthead .site-branding {
    float: none;
    min-width: 0;
    max-width: 100%;
  }
  body.wp-theme-onepress #masthead .site-brand-inner.no-logo-img.has-desc {
    line-height: normal;
  }
  body.wp-theme-onepress #masthead .site-branding .site-title {
    display: block;
    position: static;
    max-width: 100%;
    margin: 0;
    line-height: 1.2;
  }
  body.wp-theme-onepress #masthead .site-title .site-text-logo {
    display: block;
    max-width: 100%;
    font-size: clamp(18px, 4.8vw, 23px);
    line-height: 1.2;
    letter-spacing: .02em;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.wp-theme-onepress #masthead .site-branding .site-description {
    position: static;
    top: auto;
    margin: 6px 0 0;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.wp-theme-onepress #masthead .header-right-wrapper {
    float: none;
    min-width: 0;
    line-height: 1;
  }
  body.wp-theme-onepress #masthead #nav-toggle {
    display: block;
    float: none;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    line-height: 44px;
  }
  body.wp-theme-onepress #masthead #nav-toggle span {
    right: 10px;
  }
  body.wp-theme-onepress #masthead #nav-toggle:focus-visible {
    outline: 3px solid #075f91;
    outline-offset: 2px;
  }
  body.wp-theme-onepress #masthead .onepress-menu.onepress-menu-mobile {
    top: 100%;
    max-height: 65vh;
    max-height: 65dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 900px) {
  /* Premium portal: its flex brand label was allowed to push Menu off screen. */
  body.wp-theme-msw-portal-42 .mswp-header-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
  }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-brand {
    min-width: 0;
    max-width: 100%;
    gap: 9px;
  }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-monogram {
    flex: 0 0 48px;
    width: 48px;
  }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-brand-label {
    min-width: 0;
  }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-brand-label strong,
  body.wp-theme-msw-portal-42 .mswp-header .mswp-brand-label small {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    white-space: nowrap;
    margin: 0;
  }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-nav {
    grid-column: 1 / -1;
    min-width: 0;
    max-height: 65vh;
    max-height: 65dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.wp-theme-msw-portal-42 .mswp-hero .mswp-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.wp-theme-msw-portal-42 .mswp-hero .mswp-hero-grid > div {
    min-width: 0;
  }
  body.wp-theme-msw-portal-42 .mswp-hero :is(h1, .mswp-intro, .mswp-eyebrow) {
    overflow-wrap: anywhere;
  }
}


/* Keep long portal navigation inside the available desktop column. */
body.wp-theme-msw-portal-42 .mswp-header .mswp-brand-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
body.wp-theme-msw-portal-42 .mswp-header .mswp-monogram { flex-shrink: 0; }
body.wp-theme-msw-portal-42 .mswp-header .mswp-nav { min-width: 0; }
body.wp-theme-msw-portal-42 .mswp-header .mswp-navlinks { flex-wrap: wrap; }
body.wp-theme-msw-portal-42 .mswp-header .mswp-navlinks li { min-width: 0; max-width: 100%; }
body.wp-theme-msw-portal-42 .mswp-header .mswp-nav a {
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.wp-theme-msw-portal-42 .mswp-hero-grid > * { min-width: 0; }
body.wp-theme-msw-portal-42 .mswp-hero :is(h1, .mswp-intro, .mswp-eyebrow) { overflow-wrap: anywhere; }
body.wp-theme-msw-portal-42 :is(.mswp-btn, .mswp-searchline button, .mswpc38-submit) { min-height: 44px; }
body.wp-theme-msw-portal-42 .mswpc38-form label.mswpc38-privacy {
  display: block;
  line-height: 1.5;
}
body.wp-theme-msw-portal-42 .mswpc38-form label.mswpc38-privacy > input[type="checkbox"] {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
@media (min-width: 901px) {
  body.wp-theme-msw-portal-42 .mswp-header-layout {
    display: grid;
    grid-template-columns: minmax(190px, 300px) minmax(0, 1fr) auto;
    gap: 16px;
    padding-block: 12px;
  }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-brand { min-width: 0; max-width: 100%; }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-nav {
    max-height: 280px;
    max-height: min(280px, 40dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  body.wp-theme-msw-portal-42 .mswp-header .mswp-navlinks { gap: 4px 12px; }
  body.wp-theme-msw-portal-42 .mswp-header .sub-menu {
    list-style: none;
    margin: 0;
    padding-left: 14px;
  }
}
@media (max-width: 900px) {
  body.wp-theme-msw-portal-42 .mswp-header .mswp-nav {
    max-height: min(65vh, calc(100vh - 120px - var(--msw-layout-reserve, 0px)));
    max-height: min(65dvh, calc(var(--msw-layout-vh, 100dvh) - 120px - var(--msw-layout-reserve, 0px)));
    scroll-padding-block: 8px;
  }
  body.wp-theme-msw-portal-42 .mswpc38-form :is(input:not([type="checkbox"]), select, textarea) { font-size: 16px; min-height: 44px; }
}
@media (max-width: 767px) {
  body.wp-theme-onepress #masthead .onepress-menu.onepress-menu-mobile {
    max-height: min(65vh, calc(100vh - 120px - var(--msw-layout-reserve, 0px)));
    max-height: min(65dvh, calc(var(--msw-layout-vh, 100dvh) - 120px - var(--msw-layout-reserve, 0px)));
    scroll-padding-block: 8px;
  }
  body.wp-theme-onepress #masthead .onepress-menu.onepress-menu-mobile a { min-height: 44px; }
}

/* e-DEWELOPERSKI: observed header targets, tool filters and mobile menu. */
body.edev-brand-site :is(.edv-menu-toggle, .edv-nav-pro, .edv-ref-btn, .edv-ref-live-cta > a, .edev-theme-toggle, .edev-theme-logo) { min-height: 44px; }
body.edev-brand-site :is(.edv-ref-nav-links a, .edev-theme-header nav > a) { min-width: 44px; min-height: 44px; justify-content: center; }
body.edev-brand-site :is(.edv-ref-search, .edev-shell-search) { height: auto; min-height: 50px; box-sizing: border-box; }
body.edev-brand-site :is(.edv-ref-search, .edev-shell-search) button { min-height: 44px; min-width: 44px; flex: 0 0 44px; }
body.edev-brand-site :is(.edv-ref-search, .edev-shell-search) input { height: auto; min-height: 44px; min-width: 0; }
body.edev-brand-site .edv-ref-nav-inner { height: auto; min-height: 64px; padding-block: 6px; }
body.edev-brand-site .edv-ref-nav-links { min-width: 0; flex-wrap: wrap; gap: 4px 10px; white-space: normal; }
body.edev-brand-site main button { min-height: 44px !important; min-width: 44px; }
@media (min-width: 1171px) {
 body.edev-brand-site:not(.home) .edev-theme-header nav { flex-wrap: wrap; gap: 4px 12px; }
}
@media (max-width: 1170px) {
 body.edev-brand-site .edv-ref-nav-inner { flex-wrap: wrap; }
 body.edev-brand-site .edv-menu-toggle { display: inline-flex; align-items: center; margin-left: auto; }
 body.edev-brand-site .edv-ref-nav-links { display: none; order: 4; width: 100%; flex-direction: column; align-items: stretch; margin-left: 0; }
 body.edev-brand-site .edv-ref-nav-links.edv-nav-open { display: flex; }
 body.edev-brand-site .edv-ref-nav-links a { display: flex !important; justify-content: flex-start; padding: 10px 12px; }
 body.edev-brand-site :is(.edv-ref-nav-links, .edev-theme-header nav) { max-height: min(60vh, calc(100vh - 180px - var(--msw-layout-reserve, 0px))); max-height: min(60dvh, calc(var(--msw-layout-vh, 100dvh) - 180px - var(--msw-layout-reserve, 0px))); overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 8px; }
}
@media (max-width: 767px) {
 body.edev-brand-site :is(.edv-ref-search, .edev-shell-search) input { font-size: 16px; }
}

/* Long words and non-breaking spaces must stay inside Portal42 articles. */
body.wp-theme-msw-portal-42 .mswp-reading { overflow-wrap: anywhere; }

/* Match the inner-page header's stronger rules and complete the cart target sizes. */
body.edev-brand-site .edev-theme-toggle,
body.edev-brand-site .edev-theme-header nav > a,
body.edev-brand-site .edev-theme-header nav form button { min-height: 44px !important; min-width: 44px; }
body.edev-brand-site .edev-theme-header nav form { min-height: 50px; height: auto; }
body.edev-brand-site #msw-cart-drawer a.msw-cart-fallback { display: flex; align-items: center; justify-content: center; min-height: 44px; }
