/**
 * Morae - Current Openings Page Stylesheet
 * 
 */

:root {
  --morae-swirl: #cfc8c2;
  --morae-pampas: hsl(30, 25%, 95%);
  --morae-natural-100: hsl(30, 25%, 95%);
  --morae-natural-200: hsl(30, 20%, 90%);
  --morae-charcoal-600: hsl(0, 0%, 43%);
  --morae-charcoal-700: hsl(0, 0%, 26%);
  --morae-charcoal-800: hsl(0, 0%, 15%);
  --morae-charcoal-900: hsl(0, 0%, 6%);
  --morae-brightorange: var(--morae-topline-color-alt, #ff3600);
  --morae-accessible-orange: var(--morae-btn-primary-bg, #e13000);
  --morae-gradient: var(--morae-btn-primary-gradient, linear-gradient(90deg, #E13000 52.63%, #FF3600 100.88%));
  --morae-input-bg: hsl(30, 25%, 95%);
  --morae-input-border: hsl(0, 0%, 43%);
  --morae-input-placeholder: hsl(0, 0%, 43%);
  --morae-input-foreground: hsl(0, 0%, 6%);
  --morae-input-hover: hsl(30, 20%, 90%);
  --morae-input-selected: hsl(0, 0%, 15%);
  --morae-input-selected-foreground: hsl(30, 25%, 95%);
  --morae-input-focus: #1c1c1c;
  --morae-typo-sm: var(--morae-font-size-body, clamp(0.9375rem, 0.90009rem + 0.15962vw, 1.04375rem));
}

/* Container */
.current-openings-main {
  padding-top: clamp(2rem, 3.61vw, 3.25rem);
  padding-bottom: clamp(4.44rem, 11.32vw, 10.19rem);
  padding-left: var(--morae-side-padding);
  padding-right: var(--morae-side-padding);
  background-color: #ffffff;
  color: var(--morae-charcoal-800);
  font-family: var(--morae-font);
  min-height: 60vh;
}

.current-openings-container {
  max-width: 1280px;
  margin: 0 auto;
}

/* Hero Header */
.current-openings-hero {
  padding-bottom: clamp(2rem, 3.61vw, 3.25rem);
}

.current-openings-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1.5rem;
}

@media (min-width: 768px) {
  .current-openings-hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter, 1.5rem);
  }
}

.current-openings-hero-col {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 1.53vw, 1.375rem);
}

@media (min-width: 768px) {
  .current-openings-hero-col {
    grid-column: span 8 / span 8;
  }
}

.current-openings-topline {
  font-size: var(--morae-font-size-topline, clamp(1.125rem, 1.39vw, 1.25rem));
  line-height: var(--morae-line-height-topline, 1.5);
  font-weight: var(--morae-font-weight-topline, 500);
  color: var(--morae-topline-color, var(--morae-accessible-orange));
  margin: 0;
}

.current-openings-heading {
  font-size: var(--morae-font-size-display-2xl, clamp(1.9375rem, 3.29vw, 2.9375rem));
  line-height: var(--morae-line-height-display-2xl, 1.3);
  font-weight: 400;
  color: var(--morae-title-color-charcoal, #262626);
  margin: 0;
}

.current-openings-summary {
  font-size: clamp(1.375rem, 1.875vw, 1.6875rem);
  line-height: 1.5;
  color: var(--morae-charcoal-600);
  margin: 0;
}

/* Filters Section */
.current-openings-filters-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .current-openings-filters-section {
    padding-top: clamp(1.75rem, 2.71vw, 2.44rem);
  }
}

/* Mobile Filter Toggle */
.current-openings-filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--morae-charcoal-800);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.2s ease;
}

.current-openings-filter-toggle.is-active {
  color: var(--morae-brightorange);
}

@media (min-width: 1024px) {
  .current-openings-filter-toggle {
    display: none;
  }
}

