/*!
 * ===========================
 * Author: Steve Gotthardt
 * Created: 10/2025
 * ===========================
 */

:root {
  --no-shadow: 0px 0px 2px rgba(0, 0, 0, 0);
  --small-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  --large-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  --transition-time: 250ms;
  
  --small-font-size: 12pt;
  --small-line-height: 1.5;
}

body {
  background: rgba(0,0,0,.03);
}

#SearchFilter-main-container {
  position: relative;
  padding: 24px 24px 96px;
  @media screen and (min-width: 768px) {
    padding-left: 48px;
    padding-right: 48px;
  }
  @media screen and (min-width: 1376px) {
    padding-left: 0;
    padding-right: 0;
  }
}

#SearchFilter-search-filter-container {
  display: grid;
  grid-template-areas: "type" "region" "area" "search" "btns";
  grid-row-gap: 12px;
  grid-column-gap: 12px;
  margin: 0 auto;
  width: 100%;
  max-width: 1280px;
  @media screen and (min-width: 768px) {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto;
    grid-template-areas: "search search type region area btns";
    grid-row-gap: 18px;
  }
  .filter-container,
  #SearchFilter-search-bar-container {
    position: relative;
    border-radius: 10px;
    box-shadow: var(--small-shadow);
    background: white;
    height: 54px;
    overflow: hidden;
  }
  .filter-container {
    &#Filter-type-container {
      grid-area: type;
    }
    &#Filter-region-container,
    &#Filter-location-container {
      grid-area: region;
    }
    &#Filter-area-container,
    &#Filter-topic-container {
      grid-area: area;
    }
    label {
      text-transform: uppercase;
      font-size: 10px;
      letter-spacing: 1px;
      color: #999;
      position: relative;
      text-indent: 18px;
      margin: 1px 0 0;
      select {
        position: absolute;
        top: 0;
        margin: 0;
        border: 0;
        background: transparent;
        padding: 16px 16px 0;
        color: #262626;
        height: 54px;
        &:hover {
          cursor: pointer;
        }
      }
    }
  }
  #SearchFilter-search-container {
    grid-area: search;
    position: relative;
    input[type="search"] {
      width: 100% !important;;
      height: 54px;
      padding: 0 16px;
      font: 16px/24px "Roboto", Helvetica, Arial, sans-serif;
      color: #262626;
    }
    button {
      position: absolute;
      width: 54px;
      height: 54px;
      top: 0;
      right: 0;
      background-color: #f6f6f6;
      display: none;
      @media screen and (min-width: 360px) {
        display: inline;
      }
      i {
        width: 20px;
        height: 20px;
        color: #777;
      }
      &:hover {
        background-color: white;
        i {
          color: #0072c6;
        }
      }
    }
    #SearchFilter-search-quick-results {
      position: absolute;
      z-index: 9999;
      background-color: rgba(255, 255, 255, 0.9);
      top: 55px;
      left: 10px;
      width: calc(100% - 20px);
      padding: 12px 24px 12px;
      box-shadow: var(--large-shadow);
      &.hide {
        display: none;
      }
      ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        li {
          &.hide {
            display: none;
          }
          a {
            font-size: 0.9rem;
            line-height: 1.4;
            font-weight: 600;
            padding: 6px 0;
            display: inline-block;
            width: 100%;
          }
        }
      }
    }
  }  
}
#SearchFilter-btns {
  display: flex;
  justify-content: center;
  margin: 12px auto 0;
  grid-area: btns;
  border-radius: 10px;
  overflow: hidden;
  width:60px;
  @media screen and (min-width: 360px) {
    margin-top: 0;
    width:auto;
  }
  button {
    width: 40px;
    height: 40px;
    margin: 0;
    background-color: #f6f6f6;
    color: #777;
    font-size: 16px;
    @media screen and (min-width: 768px) {
      width: 54px;
      height: 54px;
      font-size: inherit;
    }
    &.active,
    &:active,
    &:hover {
      background-color: white;
      color: #0072c6;
    }
    i {
      pointer-events: none;
    }
    &#Btn-Grid,
    &#Btn-List {
      display: none;
      @media screen and (min-width: 960px) {
        display: block;
      }
      &:focus {
        background-color: white;
        color: #0072c6;
      }
    }
  }
}
#SearchFilter-msg {
  text-align: center;
  font-size: var(--)
  font-weight: bold;
  padding: 36px 12px 48px;
  color: #262626;
  @media screen and (min-width: 768px) {
    padding-top: 48px;
    padding-bottom: 54px;
  }
  .msg.hide {
    display: none;
  }
}

#List-header {
  display: none;
}

ul#SearchFilter-list {
  margin: 0;
  list-style: none;
  li {
    &.hide {
      display: none;
    }
  }
}

/* General */
h1.page-title {
  margin:0 0 .5rem;
}
body main.content {
  padding-bottom:0;
}
.title-block {
  margin-bottom:0 !important;
  z-index:1;
}
@media (min-width: 960px) {
  .title-block__content {
    background:none;
  }
}
footer#footer {
  margin-top:0;
}

