/* Etkin Madde v8.1 — isolated mobile layout fixes; does not affect SEO/URLs. */
html{overflow-wrap:normal}
body .site-header .header-search-wrap,
body .site-header .header-search-wrap .search-form,
.search-form,.search-suggest{max-width:100%;min-width:0}
.search-form{isolation:isolate}
.search-form input[type="search"]{flex:1 1 0;width:0;min-width:0;max-width:100%;font-size:16px!important;line-height:1.35;-webkit-text-size-adjust:100%;appearance:none;-webkit-appearance:none}
.search-form .search-icon{flex-shrink:0}
.search-form>button{flex-shrink:0}
.search-suggest{z-index:100;overscroll-behavior:contain;overflow-wrap:anywhere}
.search-suggest .suggest-item{max-width:100%;min-width:0;overflow-wrap:anywhere}
/* Long medicine codes, file names and pill labels must wrap inside their cards. */
.em63-left,.em63-right,.em63-grid,.em62-facts-grid,.medicine-card,
.em75-medicine-card,.em-pdf-viewer,.em-pdf-viewer__content{min-width:0;max-width:100%}
.em62-facts-grid strong,.medicine-card dd,.em61-fact-card strong,.em72-hero h1{
  overflow-wrap:anywhere;word-break:normal
}
.em79-article-content table,.entry-content table{max-width:100%}
@media(max-width:760px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{min-width:0}
  body .site-header .header-inner.is-home,
  body .site-header .header-inner.is-inner{
    grid-template-columns:minmax(0,1fr) 46px!important;
    grid-template-areas:"logo toggle" "search search"!important;
    width:calc(100% - 26px);max-width:100%;gap:10px 8px
  }
  body .site-header .brand,
  body .site-header .brand img{max-width:100%;min-width:0}
  body .site-header .header-search-wrap{
    grid-area:search!important;grid-column:1/-1!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0!important;padding:0!important;justify-self:stretch!important
  }
  body .site-header .header-search-wrap .search-form,
  .hero-search .search-form,.inner-search .search-form,.sidebar-card .search-form{
    width:100%;max-width:100%;min-width:0;gap:6px;
    padding:5px 5px 5px 10px
  }
  .search-form .search-icon{margin:0 1px 0 0}
  .search-form .search-icon svg{width:19px;height:19px}
  body .site-header .search-form input[type="search"],
  body .search-form input[type="search"]{font-size:16px!important;min-height:44px!important;min-width:0!important;width:0!important;flex:1 1 0!important}
  body .search-form>button{min-width:46px!important;flex:0 0 46px!important;height:44px;max-width:46px;padding:0!important}
  body .search-form>button span{display:none}
  .search-suggest{left:0;right:0;max-height:min(45vh,320px);-webkit-overflow-scrolling:touch}
  body.single-em_drug .em72-page .em63-grid{grid-template-columns:minmax(0,1fr)!important}
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer__frame{display:none!important;height:0!important;min-height:0!important;flex:none!important}
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer.is-preview-open .em-pdf-viewer__frame{
    display:block!important;height:60vh!important;min-height:360px!important;max-height:680px!important;flex:none!important
  }
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer__fallback{display:none!important}
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer.is-preview-open .em-pdf-viewer__fallback{display:block!important}
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer__actions{width:100%;min-width:0}
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer__content{height:auto!important;min-height:0!important;flex:0 0 auto!important}
  body.single-em_drug .em72-page .em63-right .em62-pdf-panel,
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer{height:auto!important;min-height:0!important;flex:0 0 auto!important}
  body.single-em_drug .em72-page .em62-facts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.single-post .em79-article-content img,body.single-post .em79-article-content iframe,
  body.single-post .em79-article-content video{max-width:100%;height:auto}
  .em79-article-content pre,.entry-content pre{max-width:100%;overflow-x:auto}
}
@media(max-width:359px){
  body.single-em_drug .em72-page .em62-facts-grid{grid-template-columns:minmax(0,1fr)}
  body .site-header .brand img{width:min(160px,100%)}
  .search-form .search-icon{display:none}
}


/* EtkinMadde PDF height regression fix V8.1.1:
 * Old V60–V63 layouts set PDF height/min-height to 760–980px and
 * flex:1/height:100% on nested wrappers. Those rules could expand the page.
 * Keep the outer page at its content height and the remote PDF scroll INSIDE
 * a bounded iframe. Scoped to drug detail pages; no SEO or data changes. */
body.single-em_drug .em72-page .em63-grid { align-items: start !important; }
body.single-em_drug .em72-page .em63-right { align-self: start !important; min-height: 0 !important; }
body.single-em_drug .em72-page .em63-right .em60-panel.em62-pdf-panel {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
  flex: 0 0 auto !important;
}
body.single-em_drug .em72-page .em63-right .em-pdf-viewer {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
}
body.single-em_drug .em72-page .em63-right .em-pdf-viewer__content {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: none !important;
  overflow: hidden !important;
}
body.single-em_drug .em72-page .em63-right .em-pdf-viewer__frame {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: min(720px, 75vh) !important;
  height: min(720px, 75dvh) !important;
  min-height: 0 !important;
  max-height: 720px !important;
  flex: 0 0 auto !important;
  border: 0 !important;
  overflow: auto !important;
  overscroll-behavior: contain;
}
@media (max-width:760px) {
  /* Mobile keeps direct official-document links; preview is opt-in
   * to avoid blank embeds in browsers lacking inline PDF support. */
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer__frame {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
  }
  body.single-em_drug .em72-page .em63-right .em-pdf-viewer.is-preview-open .em-pdf-viewer__frame {
    display: block !important;
    height: min(570px, 68vh) !important;
    height: min(570px, 68dvh) !important;
    min-height: 0 !important;
    max-height: 570px !important;
  }
}


/* V8.1.2: PDF external-open actions belong only to mobile layouts.
 * Desktop/tablet keeps the embedded, internally scrolling PDF viewer,
 * with no duplicate 'PDF'yi aç' / 'Bu sekmede aç' buttons above it.
 * Scope this only to the document panel on medicine detail pages. */
@media (min-width: 761px) {
  body.single-em_drug .em72-page .em63-right .em62-pdf-panel .em-pdf-viewer__actions,
  body.single-em_drug .em72-page .em63-right .em62-pdf-panel .em-pdf-viewer__mobile-note {
    display: none !important;
  }
}
@media (max-width: 760px) {
  body.single-em_drug .em72-page .em63-right .em62-pdf-panel .em-pdf-viewer__actions {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  }
}