/* Collapsible Content */
.current-openings-collapsible {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  border-bottom: 1px solid transparent;
}

.current-openings-collapsible.is-open {
  max-height: 600px;
}

@media (min-width: 1024px) {
  .current-openings-collapsible {
    max-height: none !important;
    overflow: visible;
  }
}

.current-openings-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .current-openings-filters-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.25rem;
    row-gap: 1.25rem;
    margin-top: 2rem;
  }
}

.current-openings-filter-col-location,
.current-openings-filter-col-dept {
  width: 100%;
}

@media (min-width: 1024px) {
  .current-openings-filter-col-location,
  .current-openings-filter-col-dept {
    grid-column: span 3 / span 3;
  }
}

.current-openings-filter-col-search {
  width: 100%;
  height: 100%;
}

@media (min-width: 1024px) {
  .current-openings-filter-col-search {
    grid-column: span 6 / span 6;
  }
}

/* Custom Dropdown / Select Field */
.morae-select-wrapper {
  position: relative;
  width: 100%;
  font-size: var(--morae-typo-sm);
  line-height: 1.5;
}

.morae-select-floating-label {
  position: absolute;
  left: 1em;
  top: 1.1em;
  font-size: 1em;
  line-height: 1.5;
  color: var(--morae-input-placeholder);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  right: 2.6em;
}

.morae-select-wrapper.has-value .morae-select-floating-label,
.morae-select-wrapper.is-open .morae-select-floating-label {
  top: 0.357em;
  font-size: 0.75rem;
  left: 1.15191em;
  right: 3.02376em;
}

.morae-select-box {
  background-color: var(--morae-input-bg);
  position: relative;
  z-index: 0;
  height: 3.5em;
  box-sizing: border-box;
}

.morae-select-box::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.05em;
  background-color: var(--morae-input-border);
  pointer-events: none;
}

.morae-select-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.1em;
  background-color: var(--morae-input-border);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.morae-select-wrapper.is-open .morae-select-box::after,
.morae-select-trigger:focus + .morae-select-box::after {
  transform: scaleX(1);
}

.morae-select-trigger {
  width: 100%;
  height: 3.5em;
  background: transparent;
  border: none;
  font-size: inherit;
  line-height: 1.5;
  padding: 1.375em 2.625em 0.5em 1em;
  color: var(--morae-charcoal-900);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.morae-select-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.morae-select-icon {
  position: absolute;
  top: 50%;
  right: 1em;
  transform: translateY(-50%);
  width: 1.125em;
  height: 1.125em;
  color: var(--morae-charcoal-600);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.morae-select-wrapper.is-open:not(.has-value) .morae-select-icon {
  transform: translateY(-50%) rotate(180deg);
}

.morae-select-wrapper.has-value .morae-select-icon {
  display: none;
}

.morae-select-clear {
  position: absolute;
  top: 0;
  right: 0.4em;
  height: calc(100% - 0.1em);
  background-color: var(--morae-input-bg);
  border: none;
  color: var(--morae-charcoal-600);
  cursor: pointer;
  padding: 0 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: color 0.15s ease;
}

.morae-select-clear svg {
  transform: translateY(0.1em);
  width: 1.125em;
  height: 1.125em;
}

.morae-select-clear:hover {
  color: var(--morae-brightorange);
}

/* Custom Dropdown Menu (Matches Radix / Shadcn UI Select) */
.morae-select-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--morae-input-bg);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  z-index: 50;
  border: none;
  margin-top: 0;
}

.morae-select-wrapper.opens-up .morae-select-menu {
  top: auto;
  bottom: 100%;
}

