/*
Theme Name: Avada Child
Template: Avada
*/

/* =========================
   bbPress
   ========================= */

#bbpress-forums.bbpress-wrapper {
  --forum-primary-color: #6b96a2;
  --bbp-row: #fafafa;
  --bbp-muted: #696969;

  --bbp_forum_header_bg: var(--forum-primary-color);
  --bbp_forum_header_font_color: #fff;
  --bbp_forum_base_font_size: 14px;

  /* Keep only if referenced elsewhere */
  --link_color: #000;
  /* --bbp-border: red; */ /* unused in provided rules */
}

#bbpress-forums {
  /* Forum list container */
  ul.bbp-forums {
    background: #fff;
    border: 0;
    border-radius: 10px;
    overflow: hidden;

    /* Header + footer rows */
    > li.bbp-header,
    > li.bbp-footer {
      color: var(--bbp_forum_header_font_color);
      padding: 14px;
    }

    /* Body row wrapper */
    > li.bbp-body {
      border-color: var(--bbp-row);

      > ul {
        align-items: center;
        border: 0;
        display: flex;
        padding: 28px 14px;

        &:nth-child(even) {
          background: var(--bbp-row);
        }

        .bbp-forum-info {
          width: 66.66%;

          > div {
            align-items: center;
            display: flex;

            img {
              margin: 0 7px;
            }

            > div {
              margin: 0 1.5rem;

              small {
                color: var(--bbp-muted);
                font-style: italic;
              }
            }
          }
        }

        .bbp-forum-freshness {
          width: 33.33%;
        }
      }
    }

    /* Freshness column */
    li.bbp-forum-freshness {
      color: #000;
      text-align: left;

      .bbp-topic-meta {
        color: var(--bbp-muted);

        .bbp-author-link {
          color: var(--bbp-muted);
        }
      }
    }

    /* Freshness header styling */
    > li.bbp-header > ul .bbp-forum-freshness {
      color: var(--bbp_forum_header_font_color);
      font-style: italic;
    }
  }

  /* Titles / content */
  a.bbp-forum-title {
    font-weight: 600;
  }

  .bbp-forum-content {
    color: var(--bbp-muted);
  }

  /* Freshness author avatar */
  .bbp-topic-freshness-author {
    .bbp-author-avatar {
      display: none !important;

      + .bbp-author-name {
        margin-left: 0 !important;
      }
    }
  }

  /* Alternating rows (kept from original intent, scoped to bbPress) */
  li.bbp-body > ul:nth-child(even) {
    background: var(--bbp-row);
  }
}

/* =========================
   The Events Calendar (Tribe)
   ========================= */

main:has(.tribe-events) {
  background-color: #fff !important;
}

.fusion-events-single-title-content {
  margin-top: 1rem;
  background-color: rgb(170, 31, 56) !important;
}

.tribe-events {
  --events-primary-color: #6b96a2;
  --events-row: #fafafa;
  --f-img-width: 240px;
  --btn-bg: rgb(170, 31, 56);

  padding: 6rem 0;

  /* single event */
  &.tribe-common:has(.tribe-events-c-subscribe-dropdown__container) {
    padding: 0;

    .tribe-events-c-subscribe-dropdown {
      margin: 0;
    }
  }

  .btn-wrapper {
    align-items: center;
    display: flex;
    padding: 0 2rem;

    a.fusion-button {
      background-color: var(--btn-bg);
      cursor: pointer;
    }
  }

  ul.tribe-events-calendar-list {
    border-top: 3rem solid var(--events-primary-color);
    border-radius: 10px;

    > li:nth-child(even) {
      background: var(--events-row);
    }

    > li:nth-child(odd) {
      background: #fff;
    }

    > li:last-child {
      border-radius: 0 0 10px 10px;
    }

    > li {
      margin: 0 !important;
      padding: 2rem 4rem 2rem;

      .tribe-events-calendar-list__event-date-tag {
        width: var(--f-img-width);

        time {
          display: flex;
          justify-content: center;
        }
      }

      .tribe-events-calendar-list__event-featured-image-wrapper {
        max-width: var(--f-img-width);
        display: flex;
        align-items: center;

        > div {
          border-radius: 12px;
          max-width: var(--f-img-width);
          overflow: hidden;
        }

        .tribe-events-calendar-list__event-featured-image {
          border-radius: 12px;
          display: block;
          height: auto;
          max-width: var(--f-img-width);
          width: 100%;
        }
      }

      .tribe-events-calendar-list__event-details {
        width: 100%;

        header {
          .tribe-events-calendar-list__event-datetime-wrapper,
          time,
          address.tribe-events-calendar-list__event-venue {
            color: var(--events-primary-color);
            font-size: 15px !important;
            font-weight: 700;
            font-family: "Montserrat", "Inter";

            > svg {
              fill: var(--events-primary-color);
            }
          }

          h4 {
            margin-bottom: 0.75rem !important;
            font-family: "Montserrat", "Inter";
            font-size: 30px;
            order: 0;

            > a {
              color: #000;
            }
          }

          address.tribe-events-calendar-list__event-venue {
            order: 1;
            font-family: "Montserrat", "Inter";
            margin-top: 0 !important;
          }

          .tribe-events-calendar-list__event-datetime-wrapper {
            margin-bottom: 0.75rem !important;
          }
        }

        .tribe-events-calendar-list__event-description {
          margin-top: 0 !important;
          line-height: 1.4;
        }
      }
    }
  }
}

/* =========================
   WP File Download
   ========================= */

.wpfd-cat-tree {
  list-style: none;
}

/* Membership Map */
/* Hide the InfoWindow close (X) button and its header row */
.gm-style-iw-chr {
  display: none;
}
button.gm-ui-hover-effect {
  display: none !important;
}

/* Reclaim the space the hidden header leaves behind */
.gm-style-iw-ch {
  padding-top: 0 !important;
}
.gm-style-iw.gm-style-iw-c {
  padding: 8px 12px !important;
}

/* Ensure the popup link is clickable */
.gm-style-iw-d,
.gm-style-iw-d a {
  pointer-events: auto !important;
}

.wpfd-categories > h2 {
  background-color: rgb(170, 31, 56);
  color: #fff !important;
  margin: 0 !important;
  padding: 0 0 0 10px !important;
}

.wpfd-categories > h2::before {
  content: "";
  display: inline-block !important;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 8px;
  background-image: url("assets/folder.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.single-tribe_events {
  background-color: #f2f2f2 !important;

  main {
    color: #000;
  }
}
