.filter-posts {
  background: #db0202;
  background: linear-gradient(90deg, rgba(219, 2, 2, 1) 0%, rgba(247, 183, 20, 1) 100%);
  padding: 1rem 0 1.5rem;
  
  .filter-posts-inner {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 1rem;
    
    .filter-posts-header {
      h2 {
        font-size: 24px;
      }
    }

    .param-item-field-wrapper {
      display: inline-flex;
      gap: .25rem;
      align-items: center;

      .param-item-field {
        position: relative;
        cursor: pointer;
  
        &::before {
          content: '\e905';
          position: absolute;
          top: 6px;
          right: 5px;
          font-size: 21px;
          font-family: 'mars' !important;
          speak: never;
          font-style: normal;
          font-weight: normal;
          font-variant: normal;
          text-transform: none;
          line-height: 1;
          color: #444444;
        }
      }
    }
  }
  
  .param-item-label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
  }

  .param-item-field-separator {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0.5rem;
  }

  input, select {
    border: 0;
    border-radius: 0.35rem;
    padding: 0.2rem 0.5rem;
    min-width: 230px;
    font-size: 15px;
    line-height: 1.9;
    background: #fff;
    color: #444444;
    cursor: pointer;

    &:focus {
      outline: 0;
    }
  }

  /* jQuery UI Datepicker styling */
  .ui-datepicker {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 10px;
    font-size: 14px;
  }

  .ui-datepicker .ui-datepicker-header {
    background: #eaa991;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px;
    margin: -10px -10px 10px -10px;
  }

  .ui-datepicker .ui-datepicker-title {
    text-align: center;
    font-weight: bold;
  }

  .ui-datepicker .ui-datepicker-prev,
  .ui-datepicker .ui-datepicker-next {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
  }

  .ui-datepicker .ui-datepicker-prev:hover,
  .ui-datepicker .ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }

  .ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
  }

  .ui-datepicker th {
    padding: 5px;
    text-align: center;
    font-weight: bold;
    color: #666;
  }

  .ui-datepicker td {
    padding: 1px;
  }

  .ui-datepicker td a {
    display: block;
    padding: 5px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
  }

  .ui-datepicker td a:hover {
    background: #eaa991;
    color: #fff;
  }

  .ui-datepicker td a.ui-state-active {
    background: #eaa991;
    color: #fff;
  }

  .ui-datepicker td a.ui-state-highlight {
    border: 1px solid #eaa991;
    color: #eaa991;
  }

  /* jQuery UI Selectmenu styling */
  .ui-selectmenu-button {
    border: 0;
    border-radius: 0.35rem;
    padding: 0.2rem 0.5rem;
    min-width: 230px;
    cursor: pointer;
    display: inline-block;
    position: relative;
    font-size: 15px;
    line-height: 1.9;
    background: #fff;
    color: #444444;

    .ui-selectmenu-icon.ui-icon {
      margin-top: 7px;
    }
  }
}
.ui-selectmenu-menu {
  
  .ui-menu {
    overflow: hidden;
    border: 0 !important;
    border-radius: 0.35rem;
    box-shadow: 0 0 5px rgba(0, 0, 0, .15);

    .ui-menu-item-wrapper {
      font-size: 14px !important;
    }
  }
}

.ui-widget.ui-widget-content {
  overflow: hidden;
  border: 0 !important;
  border-radius: 0.35rem;
  box-shadow: 0 0 5px rgba(0, 0, 0, .15);
  padding-top: 8px;

  .ui-widget-header {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;
    font-size: 14px;
    font-weight: 600;

    .ui-icon {
      background-image: unset;
      display: none;
    }

    .ui-state-hover {
      background: transparent;
      border: 0;
      width: unset;
      height: unset;
    }
  }
}

.ui-datepicker {
  .ui-datepicker-prev,
  .ui-datepicker-next {
    cursor: pointer;
    position: absolute;
    top: 1px;
    width: unset;
    height: unset;
    border: 0;
    background: transparent;

    &::before {
      font-family: 'mars' !important;
      speak: never;
      font-style: normal;
      font-weight: normal;
      font-variant: normal;
      text-transform: none;
      line-height: 1;
      font-size: 1.5rem;
      color: #444444;
    }
  }
  .ui-datepicker-prev {
    left: 5px;
    
    &::before {
      content: '\e903';
    }

    &.ui-datepicker-prev {
      left: 5px;
    }
  }
  .ui-datepicker-next {
    right: 5px;
    
    &::before {
      content: '\e904';
    }

    &.ui-datepicker-prev {
      right: 5px;
      
    }
  }
}

.ui-datepicker td .ui-state-active {
  border-radius: .35rem;
  font-weight: 600;
}

.ui-state-default, .ui-widget-content .ui-state-default {
  background: transparent;
  border: 0;
  text-align: center;
  color: #444444;
  font-size: 14px;
  padding: 0;
  margin: 0;
  
}

.ui-state-active, 
.ui-widget-content .ui-state-active, 
.ui-widget-header .ui-state-active, 
.ui-button.ui-state-active:hover {
  background: #eaa991;
  color: #444444;
  border: 0;
  margin: 0;
}

/* Responsive design */
@media (max-width: 959px) {
  .filter-posts-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .param-item-field-wrapper {
    position: relative;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 2rem !important;
    width: 100%;
  }
  
  .param-item-field-separator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    margin: 0 !important;
  }
  
  .filter-posts input, 
  .filter-posts select,
  .filter-posts .ui-selectmenu-button {
    min-width: auto;
    width: 100%;
  }

  .param-item {
    width: 100%;
  }
}

/* Clear filters button styling */
.clear-filters-btn {
  font-size: 13px;
  line-height: 1.9;
  padding: 0.2rem 0.5rem;
  border: 0;
  background: transparent;
  font-weight: 400;
  color: #444444;
  cursor: pointer;
  transition: all .3s ease;
  box-shadow: none;

  &:hover,
  &:focus,
  &:active {
    background: transparent;
    color: #444444;
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: underline;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .clear-filters-btn {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }
}

