/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --color-muted: #8f9092;
  --color-border: rgba(0, 0, 0, 0.1);
  --color-border-light: rgba(255, 255, 255, 0.1);
  --color-accent: #59b0f3;
  --color-accent-bg: rgba(17, 139, 232, 0.12);
  --color-cta: #ff9900;
  --color-white: #ffffff;
  --color-dark-text: #2c2f34;
  --color-category-base: #9a6f65;
  --color-category-hover: #5f443e;
  --text-sm: 0.875rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --transition-fast: 0.15s ease-in-out;
  --transition-base: 0.3s ease;
  --color-partner-block-1: #ff069f;
  --color-partner-block-2: #ff5f06;
  --color-partner-block-3: #7a06ff;
  --color-partner-block-4: #ffd206;
  --color-partner-block-5: #0656ff;
  --color-partner-block-6: #19ff06;
  --color-partner-block-7: #333d29;
  --color-partner-block-8: #013a63;
  --color-partner-block-9: #007f5f;
  --color-partner-block-10: #002855;
}

#content {
  .wpbdp-page {
    ul.wpbdp-categories {
      margin-top: 1rem;
      gap: 1rem;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      @media screen and (max-width: 1024px) {
        grid-template-columns: repeat(2, 1fr);
      }
      @media screen and (max-width: 425px) {
        grid-template-columns: repeat(1, 1fr);
      }

      &::before {
        content: none;
      }
      li.cat-item {
        width: 100%;
        list-style: none;

        margin: 0;
        align-items: stretch;
        .container-wrapper {
          height: 100%;
          display: flex;
          flex-direction: column;
          gap: 1rem;
          .the-global-title {
            margin-bottom: 0;
            h3 {
              margin: 0;
              white-space: nowrap;
            }
          }

          .wpbdp-category-count {
            background-color: var(--brand-color);
            padding: 0.25rem 0.5rem;
            border-radius: var(--radius-lg);
            line-height: 0.95;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 400;
          }
          .wpbdp-category-description {
            @media screen and (max-width: 768px) {
              /* display: none; */
            }
            p {
              line-height: 1.25;
              font-weight: 300;
              font-size: 1rem;
            }
          }
          a.more-link {
            margin-top: auto;
            border-radius: var(--radius-md);
            .cat-term- {
              @media screen and (max-width: 768px) {
                display: none;
              }
            }
            .company-label {
              @media screen and (max-width: 768px) {
                display: none;
              }
            }
          }
          &.magbet-category-card {
            padding: 1rem;
            .magbet-category-preview-listings {
              margin: 0;
              padding: 0;
              display: flex;
              gap: 0.5rem;
              li {
                list-style: none;

                a {
                  background-color: #fff;
                  padding: 0.5rem;
                  border-radius: 7px;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                }
              }
            }
          }
        }
        /* 
        &:nth-child(1) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-1);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-1);
            }
          }
        }
        &:nth-child(2) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-2);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-2);
            }
          }
        }
        &:nth-child(3) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-3);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-3);
            }
          }
        }
        &:nth-child(4) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-4);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-4);
            }
          }
        }
        &:nth-child(5) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-5);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-5);
            }
          }
        }
        &:nth-child(6) {
          .magbet-category-card {
            .the-global-title {
              &::before {
                background: var(--color-partner-block-6);
              }
            }
            .wpbdp-category-count,
            a.button.more-link {
              background: var(--color-partner-block-6);
            }
          }
        } */
      }
    }
    .magbet-category-page {
      .magbet-sibling-categories {
        margin-top: 2rem;
        margin-bottom: 1rem;
        display: flex;
        gap: 0.25rem;
        align-items: center;
        justify-content: space-between;
        a.magbet-sibling-category {
          font-weight: 400;
          color: #002e14;
          background-color: #06cb5b;
          border-radius: 5px;
          width: 100%;
          padding: 0.25rem 0.5rem;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 0.875rem;
          font-weight: 600;
          &:hover {
            text-decoration: none !important;
            color: #424242;
          }
          &.is-active {
            font-weight: 600;
            background-color: #03aa4c;
            color: #fff;
          }
          .magbet-sibling-count {
            display: none;
          }
        }
        @media screen and (max-width: 768px) {
          display: grid;
          grid-template-columns: repeat(3, 1fr);
        }
      }
      .magbet-category-subheader {
        display: none;
        p {
          font-size: 1rem;
        }
      }
      .magbet-listings-wrapper {
        display: flex;
        flex-direction: column;
        .wpbdp-listings-sort-options {
          width: 30%;
          align-self: flex-end;
          @media screen and (max-width: 768px) {
            display: none;
          }
        }
        .wpbdp-listings-list- {
          .wpbdp-listing-excerpt {
            background-color: var(--color-dark-bg);
            padding: 0;
            border-radius: var(--radius-md);
            .listing-title {
              border-bottom-color: var(--color-white);
              h3 {
                padding: 0.25rem 1rem;
                a {
                  color: var(--color-white);
                  font-size: 1.25rem;
                  font-weight: 400;
                }
              }
            }
            .excerpt-content {
              padding: 20px 30px;
              display: flex;
              gap: 1rem;
              @media screen and (max-width: 768px) {
                flex-direction: column;
              }
              .listing-thumbnail {
                float: none;
                width: unset;
                a {
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  background: var(--color-white);
                  border-radius: var(--radius-md);
                  overflow: hidden;
                  min-width: 12rem;
                  padding: 1rem;
                }
              }
              .listing-details {
                margin-left: 0;
                .wpbdp-field-category {
                  display: none;
                }
                .wpbdp-field-excerpt {
                  color: var(--color-white);
                  font-size: 1rem;
                  line-height: 1.25;
                  font-size: 100;
                  .field-label {
                    display: none;
                  }
                  .value {
                    font-size: 1rem;
                    font-weight: 300;
                  }
                }
                .wpbdp-field-tags,
                .address-info {
                  display: none;
                }
                .wpbdp-field-website {
                  .field-label {
                    color: var(--color-white);
                    font-size: 1rem;
                    font-weight: 500;
                  }
                  .value {
                    a {
                      color: var(--color-white);
                      font-size: 1rem;
                      font-weight: 300;
                      line-height: 1;
                      display: inline-block;
                      &:hover {
                        color: var(--color-white);
                      }
                    }
                  }
                }
              }
            }
            .listing-actions {
              display: none;
            }
          }
        }
      }
    }
  }
  .wpbdp-listing-single {
    .listing-columns {
      .main-image {
        margin: 0;
        padding: 0;
      }
      display: flex;
      flex-direction: column;
      .listing-details {
        margin-left: 0;
      }
    }
  }
}

