/*
 * Current Opportunities Module
 * ========================================================================
 * Styles for various current opportunities-based UI components including alerts, loaders,
 * empty current opportunities, and other dynamic UI current opportunities.
 */

/* Mobile Dropdown Styles */
.roles-dropdown {
  margin-bottom: 1.5rem;
}

.roles-dropdown .form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--bs-gray-800);
  font-weight: 600;
}

.roles-dropdown .custom-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: none;
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-gray-400);
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--bs-gray-800);
  transition: all 0.2s ease;
  box-shadow: none;
  width: 100%;
  height: 48px;
  background-color: var(--bs-white);
  font-family: inherit;
  padding-right: 2.5rem; /* Make room for custom arrow */
}

.roles-dropdown .custom-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
  outline: none;
}

.roles-dropdown .select-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roles-dropdown .select-arrow svg {
  width: 17px;
  height: 10px;
  transition: transform 0.3s ease;
  transform-origin: center;
  color: var(--bs-primary);
}

.roles-dropdown .custom-select:focus + .select-arrow svg {
  transform: rotate(180deg);
}

/* Hide default arrow in IE */
.roles-dropdown .custom-select::-ms-expand {
  display: none;
}

/* ==========================================================================
   Base current opportunities Component Styles
   ========================================================================== */

.current-opportunities-section {
  padding: 3.75rem 0;
  @media (max-width: 61.99875rem) {
    padding: 3.125rem 0;
  }
}

.opportunities-section-title {
  text-align: center;
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 3.4375rem;
  margin-bottom: 2.5rem;

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 400;
    font-size: 2.5rem;
    line-height: 3.4375rem;
    margin-bottom: 0;
  }
  p {
    margin-bottom: 0;
  }
  span {
    color: var(--bs-primary);
  }

  .font-serif {
    font-size: 3.4375rem;
    line-height: 3.4375rem;
    font-weight: 400;
  }

  @media (max-width: 61.99875rem) {
    font-size: 2.125rem;
    line-height: 2.75rem;
    .font-serif {
      font-size: 2.875rem;
      line-height: 2.75rem;
    }
    br {
      display: none;
    }
  }
}
.roles-filter {
  margin-bottom: 1.875rem;
}
.roles-slider-container {
  position: relative;

  .roles-slider-wrapper {
    width: 100%;
    height: 100%;
    max-width: 87.5rem;
    margin: 0 auto;

    overflow: hidden;
  }

  .swiper-slide {
    width: fit-content;
  }
  .role-btn {
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: var(--bs-gray-800);
    border: 0;
    background: transparent;
    outline: none;
    cursor: pointer;
    padding: 0;
    transition: var(--bs-transition-slow);
    &:hover {
      color: var(--bs-primary);
      border-bottom: 0.125rem solid var(--bs-primary);
    }
    &.active {
      color: var(--bs-primary);
      border-bottom: 0.125rem solid var(--bs-primary);
      font-weight: 700;
    }
  }
  .roles-slider-button-next,
  .roles-slider-button-prev {
    width: 1.25rem;
    height: 1.25rem;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--bs-primary);
    margin-top: 0;
    top: 0.188rem;

    &::after {
      content: none;
    }
    &.swiper-button-disabled {
      display: none;
    }
  }
  .roles-slider-button-next {
    right: -1.25rem;
  }
  .roles-slider-button-prev {
    left: -1.25rem;
  }

  /* Hide navigation on tablet and mobile */
  @media (max-width: 61.99875rem) {
    .roles-slider-button-next,
    .roles-slider-button-prev {
      display: none;
    }
  }
}

.opportunities-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  align-items: stretch;
  @media (max-width: 90rem) {
    grid-template-columns: repeat(2, 1fr);
  }
  @media (max-width: 61.99875rem) {
    grid-template-columns: repeat(1, 1fr);
  }
}
.opportunities-card {
  padding: 1.5rem 1.875rem;
  border-radius: 1.25rem;
  background: var(--bs-white);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.opportunities-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.opportunities-card-category {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25rem;
  text-transform: uppercase;
  color: var(--bs-primary);
}
.opportunities-card-title {
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.875rem;
  color: var(--bs-gray-800);
  h5 {
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    margin-bottom: 0;
  }
  &:hover {
    color: var(--bs-primary);
    text-decoration: none;
  }
}
.opportunities-card-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
  align-items: center;
  li {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    gap: 0.25rem;
    line-height: 1.875rem;
    color: var(--bs-gray-800);
    img {
      width: 1.25rem;
      height: 1.25rem;
      flex: 1 1 auto;
    }
  }
}

.collapse-content {
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5rem;
  margin-top: 1rem;
  border-top: 0.063rem solid var(--bs-gray-500);
  padding-top: 1rem;
}

.collapse-btn {
  border: 0.063rem solid var(--bs-primary);
  background-color: var(--bs-white);
  border-radius: 0.5rem;
  padding: 0.375rem;
  color: var(--bs-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  outline: none;
  transition: var(--bs-transition-slow);
  &:hover {
    background-color: var(--bs-primary);
    color: var(--bs-white);
  }
  i {
    transition: var(--bs-transition-slow);
  }
  &:not(.collapsed) {
    i {
      transform: rotate(180deg);
    }
  }
}
