/* =========================
   TeachShare BP Header + Footer
   Drop-in replacement
========================= */

/* -------------------------
   BP Header (custom)
------------------------- */

/* BP pages: keep admin bar fixed on mobile so offsets behave predictably */
@media screen and (max-width: 600px){
  body.buddypress #wpadminbar{
    position: fixed !important;
    top: 0 !important;
  }
}

.ts-bp-header{
  position: sticky;
  top: 0;
  background: #fff;
/* z-index: 99999; */
}

/* WP admin bar offset (reliable) */
body.admin-bar .ts-bp-header{
  top: var(--wp-admin--admin-bar--height, 32px);
}

.ts-bp-header__inner{
  position: relative; /* anchors the mobile dropdown */
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 0px;
}

@media screen and (max-width: 980px){ 
	.ts-bp-header__inner{
  position: relative; /* anchors the mobile dropdown */
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 24px;
}
}

/* BP header: match Divi container width + center */
.ts-bp-header__inner{
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 981px){
  .ts-bp-header__inner{
    align-items: center;
    padding-top: 6px;
    padding-bottom: 0px;
  }
	
	/*.ts-bp-header__logo img{
    height: 45px; /* optional: closer to Divi header feel
  }
*/
}

.ts-bp-header__logo{
  flex: 0 0 auto;
}

.ts-bp-header__logo img {
  display: block;
  max-height: 80px; /* match Divi */
  width: auto;
}

/* Burger button */
.ts-bp-header__toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border:0;
  background:transparent;
  cursor:pointer;
}

.ts-bp-header__burger{
  width:22px;
  height:2px;
  background: currentColor;
  position: relative;
  display:block;
}
.ts-bp-header__burger::before,
.ts-bp-header__burger::after{
  content:"";
  position:absolute;
  left:0;
  width:22px;
  height:2px;
  background: currentColor;
}
.ts-bp-header__burger::before{ top:-7px; }
.ts-bp-header__burger::after{ top:7px; }

/* Nav base state */
.ts-bp-nav{
  display: none;
}

/* Desktop layout */
@media (min-width: 981px){
  .ts-bp-header__toggle{ display:none; }

  /* Make nav take remaining space and center menu like Divi */
  .ts-bp-nav{
    display:flex;
    flex: 1;
    justify-content: flex-end;
  }

  .ts-bp-nav__list{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:22px;
    list-style:none;
    margin:0;
    padding:0 ;
  }

  .ts-bp-nav__list li{ margin:0; padding:0; }

  .ts-bp-nav__list a{
    display:block;
    padding: 0;
    text-decoration:none;
  }
}

/* Mobile dropdown menu panel */
@media (max-width: 980px){

  .ts-bp-nav.is-open{
    display: block;
    position: absolute;

    left: 50%;
    right: auto;              /* 👈 important */
    transform: translateX(-50%);

    width: calc(100% - 32px); /* 16px gap each side */
    max-width: 500px;         /* optional – keeps it elegant on large phones */

    top: 100%;
    background: #fff;
    padding: 12px 20px 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    border-radius: 12px;
    z-index: 999999;
  }

  .ts-bp-nav__list{
    list-style:none;
    margin:0;
    padding:0;
  }

  .ts-bp-nav__list li{
    margin:0;
    padding:0;
  }

  .ts-bp-nav__list a{
    display:block;
    padding:12px 0;
    text-decoration:none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .ts-bp-nav__list li:last-child a{
    border-bottom: 0;
  }
}

/* Login button styling */
.ts-login-btn > a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  /*height:0px; */
  padding:0 14px;
  border-radius:4px;
  background:#0b2a4a;
  color:#fff !important;
  font-weight:600;
  text-decoration:none;
}

.ts-login-btn > a:hover{
  opacity:0.9;
}

/* Mobile dropdown adjustment */
@media (max-width:980px){
  .ts-login-btn > a{
    width:fit-content;
    margin-top:8px;
    border-bottom:0;
  }
}

/* -------------------------
   BP Footer (Divi-like)
------------------------- */

.ts-bp-footer #footer-bottom {
  padding: 15px 0;
  background: #0b2a4a;
  color: rgba(255,255,255,0.85);
}

.ts-bp-footer #footer-bottom a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.ts-bp-footer #footer-bottom a:hover {
  text-decoration: underline;
}

.ts-bp-footer #footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Left side text + links */
.ts-bp-footer #footer-info {
  line-height: 1.4;
}

.ts-bp-footer__sep {
  margin: 0 8px;
  opacity: 0.6;
}

/* Social icons row */
.ts-bp-footer__social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ts-bp-footer__social li {
  margin: 0;
  padding: 0;
}

/* SVG social icons (no Divi dependency) */
.ts-icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  text-decoration:none;
}

.ts-icon-btn svg{
  width:18px;
  height:18px;
  fill: currentColor;
}

.ts-icon-btn:hover{
  opacity:0.85;
}

/* Mobile: stack footer neatly */
@media (max-width: 767px) {
  .ts-bp-footer #footer-bottom .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .ts-bp-footer__sep {
    display: none;
  }

  .ts-bp-footer #footer-info a {
    display: inline-block;
    margin-right: 12px;
    margin-top: 6px;
  }
}

/* BP header: ensure burger button is clickable everywhere */
.ts-bp-header__toggle,
.ts-bp-header__toggle *{
  pointer-events: auto !important;
}

.ts-bp-header{
  z-index: 999999 !important;
}