/* SteadiOp responsive layer for the Kingsize theme.
   Desktop (1024 px and wider) is left exactly as the theme draws it.
   Below that, the fixed 1000 px layout becomes a fluid single column
   with a top bar and a slide-down menu. */

.sop-bar, .sop-panel { display: none; }

@media (max-width: 1023px) {
  html, body { overflow-x: hidden; }
  body { -webkit-text-size-adjust: 100%; }

  /* ---------- top bar ---------- */
  .sop-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    padding: 0 8px 0 16px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.92);
    border-bottom: 1px solid #262626;
    z-index: 100000;
  }
  body.admin-bar .sop-bar { top: 46px; }
  .sop-logo { display: block; width: 131px; height: 50px; overflow: hidden; }
  .sop-logo img { display: block; width: 131px; height: 180px; max-width: none; margin-top: -57px; }

  .sop-toggle {
    width: 48px; height: 48px;
    padding: 0; margin: 0;
    border: 0; background: transparent;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }
  .sop-toggle span,
  .sop-toggle span::before,
  .sop-toggle span::after {
    position: absolute; left: 12px;
    width: 24px; height: 2px;
    background: #e6e6e6;
    content: '';
    transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
  }
  .sop-toggle span { top: 23px; }
  .sop-toggle span::before { left: 0; top: -7px; }
  .sop-toggle span::after { left: 0; top: 7px; }
  .sop-open .sop-toggle span { background: transparent; }
  .sop-open .sop-toggle span::before { top: 0; transform: rotate(45deg); }
  .sop-open .sop-toggle span::after { top: 0; transform: rotate(-45deg); }

  /* ---------- menu panel ---------- */
  .sop-panel {
    display: block;
    position: fixed;
    top: 60px; left: 0; right: 0; bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(0, 0, 0, 0.96);
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
  }
  body.admin-bar .sop-panel { top: 106px; }
  .sop-open .sop-panel {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .sop-open { overflow: hidden; }

  .sop-nav, .sop-nav ul { list-style: none; margin: 0; padding: 0; }
  .sop-nav > li { border-bottom: 1px solid #222; }
  .sop-nav a,
  .sop-nav button {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
    min-height: 54px;
    padding: 0 20px;
    box-sizing: border-box;
    border: 0; background: none;
    font: bold 18px/1.2 'PT Sans Narrow', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    text-decoration: none;
    color: #bdbdbd;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .sop-nav button::after {
    content: '';
    width: 9px; height: 9px;
    border-right: 2px solid #777; border-bottom: 2px solid #777;
    transform: rotate(45deg) translate(-3px, -3px);
    transition: transform 0.25s ease;
  }
  .sop-nav li.sop-expanded > button::after { transform: rotate(-135deg) translate(-3px, -3px); }
  .sop-nav ul { display: none; padding: 0 0 10px; }
  .sop-nav li.sop-expanded > ul { display: block; }
  .sop-nav ul a {
    min-height: 44px;
    padding-left: 36px;
    font: 15px/1.3 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0;
    text-transform: none;
    color: #9a9a9a;
  }
  .sop-nav a.sop-current, .sop-nav li.sop-ancestor > button { color: #fff; }
  .sop-nav a:active, .sop-nav button:active { background: #151515; }

  .sop-contact { display: flex; gap: 10px; padding: 18px 20px 22px; }
  .sop-contact a {
    flex: 1;
    display: block;
    padding: 13px 8px;
    border: 1px solid #3a3a3a;
    text-align: center;
    text-decoration: none;
    font: bold 15px/1 'PT Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #e6e6e6;
  }

  /* ---------- hide the desktop menu column ---------- */
  #menu_wrap { display: none !important; }

  /* ---------- fluid content column ---------- */
  #wrapper { width: auto !important; height: auto; }
  html body #wrapper #main_wrap {
    margin: 0 !important;
    padding-top: 60px;
    background: rgba(0, 0, 0, 0.82) !important;
    background-image: none !important;
    min-height: 100vh;
  }
  body.admin-bar #main_wrap { padding-top: 60px; }
  #main {
    display: block;
    width: auto !important;
    padding: 4px 16px 16px !important;
    font-size: 15px;
    line-height: 1.6;
  }
  #main h2.section_title { font-size: 26px; line-height: 1.2; margin-top: 18px; }
  #content, #content.content_full_width, #content.content_two_thirds,
  #sidebar, .content_one_third, .content_two_thirds, .one_half, .one_third, .two_thirds, .one_fourth, .three_fourth {
    float: none !important;
    width: auto !important;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #content h3 { height: auto !important; line-height: 1.35; }
  #content p, #content li, #content td { font-size: 15px; line-height: 1.6; }

  #main img, #main video, #main embed, #main object {
    max-width: 100% !important;
    height: auto !important;
  }
  #main img.alignleft, #main img.alignright, #content img.alignleft, #content img.alignright {
    float: none !important;
    display: block;
    margin: 12px auto !important;
  }
  #main iframe {
    max-width: 100% !important;
  }
  #main .sop-video {
    position: relative; width: 100%; height: 0; padding-bottom: 56.25%; margin: 12px 0;
  }
  #main .sop-video iframe {
    position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important;
  }

  #main table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #main input[type=text], #main input[type=email], #main textarea, #main select {
    max-width: 100%; box-sizing: border-box; font-size: 16px;
  }

  /* galleries: two flexible columns */
  #content .gallery ul, #content [class*="gallery_"] {
    width: auto !important;
    margin-left: 0 !important; margin-right: 0 !important;
    display: flex; flex-wrap: wrap; gap: 8px;
  }
  #content .gallery ul li, #content [class*="gallery_"] li {
    float: none !important;
    width: calc(50% - 4px) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #content .gallery ul li img, #content [class*="gallery_"] li img { width: 100% !important; height: auto !important; }

  #content ol.commentlist { width: auto; }

  #footer, #footer_info, #footer_copyright { width: auto !important; height: auto !important; }
  #footer { padding: 0 !important; margin-top: 20px; }
  #footer_copyright p.copyright { float: none !important; width: auto !important; margin: 0 0 10px; }
  #footer_copyright p.copyright span { font-size: 12px !important; line-height: 1.5 !important; }
  #footer ul.social { position: static !important; float: none !important; display: flex; gap: 14px; margin: 6px 0 4px !important; padding: 0; }
  #footer ul.social li { float: none !important; margin: 0 !important; }
  #footer ul.social li img { width: 22px !important; height: 22px !important; }

  /* credits table: one card per production */
  #content table.zebra_horizontal { display: block; overflow: visible; border: 0; }
  #content table.zebra_horizontal tbody, #content table.zebra_horizontal tr { display: block; width: auto; }
  #content table.zebra_horizontal tr { padding: 10px 12px; border-bottom: 1px solid #2a2a2a; background: none !important; }
  #content table.zebra_horizontal tr.odd { background: rgba(255,255,255,0.04) !important; }
  #content table.zebra_horizontal td {
    display: inline; border: 0 !important; padding: 0 !important; width: auto !important;
    font-size: 13px !important; color: #9a9a9a; text-align: left !important; background: none !important;
  }
  #content table.zebra_horizontal td:first-child { display: block; font-size: 16px !important; color: #fff; margin-bottom: 2px; }
  #content table.zebra_horizontal td:nth-child(n+3)::before { content: ' \00b7  '; }

  /* home page slideshow caption */
  .slider-details-container { left: 16px !important; right: 16px !important; width: auto !important; }

  /* floating extras that sit over content on a phone */
  #fsml_ff, .dc-floater, #bit { display: none !important; }
}

@media (max-width: 1023px) and (min-width: 601px) {
  #main { padding: 4px 32px 24px !important; }
  #content .gallery ul li, #content [class*="gallery_"] li { width: calc(33.333% - 6px) !important; }
}
