/* Job apply panel (careers single): red, 580px tall, centred 48px question, 15px note, outline pill. */
.tc-w-japply {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 580px;
  /* padding-top: 96px; */
  /* padding-bottom: 96px; */
  padding: 0 !important;
  background: #f44349;
  color: #262626;
}

.tc-w-japply__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.tc-w-japply--align-left .tc-w-japply__inner {
  align-items: flex-start;
  text-align: left;
}

.tc-w-japply--align-right .tc-w-japply__inner {
  align-items: flex-end;
  text-align: right;
}

.tc-w-japply__title {
  margin: 0;
  max-width: 888px;
}

.tc-w-japply__text {
  max-width: 546px;
}

.tc-w-japply__text > * {
  margin: 0;
}

.tc-w-japply__text > * + * {
  margin-top: 12px;
}

.tc-w-japply__text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Normal state stays below Style → Button; on red the hover turns charcoal (Contact CTA rollover). */
.tc-w-japply__shell {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: inherit;
}

.tc-w-japply.has-form {
  overflow: hidden;
}

.tc-w-japply.has-form.is-open {
  background: #262626;
}

button.tc-w-japply__btn {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.tc-w-japply :where(.tc-w-japply__btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border: 1px solid #262626;
  border-radius: 999px;
  background: transparent;
  color: #262626;
  text-decoration: none;
  transform-origin: center;
  transition: transform 180ms ease-out, background 180ms, color 180ms, border-color 180ms;
}

.tc-w-japply :where(.tc-w-japply__btn:is(:hover, :focus-visible)) {
  transform: scale(1.05);
  background: #262626;
  border-color: #262626;
  color: #fff9f5;
}

/* Tablet and mobile layouts for this widget. */
@media (max-width: 900px) {
  .tc-w-japply { min-height: 460px; padding-top: 72px; padding-bottom: 72px; }
}

@media (max-width: 600px) {
  .tc-w-japply { min-height: 360px; padding-top: 56px; padding-bottom: 56px; }

  .tc-w-japply__inner { gap: 18px; }
}

@media (max-width: 767px) {
  .tc-w-japply__title br { display: none; }

  body.tc-japply-open .tc-w-footer {
    display: none;
  }

  /* Open form joins the page instead of scrolling inside the red panel. */
  .tc-w-japply.has-form.is-open,
  .tc-w-japply.has-form.is-open .tc-w-japply__shell {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .tc-w-japply.is-open .tc-w-japply__inner {
    position: absolute;
    width: 100%;
    height: 0;
    overflow: hidden;
    visibility: hidden;
  }

  .tc-w-japply.is-open .tc-w-japply__form {
    position: relative;
    inset: auto;
    height: auto;
    overflow: visible;
    transform: none;
  }
}

/* Apply opens the chosen Elementor form over the red panel. Field rows come from common.css (.tc-form-embed--themed). */
.tc-w-japply__form {
  position: absolute;
  inset: 0;
  z-index: 5;
  box-sizing: border-box;
  margin: 0;
  padding: 48px max(48px, calc((100% - 1440px) / 2 + 48px));
  overflow-y: auto;
  background: #262626;
  color: #fff9f5;
  --tc-embed-ink: #fff9f5;
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.8s cubic-bezier(0.45, 0, 0.55, 1),
    visibility 0s 0.8s;
}

.tc-w-japply.is-open .tc-w-japply__form {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 0.8s cubic-bezier(0.45, 0, 0.55, 1),
    visibility 0s;
}

.tc-w-japply__close {
  position: absolute;
  top: 20px;
  right: max(48px, calc((100% - 1440px) / 2 + 48px));
  z-index: 2;
  width: 44px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff9f5;
  cursor: pointer;
}

.tc-w-japply__close-icon {
  display: block;
  width: 22px;
  height: 14px;
}

.tc-w-japply__fields {
  width: min(888px, 100%);
  margin: 24px auto 0;
  padding-top: 16px;
  text-align: left;
}

/* CV row: hide the browser “Choose file” button. The input stays, so a click still opens the picker. */
.tc-w-japply__form .tc-form-embed--themed .elementor-field-group input[type="file"].elementor-field {
  color: inherit;
  opacity: var(--tc-embed-ph-opacity, 0.5);
  cursor: pointer;
}

.tc-w-japply__form .tc-form-embed--themed .elementor-field-group input[type="file"].elementor-field.is-filled {
  opacity: 1;
}

.tc-w-japply__form input[type="file"].elementor-field::file-selector-button,
.tc-w-japply__form input[type="file"].elementor-field::-webkit-file-upload-button {
  display: none !important;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
}

.tc-w-japply__form .tc-w-japply__file-clear {
  flex: none;
  align-self: flex-end;
  margin: 0 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff9f5;
  font: inherit;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: -0.06em;
  text-transform: capitalize;
  cursor: pointer;
}

.tc-w-japply__form .tc-w-japply__file-clear[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .tc-w-japply__form {
    padding-left: 24px;
    padding-right: 24px;
  }

  .tc-w-japply__close {
    right: 24px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .tc-w-japply__form,
  .tc-w-japply.is-open .tc-w-japply__form {
    transition: none;
  }
}