/* Filter and Search */
#SearchFilter-main-container {
  position: relative;
  padding: 0 24px 0;
  margin:0;
  @media screen and (min-width: 960px) {
    display:grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows:auto 1fr;
    grid-column-gap:72px;
    grid-row-gap:48px;
    grid-template-areas: "filters search" "filters list";
    padding-left:0;
    padding-right:96px;
  }
}

#SearchFilter-search-container,
#SearchFilter-filter-container,
#SearchFilter-list-container {
  width:100%;
}
#SearchFilter-msg,
#SearchFilter-filter-container .accordion .filter-header.accordion__label{
  margin:0; 
  padding:12px 24px;
}
#SearchFilter-msg {
  font-size:14pt;
  font-weight:600;
  padding-top:36px;
  padding-bottom:24px;
  text-align:start;
}
#SearchFilter-search-container {
  grid-area: search;
  padding:0;
  margin:18px 0 0;
  position:relative;
  @media screen and (min-width: 360px) {
    display:grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:"searchbar buttons" "filterbuttons filterbuttons";
    grid-column-gap: 24px;
    align-items: end;
  }
  #SearchFilter-search-bar-container,
  #SearchFilter-btns {
    border:1px solid rgba(0,0,0,.15);
  }
  #SearchFilter-search-bar-container {
    grid-area: searchbar;
    position:relative;
    border-radius:10px;
    overflow:hidden;
    input[type="search"] {
      height: 60px;
      padding: 0 24px;
      font-weight:600;
      width:100%;
      background:white;
      &::placeholder {
        font-weight:400;
        @media screen and (max-width: 460px) {
          color:transparent;
        }
        @media screen and (min-width:960px) and (max-width:1100px) {
          color:transparent;
        }
      }
    }
    button {
      position: absolute;
      width: 60px;
      height: 60px;
      top: 0;
      right: 0;
      display: none;
      background:none;
      @media screen and (min-width: 360px) {
        display: inline;
      }
      i {
        width: 20px;
        height: 20px;
        color: #999;
      }
    }  
  }
  #SearchFilter-search-quick-results {
    position: absolute;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.95);
    top: 62px;
    padding: 12px 24px 12px;
    box-shadow:var(--small-shadow);
    max-height:400px;
    overflow-y: auto;
    @media screen and (min-width: 960px) {
      top: 62px;
      left: 10px;
      right:auto;
    }
    &.hide {
      display: none;
    }
    ul {
      list-style-type: none;
      margin: 0;
      padding: 0;
      li {
        &.hide {
          display: none;
        }
        a {
          font-size: 0.9rem;
          line-height: 1.4;
          font-weight: 600;
          padding: 6px 0;
          display: inline-block;
          width: 100%;
        }
      }
    }
  }
  #SearchFilter-btns {
    grid-area:buttons; 
    box-shadow: none;
    button {
      width: 60px;
      height: 60px;
    }
  }
  ul#SearchFilter-filter-btns {
    grid-area:filterbuttons;
    margin:0;
    padding:0;
    list-style:none;
    li {
      display:inline;
      button {
        margin:9px 0 0;
        font-size:var(--small-font-size);
        line-height:var(--small-line-height);
        &.hide {
          display:none;
        }
        i {
          margin:0 0 0 9px;
          opacity:.5;
          pointer-events: none;
        }
      }
    }  
  }
}

#SearchFilter-filter-container {
  grid-area: filters;
  height:100%;
  width:calc(100% + 48px); 
  margin:0 -24px;
  font-size: var(--small-font-size);
  line-height: var(--small-line-height);
  @media screen and (min-width: 960px) {
    width:100%; 
    margin:0;
  }  
  .accordion {
    margin:0;
    .filter-header.accordion__label,
    .accordion__content {
      border:none;      
    }
    .filter-header.accordion__label {
      font-weight:600;
      position: relative;
      background:none;
      color:#262626;      
    }
    .accordion__content {
      padding:0 24px;
      margin:0;
      &.is-active {
        padding-bottom:24px;
      }
      label {
        font:inherit;
        color:#262626;
        margin:0;
        padding:6px 0;
        border-radius:5px;
        transition:none;
        display:flex;
        align-items:center;
        gap:9px;
        &:hover, &:focus {
          cursor:pointer;
        }
        &::before {
          content:"\f0c8";
          font-size:16pt;
          font-family: "Font Awesome 6 Pro";
          background:white;
          line-height:1;
          color:#444;
        }
        &.is-selected {
          font-weight:600;
          &::before {
            content:"\f14a";
            color:#E27508;
          }
        }
        input[type=checkbox] {
          display:none;
        }
      }
      input[type=date] {
        background:white;
        padding:12px;
        border-radius:50px;
      }
      &#date-pane {
        label {
          display:inherit;
          &::before {
            content:"";
          }
        }
        input[type=date] {
          margin-top:5px;
          width:100%;
        }
      }
    }    
  }  
}
#SearchFilter-no-results-msg {
  font-weight:600;
  color:#994411;
}