.magbet-listings-wrapper,
.search-results {
  display: flex;
  flex-direction: column;
  .wpbdp-listings-sort-options {
    width: 30%;
    align-self: flex-end;
    @media screen and (max-width: 768px) {
      display: none;
    }
  }
  .magbet-listing-page {
    .wpbdp-listings-list {
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
      /* // grid-auto-rows: unset; */
      .magbet-partner-card,
      .wpbdp-pagination {
        grid-column: unset;
      }
      .wpbdp-pagination {
        grid-column: 1/-1;
      }
      .magbet-partner-card {
        padding: 1rem;
        .listing-actions {
          display: none;
        }
        .listing-thumbnail {
          a {
            background-color: #fff;
            display: flex;
            padding: 0.5rem;
            border-radius: 7px;
            align-items: center;
            justify-content: center;
            min-height: 8rem;
          }
        }
        .listing-details {
          display: flex;
          flex-direction: column-reverse;
          .wpbdp-field-category,
          .address-info,
          .wpbdp-field-tags {
            display: none;
          }
          .wpbdp-field-excerpt {
            margin-top: 1rem;
            .field-label {
              display: none;
            }
            .value {
              font-size: 1rem;
              font-weight: 300;
              line-height: 1.25;
              display: -webkit-box;
              -webkit-box-orient: vertical;
              -webkit-line-clamp: 3;
              overflow: hidden;
            }
          }
          .wpbdp-field-title {
            display: flex;
            align-items: center;
            justify-content: center;
            .field-label {
              display: none;
            }
            .value {
              width: 100%;
              a {
                position: relative;
                background-color: var(--tie-buttons-color, var(--brand-color));
                color: var(--tie-buttons-text, var(--bright-color));
                border-radius: var(--radius-md, 7px);
                border: var(--tie-buttons-border-width, 0) solid
                  var(--tie-buttons-border-color, var(--brand-color));
                padding: 10px 25px;
                font-weight: 600;
                font-size: 14px;
                display: inline-block;
                text-align: center;
                line-height: 21px;
                cursor: pointer;
                text-decoration: none;
                vertical-align: middle;
                transition: 0.3s;
                appearance: none;
                margin-top: 1rem;
                width: 100%;
                &:hover {
                  text-decoration: none;
                  color: var(
                    --tie-buttons-text,
                    var(--bright-color)
                  ) !important;
                  background-color: var(
                    --tie-buttons-hover-color,
                    var(--dark-brand-color)
                  );
                }
              }
            }
          }
          .wpbdp-field-category,
          .wpbdp-field-website {
            display: none;
          }
        }
      }
      @media screen and (max-width: 1024px) {
        grid-template-columns: repeat(3, 1fr);
      }
      @media screen and (max-width: 425px) {
        grid-template-columns: repeat(1, 1fr);
      }
    }
  }
}

