/*
 Theme Name:   savelife
 Text Domain:  savelife
 Version:      1.1.0
 Description:  SaveLife Theme
 Tags:         one-column, custom-menu, featured-images, theme-options, translation-ready
 Author:       Ihor Vovchak <ivovchak@softserveinc.com>
 Author URI:   https://gitlab.com/ivovchak
 Theme URI:    https://gitlab.com/cba-ua/come-back-alive/-/tree/main/wordpress/themes/savelife
 Template:     understrap
 GitLab Theme URI: understrap/understrap-child
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
*/

/* PATCHES */

/* Tags */
.wp-block-tag-cloud a {
    font-size: 16px !important;
    padding: 0 6px;
    color: #959595;
    margin: 10px 10px 0 0;
    text-decoration: none;
    border: 1px solid #959595;
}

/* Blogs */

/* TODO: figure out the margin-bottom for the last group with class */
/* TODO: figure out classes (or hook - less acceptable) for p tag, they differ for news and blogs */
.blog-content .wp-block-group {
  border: 0 !important;
  margin-bottom: 1.5rem !important;
  /* .card  ~= .wp-block-group in editor */
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border-radius: 0.25rem;
}

.blog-content .wp-block-group h2,
.blog-content .wp-block-group h3 {
  text-transform: uppercase !important;
}

.blog-content .wp-block-group p:not(.preview-text) {
  line-height: 1.25 !important;
  font-size: 1rem !important;
  margin-bottom: 1rem !important;
}

.lang-flag {
  width: 16px;
  height: 11px;
  margin-right: 5px;
  margin-top: -3px;
}

.form-error {
  font-size: 12px;
  color: red;
  display: none;
}

iframe {
  max-width: 100%;
}

.su-tooltip-button {
  color: #5B7742;
  cursor: pointer;
}

.su-tooltip-inner {
  background: #FFFFFF !important;
  border: 1px solid #E7E7E7 !important;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.4) !important;
  border-radius: 8px !important;
  color: #2C2C2C !important;
  font-size: 14px !important;
  line-height: 18px !important;
  font-family: Helvetica;
  letter-spacing: -0.011em;
  font-weight: 400;
  text-align: left;
}

#search-page, #search-page-single {
  flex: 1;
  margin-left: auto;
  margin-right: auto;

  .search-form {
    padding-top: 56px;

    @media (max-width: 576px) {
      padding-top: 24px;
    }

    .search-field {
      border: 2px solid #000000;
      font-family: Helvetica;
      font-size: 40px;
      height: 84px;
      background: transparent url("assets/images/svg/search.svg") no-repeat right;
      padding-left: 20px;
      padding-right: 60px;

      @media (max-width: 576px) {
        height: 64px;
        font-size: 24px;
        padding-left: 12px;
        padding-right: 55px;
        background: transparent url("assets/images/svg/search_small.svg") no-repeat right;
      }
    }

    .search-submit {
      z-index: 10;
      border: none;
      height: 84px;
      width: 83px;
      position: absolute;
      top: 0;
      right: 0;
      cursor: pointer;
      background: transparent url("assets/images/svg/search.svg") no-repeat center;

      @media (max-width: 576px) {
        position: absolute;
        top: 0;
        right: 2px;
        cursor: pointer;
        height: 64px;
        width: 55px;
        background: transparent url("assets/images/svg/search_small.svg") no-repeat right;
      }
    }
  }

  .search-tab {
    font-size: 20px;
    font-weight: 400;
    line-height: 24px;
    margin-right: 43px;
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: 8px;
    color: #000000;
    text-transform: uppercase;

    @media (max-width: 576px) {
      font-size: 16px;
      margin-right: 0px;
      padding-right: 8px;
      padding-left: 8px;
      padding-bottom: 2px;
    }

    &.active {
      border-bottom: 4px solid #5B7742;

      @media (max-width: 576px) {
        border-bottom: 3px solid #5B7742;
      }
    }
  }

  .materials-headline {
    padding-bottom: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #d6d6d6;

    @media (max-width: 576px) {
      padding: 0;
      margin-bottom: 14px;
    }
  }

  .headline {
    gap: 0px;
  }

  .result_count, .result_count span {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 400;
    font-family: Laqonic;
  }

  .result_count span {
    color: #959595;
  }

  .news-card:not(:first-child) {
    margin-top: 40px;

    @media (max-width: 576px) {
      margin-top: 8px;
    }
  }

  .news-card-img {
    width: fit-content;
  }

  .card-img, .card-img-bottom, .card-img-top {
    width: 312px;
    height: 191px;

    @media (max-width: 768px) {
      width: 240px;
      height: 146px;
    }

    @media (max-width: 576px) {
      width: 120px;
      height: 73px;
    }
  }

  .news-card-body {
    margin-top: -2px;
  }

  @media (max-width: 768px) {
    .news-card, .news-card-img, .news-card-body {
      display: inline-block;
    }

    .news-card-img {
      float: left;
      margin-right: 8px;
    }

    .news-card-body {
      width: 54%;
    }
  }

  @media (max-width: 576px) {
    .news-card-img {
      float: left;
      margin-right: 8px;
    }

    .news-card-body {
      width: 62%;
    }

    .card-text {
      display: none;
    }
  }

  .container {
    padding: 0;
    @media (min-width: 1400px) {
      max-width: 984px;
    }

    @media (max-width: 576px) {
      max-width: 343px;
    }
    @media (min-width: 992px) {
      width: 984px;
    }
  }

  .not_found {
    padding-top: 56px;
    text-align: center;
  }
}

/* /reporting */
#__BVID__42___BV_tab_button__,
#__BVID__28 ul li:nth-child(2) {
  display: none;
}

/* Show for admin */
body #wpadminbar ~ #content #__BVID__42___BV_tab_button__,
body #wpadminbar ~ #content #__BVID__28 ul li:nth-child(2) {
  display: block;
}