.morae-select-wrapper.is-open .morae-select-menu {
  display: flex;
  flex-direction: column;
  animation: moraeSelectMenuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes moraeSelectMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.morae-select-viewport {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.morae-select-viewport::-webkit-scrollbar {
  display: none;
}

/* Scroll buttons matching Radix SelectScrollUpButton & SelectScrollDownButton */
.morae-select-scroll-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
  height: 1.5rem;
  background-color: var(--morae-input-bg);
  color: var(--morae-charcoal-700);
  cursor: default;
  user-select: none;
  flex-shrink: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.morae-select-scroll-btn:hover {
  color: var(--morae-charcoal-900);
  background-color: var(--morae-input-hover);
}

.morae-scroll-icon {
  width: 0.8em;
  height: 0.8em;
  display: block;
}

.morae-select-item {
  padding: 0.5em 1em;
  font-size: var(--morae-typo-sm);
  line-height: 1.5;
  font-weight: 400;
  color: var(--morae-input-placeholder);
  background-color: var(--morae-input-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  outline: none;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.morae-select-item:hover {
  background-color: var(--morae-input-hover);
  color: var(--morae-input-foreground);
}

.morae-select-item.is-selected {
  background-color: var(--morae-input-selected);
  color: var(--morae-input-selected-foreground);
}

.morae-select-item .morae-check-icon {
  width: 0.8em;
  height: 0.8em;
  flex-shrink: 0;
  color: currentColor;
}

/* Search Box */
.morae-search-box {
  background-color: var(--morae-input-bg);
  position: relative;
  font-size: var(--morae-typo-sm);
  line-height: 1.5;
  height: 3.5em;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.morae-search-box::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.05em;
  background-color: var(--morae-input-border);
  pointer-events: none;
}

.morae-search-box::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.1em;
  background-color: var(--morae-input-border);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.morae-search-box:focus-within::after {
  transform: scaleX(1);
}

.morae-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--morae-charcoal-600);
  pointer-events: none;
}

.morae-search-input {
  width: calc(100% - 2px);
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 10px 18px 10px 48px;
  font-size: 1em;
  line-height: 1.5;
  color: #262626;
  font-family: inherit;
  box-sizing: border-box;
}

.morae-search-input::placeholder {
  color: var(--morae-input-placeholder);
}

.morae-search-clear {
  position: absolute;
  right: 4px;
  top: 0;
  height: calc(100% - 1px);
  background: var(--morae-input-bg);
  border: none;
  cursor: pointer;
  padding: 8px 20px;
  color: var(--morae-charcoal-600);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.morae-search-clear:hover {
  color: var(--morae-brightorange);
}

/* Openings Listing Section */
.current-openings-list-wrap {
  padding-bottom: 8rem;
}

@media (min-width: 1024px) {
  .current-openings-list-wrap {
    padding-top: 4rem;
  }
}

.current-openings-department-group {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1.25rem;
  column-gap: 1.25rem;
  border-top: 1px solid var(--morae-swirl);
  padding-top: 2rem;
}

@media (min-width: 768px) {
  .current-openings-department-group {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

.current-openings-department-title {
  font-size: clamp(1.125rem, 1.39vw, 1.25rem);
  font-weight: 500;
  color: var(--morae-charcoal-900);
  margin: 0;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .current-openings-department-title {
    grid-column: span 4 / span 4;
    grid-row: 1 / -1;
  }
}

.current-openings-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .current-openings-items-list {
    grid-column: span 8 / span 8;
  }
}

/* Job Item */
.current-openings-job-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  transition: opacity 0.2s ease;
}

@media (min-width: 768px) {
  .current-openings-job-item {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    column-gap: 1.25rem;
    padding-bottom: 3rem;
  }

  .current-openings-job-item.has-border-bottom {
    border-bottom: 1px solid var(--morae-swirl);
  }
}

.current-openings-job-info {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .current-openings-job-info {
    grid-column: span 6 / span 6;
  }
}

@media (min-width: 1024px) {
  .current-openings-job-info {
    grid-column: span 4 / span 4;
  }
}

.current-openings-job-type {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--morae-brightorange);
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.current-openings-job-title {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--morae-charcoal-900);
  margin: 0;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.current-openings-job-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.current-openings-job-location {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--morae-charcoal-700);
  margin: 0;
  transition: color 0.2s ease;
}

.current-openings-job-badge {
  font-size: 0.75rem;
  line-height: 1.2;
  background-color: var(--morae-pampas);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  color: var(--morae-charcoal-700);
}

/* Hover effects matching React: When list is hovered, other items mute slightly, hovered item becomes vivid */
.current-openings-items-list:hover .current-openings-job-item .current-openings-job-type {
  color: var(--morae-charcoal-600);
}

.current-openings-items-list:hover .current-openings-job-item .current-openings-job-title {
  color: var(--morae-charcoal-600);
}

.current-openings-items-list:hover .current-openings-job-item .current-openings-job-location {
  color: var(--morae-charcoal-600);
}

.current-openings-job-item:hover .current-openings-job-type {
  color: var(--morae-accessible-orange) !important;
}

.current-openings-job-item:hover .current-openings-job-title {
  color: var(--morae-charcoal-900) !important;
}

.current-openings-job-item:hover .current-openings-job-location {
  color: var(--morae-charcoal-900) !important;
}

/* Button */
.current-openings-job-action {
  display: flex;
  align-items: flex-start;
  transition: opacity 0.2s ease;
}

@media (min-width: 768px) {
  .current-openings-job-action {
    grid-column: span 2 / span 2;
    justify-content: flex-end;
  }
}

@media (min-width: 1024px) {
  .current-openings-job-action {
    grid-column: span 4 / span 4;
  }
}

.current-openings-items-list:hover .current-openings-job-action {
  opacity: 0;
}

.current-openings-job-item:hover .current-openings-job-action {
  opacity: 1 !important;
}

/* Invisible overlay link for entire card clickability matching React */
.current-openings-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
  background: transparent;
}

.current-openings-apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.67em;
  padding: 0 1em;
  height: 3.3533em;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none !important;
  color: var(--morae-btn-primary-text, #ffffff) !important;
  background-color: var(--morae-btn-primary-bg, var(--morae-accessible-orange));
  border: 0.06em solid var(--morae-btn-primary-border, var(--morae-accessible-orange));
  border-radius: 0;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: all 0.2s ease;
}

.current-openings-apply-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--morae-gradient);
  z-index: -1;
  transition: opacity 0.2s ease;
}