.wpbdp-main-box {
  .main-fields {
    form {
      .submit-btn {
        display: flex;
        justify-content: space-between;
        input[type="submit"].wpbdp-button {
          border-radius: var(--radius-md);
          line-height: 1;
          font-size: 1rem;
          flex-grow: 1;
          background: var(--brand-color) !important;
          &:hover {
            background-color: var(--dark-brand-color) !important;
            opacity: 1;
          }
        }
        .wpbdp-advanced-search-link {
          display: none;
        }
      }
    }
  }
}

/* ============================================================
   Magbet Related News
   ============================================================ */
.magbet-related-news {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);

  .mag-box-title {
    h3 {
      margin: 0 20px 0 0;
      font-size: 1.125rem;
      &.title-mobile {
        display: none;
      }
      @media screen and (max-width: 768px) {
        &.title-mobile {
          display: block;
        }
        &.title-desktop {
          display: none;
        }
      }
    }

    .tie-alignright .slider-arrow-nav {
      display: flex;
      margin: 0;
      padding: 0;

      li {
        list-style: none;
        font-size: 0;
        margin-bottom: 0;

        a {
          color: var(--color-dark-text);
          border-color: var(--color-border);

          span[class^="tie-icon-"] {
            color: var(--color-dark-text);
          }
          &:not(.pagination-disabled):hover {
            span[class^="tie-icon-"] {
              color: var(--color-white);
            }
          }
        }
      }
    }
  }

  .posts-items {
    display: flex;
    margin: 0;
    padding: 0;
    gap: 1rem;

    li {
      padding: 0;
      list-style: none;
      display: flex;
      flex-direction: column;
      width: calc(100% / var(--per-page-desktop));
      @media screen and (max-width: 768px) {
        width: calc(100% / var(--per-page-mobile));
      }
      .post-title {
        font-size: 0.875rem;
        font-weight: 600;
        line-height: 1.25;
        margin-top: 0.5rem;
        /* margin-right: 15px; */
        a {
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 3;
          overflow: hidden;
          background: none;
        }
      }

      .post-thumb {
        /* float: left; */
        /* margin-right: 15px; */
        height: auto;
        img {
          width: 100%;
          height: auto;
          max-width: 100%;
        }
      }
      .post-details {
        .post-excerpt {
          font-size: 1rem;
          line-height: 1.25rem;
        }
      }
    }
  }
}

/* Listing page */
