/* Apply online (apply.php). Builds on the .field / .form__foot styles in styles.css. */

[hidden] {
  display: none !important;
}

.apply {
  display: grid;
  gap: 40px;
}

.apply__details {
  display: grid;
  gap: 40px;
}

.apply__step {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.apply__step legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 0;
  color: var(--ink);
  font-size: 1.3125rem;
  font-stretch: 105%;
  font-weight: 700;
}

.apply__step legend small {
  color: var(--graphite);
  font-size: .875rem;
  font-weight: 400;
}

.apply__num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--white);
  background: var(--blue);
  border-radius: 50%;
  font-size: .9375rem;
}

.apply__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}

.apply__grid--job {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, .5fr) minmax(0, 1fr);
}

.apply__job + .apply__job {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.apply__job h3 {
  margin: 0 0 14px;
  color: var(--graphite);
  font-size: .9375rem;
  font-weight: 600;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 44px 24px 40px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--cyan-wash) 0%, rgba(220, 240, 250, 0) 70%),
    var(--white);
  border: 2px dashed #b7c7d4;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s;
}

.dropzone:hover {
  border-color: var(--blue);
  box-shadow: 0 10px 30px -18px rgba(0, 90, 150, .45);
}

.dropzone.is-dragover {
  background: var(--cyan-wash);
  border-color: var(--blue);
  border-style: solid;
  transform: scale(1.01);
}

.dropzone:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 114, 189, .18);
}

/* The real input stays in the tree for keyboard and screen-reader users. */
.dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone__icon {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 16px;
  color: var(--blue);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 6px 18px -10px rgba(15, 39, 64, .35);
  transition: transform .2s, color .2s, background-color .2s;
}

.dropzone:hover .dropzone__icon,
.dropzone.is-dragover .dropzone__icon {
  transform: translateY(-3px);
}

.dropzone__text {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.dropzone__text strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.25rem;
  font-stretch: 105%;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone__text span {
  color: var(--graphite);
  font-size: .9375rem;
}

.dropzone__button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 22px;
  color: var(--white);
  background: var(--blue);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  transition: background-color .15s;
}

.dropzone:hover .dropzone__button {
  background: var(--blue-deep);
}

.dropzone__trust {
  margin: 12px 0 0;
  color: var(--graphite);
  font-size: .8125rem;
  text-align: center;
}

/* Once a file is chosen: a compact row with the file and a quiet "Replace". */
.dropzone.has-file {
  flex-direction: row;
  gap: 18px;
  padding: 20px 22px;
  text-align: left;
  background: var(--white);
  border-style: solid;
  border-color: var(--line);
  border-left: 4px solid var(--blue);
}

.dropzone.has-file .dropzone__icon {
  width: 48px;
  height: 48px;
  padding: 12px;
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
  transform: none;
}

.dropzone.has-file .dropzone__text {
  flex: 1;
}

.dropzone.has-file .dropzone__text strong {
  font-size: 1.0625rem;
}

.dropzone.has-file .dropzone__button {
  margin: 0 0 0 auto;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--blue);
}

.dropzone.has-file:hover .dropzone__button {
  color: var(--blue-deep);
  background: var(--cyan-wash);
}

.dropzone.is-busy {
  cursor: progress;
}

.dropzone.is-busy .dropzone__icon {
  animation: apply-pulse 1.2s ease-in-out infinite;
}

@keyframes apply-pulse {
  50% { opacity: .45; }
}

@media (max-width: 540px) {
  .dropzone.has-file {
    flex-wrap: wrap;
  }
  .dropzone.has-file .dropzone__button {
    margin-left: 66px;
  }
}

.apply__status {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  background: var(--cyan-wash);
  color: var(--ink);
  font-size: .9375rem;
}

.apply__status[data-tone="error"] {
  color: #8c1d18;
  background: #fbeceb;
  border-left-color: #b3261e;
}

.apply__status[data-tone="busy"]::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border: 2px solid var(--blue);
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: apply-spin .8s linear infinite;
}

@keyframes apply-spin {
  to { transform: rotate(360deg); }
}

.apply__note {
  margin: -6px 0 20px;
  color: var(--graphite);
  font-size: .875rem;
}

.apply__note::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  background: var(--cyan-wash);
  border: 1px solid var(--cyan);
}

.field .is-prefilled {
  background-color: var(--cyan-wash);
  border-color: var(--cyan);
}

.apply__consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--text);
  font-size: .9375rem;
}

.apply__consent input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

@media (max-width: 960px) {
  .apply__grid--job {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .apply__grid,
  .apply__grid--job {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* "You're applying for ..." when arriving from a job page (job.php). */
.page-head .apply__for {
  max-width: 40em;
  margin: 20px 0 0;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--cyan-wash);
  border-left: 3px solid var(--blue);
}

.apply__for a {
  color: var(--blue-deep);
  font-weight: 600;
}
