/* Responsive overrides for the fixed-width legacy layout (style.css).
   Loaded after style.css on every front-end page. Desktop (> 960px) is untouched. */

html { -webkit-text-size-adjust: 100%; }
img, video, iframe, embed { max-width: 100%; }
img { height: auto; }

@media (max-width: 960px) {
  body { overflow-x: hidden; }
  #container, #container_author, #contentContainerFull, #contentInner {
    min-width: 0 !important; width: 100% !important; max-width: 100% !important;
  }
  /* header: logo image is a background, keep it inside the screen */
  #headerContainer { background-size: auto 80px !important; height: auto !important; min-height: 49px; }
  #issn { position: static !important; float: none !important; margin: 4px auto 0 auto; }
  /* menu wraps instead of overflowing */
  #topnav, #navbar { width: 100% !important; }
  #navbar ul { display: flex; flex-wrap: wrap; padding: 0; margin: 0; }
  #navbar ul li { float: none !important; }
  /* two-column body becomes one column: content first, sidebar below */
  #contentInner { display: flex; flex-direction: column; }
  #contentBLeft { order: 1; }
  #contentARight { order: 2; }
  #contentBLeft, #contentBLeft2, #contentBleft3, #contentARight {
    float: none !important; width: auto !important; max-width: 100% !important;
    margin: 0 !important; padding: 10px !important; box-sizing: border-box;
  }
  #contentARight img { width: auto; max-width: 100%; }
  /* fixed-width blocks from style.css */
  .journals2, .articleitem, .articleitem2, #article-propertise, .journalshortinfo, #journals,
  .bcontents, #volumes, .arclist, #archives, #contactinfo, #contactleft2, #contactright2,
  #adminlogin, #indexinglist, .mainjournalinfo, .journalberifinfo, #forminfo3, .ft-wrapper {
    width: auto !important; max-width: 100% !important; float: none !important; box-sizing: border-box;
  }
  /* tables used for layout stack vertically; data tables scroll */
  #contentBLeft > table, .bcontents > table, #contactinfo table { width: 100% !important; }
  #contentBLeft > table > tbody > tr > td, #contentBLeft > table > tr > td,
  .bcontents > table > tbody > tr > td { display: block; width: auto !important; }
  table { max-width: 100% !important; }
  td, th, p, li, span, a { word-wrap: break-word; overflow-wrap: anywhere; }
  /* forms */
  #contactinfo #form1 .inputfield, #contactinfo #form1 .textfield,
  #contactinfo #form1 .inputfield input, #contactinfo #form1 .textfield textarea,
  #forminfo3 .inputfield, #forminfo3 .inputfield input, #forminfo3 textarea, #forminfo3 select {
    width: 100% !important; float: none !important; box-sizing: border-box;
  }
  input[type=text], input[type=email], input[type=password], select, textarea { max-width: 100%; box-sizing: border-box; }
  label { float: none !important; display: block; width: auto !important; }
  marquee { width: 100% !important; }
  #footer { width: 100% !important; box-sizing: border-box; padding-left: 10px; padding-right: 10px; }
  #footer ul li { float: none; display: inline-block; }
  #page-leftnav { position: static !important; width: auto !important; }
  div[style*="padding-left:250px"] { padding-left: 0 !important; }
}

@media (max-width: 600px) {
  body { font-size: 14px; line-height: 1.5; }
  #navbar ul li a span { padding: 6px 8px; font-size: 13px; }
  #pageHeading { font-size: 16px; padding: 6px 10px; }
  h1#article-title { font-size: 18px; line-height: 1.3; }
  .journalshortinfo { padding: 0 10px 10px 10px !important; }
  #contentARight #rightcate li { padding: 4px 0; }
}

/* Editorial board table (editorial-board.php) */
#board-table table { table-layout: fixed; width: 100%; }
#board-table th, #board-table td { padding: 6px 8px; vertical-align: top; word-wrap: break-word; overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }
#board-table .dl-bar { margin: 0 0 8px 0; font-size: 12px; }
#board-table .dl-bar a { display: inline-block; padding: 4px 10px; margin-right: 6px; background: #1d7fb0; color: #fff; text-decoration: none; border-radius: 3px; }
@media (max-width: 960px) and (min-width: 701px) {
  #board-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #board-table table { table-layout: auto; min-width: 720px; }
}
/* phones: each member becomes a card, every cell shows its own label */
@media (max-width: 700px) {
  #board-table table, #board-table tbody, #board-table tr, #board-table td { display: block; width: 100%; box-sizing: border-box; }
  #board-table thead, #board-table colgroup { display: none; }
  #board-table tr { border: 1px solid #cfdde6; border-radius: 4px; margin-bottom: 10px; background: #fff; }
  #board-table td { border: 0; border-bottom: 1px solid #eef3f6; padding: 6px 10px 6px 42%; position: relative; min-height: 20px; text-align: left; }
  #board-table td:last-child { border-bottom: 0; }
  #board-table td::before { content: attr(data-label); position: absolute; left: 10px; top: 6px; width: 38%; font-weight: bold; color: #0b5c8a; }
  #board-table td[data-label="Full Name"] { background: #f4f9fc; font-weight: bold; }
  #board-table .dl-bar a { display: block; margin: 0 0 6px 0; text-align: center; }
}
