/*
Theme Name:   Indite Child
Theme URI:    http://islamclick.local
Description:  Indite child theme — restored original three-column layout matching archive.org
Author:       IslamClick
Author URI:   http://islamclick.local
Template:     indite
Version:      1.0.1
Text Domain:  indite-child
*/

/* ===== Site title — logo image display ===== */
.site-title a {
  display: block;
}
.site-title a img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== Social links — green accent matching archive.org (.s2 strip) ===== */
.social-links .social-tooltip {
  color: #69bc90 !important;
}

/* ===== Entry meta — hide elements not present in archive.org ===== */
.entry-meta .entry-author {
  display: none;
}

/* ===== Post card — ensure consistent max-width ===== */
.post-card,
.post-list .post-row {
  margin: 0 auto 30px;
}

/* ===== Footer — hide theme credit line ===== */
#credit {
  display: none;
}

/* ===== Footer — fix z-index overlay blocking content clicks ===== */
#footer-bottom {
  z-index: auto;
}

/* ===== Mobile — fix footer overlapping main content ===== */
@media only screen and (max-width: 960px) {
  .main-inner {
    position: relative;
    z-index: 1;
  }
  #footer {
    clear: both;
  }
}

/* ===== Layout — defensive flex rules ===== */
/* If a post's content has unbalanced div tags, the browser closes .main   */
/* early and the footer becomes a direct flex child of #wrapper-inner.     */
/* These rules ensure the three-column layout still works when flex-wrap   */
/* is enabled, and force the escaped footer to a full-width row below.     */
#wrapper-inner {
  flex-wrap: wrap;
}
.main {
  flex: 1 1 0%;
  min-width: 0;
}
#wrapper-inner > #footer {
  order: 99;
  flex: 0 0 100%;
}

/* ===== Mobile — search & social icons in one row ===== */
@media only screen and (max-width: 719px) {
  .s2 {
    clear: left;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
  }

  .search-trap-focus {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .toggle-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
  }

  .toggle-search:hover {
    background: rgba(0,0,0,0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), inset 0 -1px 0 rgba(255,255,255,0.1), 0 1px 0 rgba(0,0,0,0.1);
  }

  .toggle-search .svg-icon {
    width: 18px;
    height: 18px;
  }

  .toggle-search.active {
    border-radius: 10px 10px 0 0;
    background: #f1f1f1;
    padding-top: 0;
    padding-bottom: 0;
  }

  .toggle-search.active:hover {
    background: #f1f1f1;
    box-shadow: none;
  }

  .search-expand {
    position: absolute;
    top: 100%;
    left: 10px;
    right: 10px;
    width: auto;
    margin-top: 0;
    border-radius: 0 0 10px 10px;
    padding: 13px 12px;
  }

  .s2 .social-links {
    display: inline-flex;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: none;
  }

  .s2 .social-links li {
    display: flex;
    align-items: center;
    width: auto;
    padding: 0;
    margin: 0;
  }

  .s2 .social-links .social-tooltip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0;
    line-height: 48px;
  }
}
