/* ============================================================
   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: 2rem;
      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;
            .mag-box-title {
              margin-bottom: 0;
              h4 {
                margin-bottom: 0;
              }
            }
            .magbet-category-preview-listings {
              margin: 0;
              padding: 0;
              display: flex;
              gap: 0.5rem;
              align-items: center;
              li {
                list-style: none;
                height: 100%;
                a {
                  background-color: #f5f5f5;
                  padding: 0.5rem;
                  border-radius: 7px;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  height: 100%;
                  @media screen and (max-width: 768px) {
                    padding: 0.125rem !important;
                  }
                }
              }
            }
            a.more-link {
              background-color: var(--color-card-bg);
              border: 1px solid var(--color-grey-border);
              border-radius: var(--radius-md);
              font-size: 14px;
              padding: 7px 15px;

              &:hover {
                background-color: var(--color-brand-green);
                border-color: var(--color-brand-green);
              }
            }
          }
        }
        &:nth-child(odd) {
          .magbet-category-card {
            background-color: var(--tie-dark-skin-bg-main, #1f2024);
            color: #ffffff;
          }
        }
        &:nth-child(even) {
          .magbet-category-card {
            a.more-link {
              background-color: #dedede;
              border: 1px solid #8e8e8e;
              color: var(--color-dark-text);
              &:hover {
                color: var(--color-white);
              }
            }
          }
        }
        @media screen and (max-width: 768px) and (min-width: 425px) {
          &:nth-child(4n + 2),
          &:nth-child(4n + 3) {
            .magbet-category-card {
              background-color: #ffffff;
              color: var(--tie-dark-skin-bg-main, #1f2024);
            }
          }
          &:nth-child(4n + 1),
          &:nth-child(4n + 4) {
            .magbet-category-card {
              background-color: var(--tie-dark-skin-bg-main, #1f2024);
              color: #ffffff;
            }
          }
        }
        /* 
        &: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;
  margin-top: 2rem;
  .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: 0rem;
        border-color: #cfcfcf;
        .listing-actions {
          display: none;
        }
        .listing-thumbnail {
          a {
            background-color: #fff;
            display: flex;
            padding: 0.5rem;
            border-radius: 0;
            align-items: center;
            justify-content: center;
            min-height: 8rem;
          }
        }
        .listing-details {
          display: flex;
          flex-direction: column;
          padding: 1rem;
          background-color: #363636;
          .wpbdp-field-category,
          .address-info,
          .wpbdp-field-phone,
          .wpbdp-field-tags {
            display: none;
          }
          .wpbdp-field-excerpt {
            margin-top: 0;
            .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.special-disabled {
                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;
          }
          &:hover {
            background-color: #777777;
          }
        }
      }
      @media screen and (max-width: 1024px) {
        grid-template-columns: repeat(3, 1fr);
      }
      @media screen and (max-width: 768px) {
        grid-template-columns: repeat(2, 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;
          border: 1px solid #cacaca !important;
          background-color: #dedede !important;
          color: #1c1105 !important;
          &:hover {
            background-color: var(--color-brand-green) !important;
            color: var(--color-white) !important;
          }
        }
        .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);
  .the-global-title {
    &::before {
      background: var(--color-brand-red);
    }
  }
  .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: 1rem;
        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;
        }
      }
    }
  }

  a.all-by-partner-button {
    float: right;
    margin-top: 1rem;
    background-color: var(--color-grey-lighter);
    color: var(--color-black);
    text-align: center;
    border: 1px solid var(--color-grey-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    padding: 7px 15px;
    &:hover {
      background-color: var(--color-brand-red);
      border-color: var(--color-brand-red);
      color: var(--color-white);
    }
  }
}

/* Listing page */
article.container-wrapper:not(
    .magbet_single_partner,
    .post-cat-odds-wisdom,
    .post-cat-interviews
  ) {
  border: none;
  background-color: #f3f3f3;
  padding: 0;
  @media screen and (max-width: 768px) {
    padding: 1rem !important;
    .entry-content {
      /* padding: 1rem !important; */
    }
  }
  .entry-content {
    padding: 0;
  }
}
.like-header {
  background-color: #e8e8e8;
  color: #fff;
  border-radius: 10px 10px 0 0;
  padding: 1rem 1rem 1rem 2.5rem;
  border: none;
  border-bottom: 2px solid #919191;
  margin-bottom: 1rem;
  align-items: center !important;
  display: flex;
  justify-content: space-between;
  h1.page-title {
    position: relative;
    font-size: 1.125rem;
    padding: 3px 0;
    font-weight: 600;

    line-height: 1;
    color: #000;
    margin: 0;
    a.cat-parent {
      color: #000;
      opacity: 0.4;
      font-weight: 700;
      &:hover {
        color: #000;
        opacity: 1;
      }
    }
    .cat-title {
      font-weight: 700;
    }
    &:before {
      content: "";
      background: var(--color-brand-green);
      width: 10px;
      height: 15px;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      left: 0;
      margin-left: -1.5rem;
    }
  }
  .wpbdp-main-box {
    margin: -1rem 0;
    @media screen and (max-width: 768px) {
      display: none;
    }
    .main-fields {
      &.box-row {
        &.cols-2 {
          margin: 4px 0;
        }
      }
      form {
        display: flex;
        flex-direction: row;
        align-items: center;
        .keywords-field {
          min-height: 36px;
          margin: 6px 0;
        }
        .button.wpbdp-button,
        input[type="submit"] {
          height: 36px;
          margin: 6px 0 !important;
          padding: 0 1rem !important;
        }
      }
    }
  }
  & + .wpbdp-main-box {
    display: none;
    @media screen and (max-width: 768px) {
      display: block;
    }
  }
}

.wpbdp-listing-single {
  .magbet-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    form {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 6px 0;
      .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;
          border: 1px solid #cacaca !important;
          background-color: #dedede !important;
          color: #1c1105 !important;
          &:hover {
            background-color: var(--color-brand-green) !important;
            color: var(--color-white) !important;
          }
        }
        .wpbdp-advanced-search-link {
          display: none;
        }
      }
    }
  }

  .magbet-partner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    @media screen and (max-width: 768px) {
      flex-direction: column;
      .partner-image {
        width: 100%;
        .listing-thumbnail {
          width: 100%;
          a {
            width: 100%;
            display: block;
            img {
              width: 100%;
              height: auto;
              max-width: 100% !important;
              max-height: unset;
            }
          }
        }
      }
    }
  }

  .partner-fields {
    margin-bottom: 1rem;
    display: grid;
    @media screen and (max-width: 768px) {
      display: block;
    }
    grid-template-columns: repeat(2, 1fr);
    background-color: #e8e8e8;
    border-top: 1px solid var(--color-grey-border);
    padding: 1rem;
    .wpbdp-field-display {
      @media screen and (max-width: 768px) {
        flex-direction: column;
      }
      &.wpbdp-field-association-meta {
        font-size: 1rem;
        font-weight: 300;
        display: flex;
        align-items: baseline;
        .field-label {
          font-weight: 300;
          &:after {
            content: ":";
          }
        }
        .value {
          font-weight: 600;
        }
      }
    }
  }
  .listing-actions {
    display: none;
  }
}

.magbet_single_category {
  .like-header:not(.magbet-category-header) {
    display: none;
    & + .wpbdp-main-box {
      display: none;
    }
  }
}

.magbet_single_partner {
  .like-header:not(.magbet-category-header) {
    display: none;
    & + .wpbdp-main-box {
      display: none;
    }
  }
  .entry-header-outer {
    display: none;
  }

  .post-cat-wrap {
    margin-top: 1rem;
  }
}
