/*

Glendale Designs Custom Programming
for Sinister Diesel
Ticket: 39441229
Allowed Domains: sinisterdiesel.com

GD Job Posting

Copyright Glendale Designs - Our optimizations are not freeware.
Do not use, copy or distribute without written permission. 
Ask us, we're nice! support@glendaledesigns.com

TERMS OF SERVICE
https://glendaledesigns.com/terms-of-service/
(Make sure to read and understand this section 'Non-Exclusive License to Customer')
  

GDPM - v01.00.00

*/

*, 
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

:host {
  --border-radius: 0.5rem;
  --box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  --box-shadow-hover: 0 0 10px 0 rgba(0, 0, 0, 0.2);

  --color-gray: #6c757d;
  --color-gray-light: #e9ecef;
  --color-light: #f8f9fa;
  --color-white: #ffffff;
  --color-primary: #1833C0;
  --color-green: #4CAF50;
}

.gd-job-posting {
  display: block !important;
  color: inherit;
}

/* Job List */

.gd-job-posting__job-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  .gd-job-posting__job-item {
    cursor: pointer;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    background-color: var(--color-light);
    padding: 1rem;
    padding-top: 1.4rem;
    transition: all 0.15s ease;

    &:has(.gd-job-posting__details.is-open) {
      padding-bottom: 0;
    }

    &:hover {
      transform: translateY(-2px) scale(1.005);
      box-shadow: var(--box-shadow-hover);
    }
  }

  .gd-job-posting__job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    
    @media (max-width: 39.999em) {
      flex-direction: column;
      align-items: flex-start;
    }
  }
}

.gd-job-posting__job-title-section {
  .gd-job-posting__job-title {
    margin: 0 0 0.6rem;
  }
}

.gd-job-posting__tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-gray);
  margin-bottom: 0.6rem;

  .gd-job-posting__tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .gd-job-posting__tag-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gd-job-posting__tag-icon svg {
    width: 1em;
    height: 1em;
  }
}

.gd-job-posting__job-cta {
  display: flex;
  gap: 1rem;
}

.gd-job-posting__details {
  max-height: 0;
  overflow-y: clip;
  opacity: 0;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: max-height, opacity;
  padding: 0.01px;
}

.gd-job-posting__details.is-open {
  /* Large enough for practical content, adjust as needed */
  max-height: 10000px;
  opacity: 1;
  position: relative;
  padding-bottom: 1.5rem;
  border-radius: 0 0 var(--border-radius) var(--border-radius);

  &::before {
    content: '';
    position: absolute;
    height: 1px;
    left: 0;
    right: 0;
    top: 0.5rem;
    margin-left: -1rem;
    margin-right: -1rem;
    background-color: var(--color-gray-light);
  }

  &::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0.5rem;
    bottom: 0;
    background-color: var(--color-white);
    z-index: -1;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0.5rem;
  }
}

.gd-job-posting__detail:has(.gd-job-posting__detail-benefits-perks) {
  background-color: rgba(24, 51, 184, 0.05);
  padding: 2rem 1.5rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
  border-radius: var(--border-radius);

  .gd-job-posting__detail-title {
    margin-top: 0;
    color: var(--color-green);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: 'Oswald', sans-serif;
  }

  .gd-job-posting__detail-benefits-perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  
    @media screen and (min-width: 59.999em) {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
    }
  
    .gd-job-posting__detail-benefits-perk {
      display: flex;
      align-items: flex-start;
      gap: 0.4rem;

      svg {
        color: var(--color-green);
        width: 1.25rem;
        height: 1.25rem;
      }
    }
  }
}

.gd-job-posting__detail-image {

  &.is-full-width img {
    width: 100%;
  }

  &.left {
    text-align: left;
  }

  &.center {
    text-align: center;
  }
  
  &.right {
    text-align: right;
  }
}
