/* The blog's two upgrade banners: shared/_blog_tailor_banner (.am-tailor, the upload
   form) and shared/_blog_callout (.am-callout, the follow-up link). Both are dark ink
   blocks so they read as an offer rather than as more article.

   .am-tailor reuses the homepage form's classes (.upload-zone, .hero-job-textarea,
   .hero-tailor-btn) because file-upload.js toggles their state classes
   (.upload-success, .disabled, .hero-field-error) and injects .hero-field-error-msg.
   Those are styled light in resume_builder.css, so every state is re-drawn here for a
   dark ground, scoped under .am-tailor so the homepage is untouched. */

.am-tailor {
  /* An in-page link to #resume-file-matching-form (the jobscan page's closing callout)
     lands with the banner's headline below the sticky site header, not under it. */
  scroll-margin-top: 120px;
  margin: 28px 0;
  padding: 32px 32px 30px;
  border-radius: 16px;
  background: #14130f;
  color: #ffffff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.am-tailor .am-tailor__title {
  margin: 0 0 20px;
  font-size: 26px;
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
}

/* application.css still styles the builder's old layout by the form's id
   (#resume-file-matching-form label / p, specificity 1,0,1), which this form has to
   share with file-upload.js. These win on specificity and undo it. */
.am-tailor #resume-file-matching-form { padding: 0; }
.am-tailor #resume-file-matching-form .am-tailor__drop { display: flex; margin: 0; font-weight: inherit; color: #ffffff; }
.am-tailor #resume-file-matching-form .am-tailor__notice { margin: 10px 0 0; font-size: 13.5px; color: #ffd6cf; }

.am-tailor__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.am-tailor__cell { display: flex; flex-direction: column; min-width: 0; }