.current-openings-apply-btn:hover::before,
.current-openings-job-item:hover .current-openings-apply-btn::before {
  opacity: 0;
}

.current-openings-apply-btn svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.current-openings-apply-btn:hover svg,
.current-openings-job-item:hover .current-openings-apply-btn svg {
  transform: translateX(3px);
}

/* Empty State */
.current-openings-no-results {
  font-size: 1.125rem;
  color: var(--morae-charcoal-600);
  margin-top: 2rem;
}

@media (min-width: 90rem), (min-width: 1440px) {
  .current-openings-topline {
    font-size: 1.3889vw !important;
    line-height: 1.5 !important;
  }

  .current-openings-heading {
    font-size: 3.2895833vw !important;
    line-height: 1.2 !important;
  }

  .current-openings-summary {
    font-size: 1.875vw !important;
    line-height: 1.5 !important;
  }

  .current-openings-department-title {
    font-size: 1.3889vw !important;
    line-height: 1.5 !important;
  }

  .current-openings-job-title {
    font-size: 2.46806vw !important;
    line-height: 1.4 !important;
  }

  .current-openings-job-type,
  .current-openings-job-badge {
    font-size: 0.964583vw !important;
    line-height: 1.4 !important;
  }

  .current-openings-job-location {
    font-size: 1.15972vw !important;
    line-height: 1.5 !important;
  }

  .current-openings-apply-btn {
    font-size: 1.15972vw !important;
    line-height: 1.5 !important;
  }
}