/* Drop zone */
.am-tailor .am-tailor__drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  gap: 10px;
  height: 150px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px dashed #6b6862;
  border-radius: 10px;
  background: #1f1d18;
  color: #ffffff;
  text-align: center;
}
.am-tailor .am-tailor__drop:hover { background: #26241e; border-color: #9a968e; }
.am-tailor .am-tailor__drop-icon { width: 22px; height: 22px; color: #f5b700; }
.am-tailor .drop-zone-primary { font-size: 14.5px; line-height: 1.4; font-weight: 500; color: #ffffff; }
.am-tailor .drop-zone-primary .browse,
.am-tailor .drop-zone-primary .drop-zone-link { color: #ffffff; text-decoration: underline; text-underline-offset: 2px; }
.am-tailor .am-tailor__formats { font-size: 12.5px; color: #c9c5bc; }
.am-tailor .hero-drop-spinner { color: #f5b700; }

/* Uploading: the script dims the zone and shows the spinner, but leaves the prompt
   text in place, so the prompt is swapped for "Uploading…" here. */
.am-tailor .am-tailor__drop.disabled { opacity: 0.75; }
.am-tailor .am-tailor__drop.disabled .drop-zone-primary,
.am-tailor .am-tailor__drop.disabled .am-tailor__formats,
.am-tailor .am-tailor__drop.disabled .am-tailor__drop-icon { display: none; }
.am-tailor .am-tailor__drop.disabled::after { content: "Uploading…"; font-size: 14.5px; font-weight: 500; color: #ffffff; }

/* Attached: the script writes "✓ filename  Change" into the prompt and hides the icon. */
.am-tailor .am-tailor__drop.upload-success { border-style: solid; border-color: #4c7a57; background: #17211a; }
.am-tailor .am-tailor__drop.upload-success .drop-zone-primary { color: #ffffff; font-weight: 500; }
.am-tailor .am-tailor__drop.upload-success .drop-zone-primary strong { font-weight: 600; }
.am-tailor .am-tailor__drop.upload-success .drop-zone-link { color: #c9c5bc; }
.am-tailor .am-tailor__drop.upload-success .am-tailor__formats { display: none; }

/* Job ad */
.am-tailor .am-tailor__ad {
  height: 150px;
  min-height: 150px;
  padding: 14px 16px;
  border: 1.5px solid #6b6862;
  border-radius: 10px;
  background: #1f1d18;
  color: #ffffff;
  font-size: 14.5px;
  line-height: 1.5;
  resize: none;
}
.am-tailor .am-tailor__ad::placeholder { color: #c9c5bc; }
.am-tailor .am-tailor__ad:focus { border-color: #f5b700; box-shadow: 0 0 0 4px rgba(245, 183, 0, 0.15); }

/* Missing fields on submit */
.am-tailor .am-tailor__drop.hero-field-error,
.am-tailor .am-tailor__ad.hero-field-error { border-color: #e8735f; background: #261815; }
.am-tailor .hero-field-error-msg { margin: 8px 2px 0; font-size: 13px; font-weight: 500; color: #ff9b8a; }

/* File could not be read / upload failed */
.am-tailor .am-tailor__notice {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #5e3027;
  border-radius: 10px;
  background: #2a1a16;
  font-size: 13.5px;
  line-height: 1.45;
  color: #ffd6cf;
}

/* Button */
.am-tailor .am-tailor__submit {
  width: 100%;
  height: 56px;
  margin-top: 20px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: #f5b700;
  color: #1a1502;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 20px -8px rgba(245, 183, 0, 0.55);
}
.am-tailor .am-tailor__submit:hover { background: #ffc524; color: #1a1502; }
.am-tailor .am-tailor__submit:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.am-tailor .am-tailor__submit:disabled { background: #c99a12; color: #1a1502; cursor: default; box-shadow: none; }

@media (max-width: 640px) {
  .am-tailor { padding: 24px 18px 20px; }
  .am-tailor .am-tailor__title { font-size: 22px; }
  .am-tailor__grid { grid-template-columns: 1fr; }
  .am-tailor .am-tailor__drop { height: 120px; }
  .am-tailor .am-tailor__ad { height: 120px; min-height: 120px; }
}

/* ─── Follow-up callout ─────────────────────────────── */
.am-callout {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 28px 0;
  padding: 14px 14px 14px 18px;
  border-radius: 16px;
  background: #14130f;
  box-shadow: 0 14px 30px -14px rgba(20, 19, 15, 0.55);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.am-callout__art { position: relative; flex: none; width: 104px; height: 72px; }
.am-callout__sheet {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e2dccb;
}
.am-callout__sheet--ad { left: 0; top: 6px; width: 46px; height: 60px; padding: 8px 7px; transform: rotate(-6deg); }
.am-callout__sheet--resume { right: 0; top: 0; width: 52px; height: 70px; padding: 9px 8px; transform: rotate(4deg); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.6); }
.am-callout__bar { display: block; height: 3px; width: 90%; border-radius: 2px; background: #e9e4d6; }
.am-callout__bar--head { height: 4px; width: 75%; background: #14130f; }
.am-callout__bar--short { width: 65%; }
.am-callout__bar--hit { background: #f5b700; }
.am-callout__row { display: flex; gap: 2px; }
.am-callout__row .am-callout__bar { width: 45%; }
.am-callout__arrow {
  position: absolute; left: 36px; top: 26px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #f5b700; color: #1a1502;
}
.am-callout__arrow svg { width: 11px; height: 11px; }

.am-callout .am-callout__copy { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
.am-callout__title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; color: #ffffff; }
.am-callout__sub { font-size: 14px; line-height: 1.45; color: #c9c5bc; }

/* Its own colours win over the article's link rules and resume_builder.css's
   !important gold hover, whose :is() exclusion list carries this class. */
.am-callout .am-callout__btn,
.am-callout .am-callout__btn:hover,
.am-callout .am-callout__btn:focus {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  background: #f5b700;
  color: #1a1502;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.am-callout .am-callout__btn:hover { background: #ffc524; }
.am-callout .am-callout__btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.am-callout__btn svg { width: 15px; height: 15px; }

@media (max-width: 640px) {
  .am-callout { flex-wrap: wrap; gap: 14px; padding: 16px; }
  .am-callout__art { width: 84px; height: 60px; }
  .am-callout__sheet--ad { width: 38px; height: 50px; }
  .am-callout__sheet--resume { width: 44px; height: 58px; }
  .am-callout__arrow { left: 28px; top: 20px; }
  .am-callout .am-callout__copy { flex-basis: calc(100% - 104px); }
  .am-callout .am-callout__btn,
  .am-callout .am-callout__btn:hover,
  .am-callout .am-callout__btn:focus { width: 100%; justify-content: center; }
}

/* The cover letter articles' banner (shared/_blog_cover_letter_banner): the same block,
   posting to the free generator. Its file input stays in the layout but invisible, not
   display:none, so the browser can still point at it when "required" refuses a submit. */
.am-letter .am-letter__file {
  position: absolute;
  width: 1px;
  height: 1px;
  bottom: 12px;
  left: 50%;
  opacity: 0;
  pointer-events: none;
}
.am-letter .am-letter__fine {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #c9c5bc;
  text-align: center;
}
.am-letter .am-tailor__drop.upload-success .am-tailor__drop-icon { display: none; }
