/* Create-resume form (Dutch and English): partials/create-resume-form.php

   Everything for the form is scoped to #create-resume-form, so it never changes other parts of the
   page (the old file had page-wide rules for input, select, p, hr and h3). Labels and texts get
   their own colours with !important where the theme colours every form label teal. */

#create-resume-form {
  --hdt-teal: #008699;
  --hdt-teal-dark: #007684;
  --hdt-teal-soft: #f2f9fa;
  --hdt-line: #d9e6e8;
  --hdt-text: #2b2f33;
  --hdt-muted: #5f6b70;
  --hdt-error: #c0392b;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--hdt-text);
}

#create-resume-form p {
  padding-bottom: 0;
}

/* The title above the form ("Maak hier je CV!") lines up with the form */
h2:has(+ #create-resume-form) {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

#flavor-text-p {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.55;
}

/* ---- Consent ---- */
#create-resume-form .consent-box {
  margin: 0 0 22px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--hdt-teal-soft);
  border: 1px solid var(--hdt-line);
}

#create-resume-form .consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: normal !important;
  color: var(--hdt-text) !important;
  cursor: pointer;
  margin: 0;
}

#create-resume-form .consent-label span,
#create-resume-form .consent-label a {
  font-size: inherit !important;
  line-height: inherit !important;
}

#create-resume-form .consent-label span {
  color: inherit !important;
}

#create-resume-form .consent-label input[type="checkbox"] {
  flex: none;
  margin-top: 2px;
}

/* Shown when the visitor tries to upload or submit without ticking the box */
#create-resume-form .consent-box.needs-consent {
  border-color: var(--hdt-error);
  background: #fdf3f2;
}

#create-resume-form .consent-box.needs-consent .consent-label {
  color: var(--hdt-error) !important;
}

/* ---- Cards ---- */
#create-resume-form .border-div {
  background: #fff;
  border: 1px solid var(--hdt-line);
  border-radius: 16px;
  padding: 24px;
  margin: 0 0 24px;
  box-shadow:
    0 1px 2px rgba(16, 40, 48, 0.04),
    0 4px 16px rgba(16, 40, 48, 0.05);
}

#create-resume-form .border-div hr {
  display: none; /* spacing instead of lines */
}

#create-resume-form .border-div h3 {
  margin: 0 0 6px;
  padding: 0;
  font-size: 20px;
  line-height: 1.3;
}

#create-resume-form .border-div > p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hdt-muted);
}

/* Numbered sections: 1 Personalia, 2 Werkervaring, ... */
#create-resume-form {
  counter-reset: hdt-section;
}

#create-resume-form .form-section > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
}

#create-resume-form .form-section > h3::before {
  counter-increment: hdt-section;
  content: counter(hdt-section);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hdt-teal);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

#create-resume-form .form-section > p {
  margin-left: 42px; /* lines up with the heading text, next to the number */
}

#create-resume-form .form-section > h3 + hr + #personal-info-div {
  margin-top: 18px;
}

/* ---- Import card ---- */
#create-resume-form .import-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--hdt-teal-soft);
  border: 1px dashed #8cc9d1;
  box-shadow: none;
}

#create-resume-form .import-card__icon {
  flex: none;
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--hdt-teal);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#create-resume-form .import-card__body {
  flex: 1;
  min-width: 0;
}

#create-resume-form .import-card__body h3 {
  margin-bottom: 6px;
}

#create-resume-form .import-card__body p:not(#importResumeStatus) {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hdt-muted);
}

#create-resume-form .import-resume-btn {
  margin-top: 12px;
}

#importResumeStatus {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--hdt-muted, #666);
}

#importResumeStatus:empty {
  display: none;
}

#importResumeStatus.error {
  color: #c0392b;
}

#importResumeStatus.success {
  color: #1e8449;
}

/* ---- Required fields ---- */
#create-resume-form .required-legend {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--hdt-muted);
}

#create-resume-form .required {
  color: var(--hdt-error);
  font-weight: bold;
}

/* ---- Labels and fields ---- */
#create-resume-form .input-group > label,
#create-resume-form .checkbox-div,
#create-resume-form .checkbox-label {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--hdt-text) !important;
  margin: 0 0 6px;
  line-height: 1.3;
}

#create-resume-form .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-weight: normal !important;
  cursor: pointer;
}

#create-resume-form input[type="text"],
#create-resume-form input[type="email"],
#create-resume-form input[type="tel"],
#create-resume-form select {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 14px !important;
  border: 1px solid #cfd8dc !important;
  border-radius: 10px !important;
  background-color: #fff;
  font-size: 15px;
  color: var(--hdt-text);
  box-shadow: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

#create-resume-form select {
  cursor: pointer;
}

#create-resume-form input[type="text"]:focus,
#create-resume-form input[type="email"]:focus,
#create-resume-form input[type="tel"]:focus,
#create-resume-form select:focus {
  outline: none;
  border-color: var(--hdt-teal) !important;
  box-shadow: 0 0 0 3px rgba(0, 134, 153, 0.15);
}

#create-resume-form input::placeholder {
  color: #9aa5aa;
}

/* "Tot" field of a current job (checkbox unticked): clearly switched off */
#create-resume-form input:disabled {
  background-color: #f3f5f6 !important;
  border-style: dashed !important;
  cursor: not-allowed;
}

#create-resume-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--hdt-teal);
  cursor: pointer;
}

#create-resume-form .input-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

#create-resume-form .input-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

#personal-info-div {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* "Tot" label with its checkbox, on the same line as the "Van" label */
#create-resume-form .checkbox-div {
  display: flex;
  align-items: center;
  gap: 8px;
}

#create-resume-form .date-group {
  max-width: 170px;
  flex-basis: 100%;
}

#create-resume-form .languages-group {
  max-width: 320px;
}

/* Shown when the AI 'about me' is ticked but the form has nothing to base it on */
#create-resume-form .about-me-hint {
  color: var(--hdt-error);
  font-size: 13px;
  margin: 6px 0 0;
}

/* ---- Text editors (Quill) ---- */
#create-resume-form .ql-toolbar.ql-snow {
  border: 1px solid #cfd8dc;
  border-bottom-color: #e3e9eb;
  border-radius: 10px 10px 0 0;
  background: #fafcfc;
  padding: 6px 8px;
}

#create-resume-form .ql-container.ql-snow {
  border: 1px solid #cfd8dc;
  border-top: none;
  border-radius: 0 0 10px 10px;
  resize: vertical;
  overflow-y: auto;
  min-height: 130px;
  padding-bottom: 5px;
}

#create-resume-form .ql-container.ql-snow:focus-within {
  border-color: var(--hdt-teal);
  box-shadow: 0 3px 0 0 rgba(0, 134, 153, 0.15);
}

/* Quill's font settings like the rest of the form */
#create-resume-form .ql-editor,
#create-resume-form .ql-editor *,
#create-resume-form .ql-editor p,
#create-resume-form .ql-editor strong,
#create-resume-form .ql-editor em,
#create-resume-form .ql-editor li {
  font-size: 15px !important;
  font-family: inherit !important;
  line-height: 1.5 !important;
}

#create-resume-form .ql-editor {
  min-height: 100%;
}

#create-resume-form .ql-editor.ql-blank::before {
  font-style: normal;
  color: #9aa5aa;
}

/* ---- Repeatable blocks (work, education, skills, languages) ---- */
#skillsContainer,
#workExperienceContainer,
#studiesContainer,
#languagesContainer {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* A second, third ... block: separated by a thin line */
#create-resume-form .repeater-item + .repeater-item {
  border-top: 1px solid #e6eef0;
  padding-top: 18px;
  margin-top: 6px;
}

#studiesTemplate,
#languagesTemplate {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#create-resume-form .button-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
}

/* Labelled buttons: "+ Werkervaring toevoegen" / "− Verwijderen" */
#create-resume-form .add-btn.has-text,
#create-resume-form .remove-btn.has-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: auto;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

#create-resume-form .add-btn.has-text {
  background: #fff;
  color: var(--hdt-teal);
  border: 1px solid var(--hdt-teal);
}

#create-resume-form .add-btn.has-text:hover {
  background: var(--hdt-teal);
  color: #fff;
}

#create-resume-form .remove-btn.has-text {
  background: #fff;
  color: var(--hdt-muted);
  border: 1px solid #cfd8dc;
}

#create-resume-form .remove-btn.has-text:hover {
  color: var(--hdt-error);
  border-color: var(--hdt-error);
}

#create-resume-form .has-text span {
  font-size: 17px;
  line-height: 1;
}

/* Skills: compact round buttons next to the field */
#skillsContainer {
  max-width: 520px;
}

#skillsTemplate {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 10px;
}

#skillsTemplate + .repeater-item,
#skillsContainer .repeater-item + .repeater-item {
  border-top: none;
  padding-top: 0;
  margin-top: 10px;
}

#skillsContainer .repeater-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

#skillsContainer .button-group {
  margin: 0;
  flex-wrap: nowrap;
}

#create-resume-form .add-btn:not(.has-text),
#create-resume-form .remove-btn:not(.has-text) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  background: #fff;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

#create-resume-form .add-btn:not(.has-text) {
  color: var(--hdt-teal);
  border: 1px solid var(--hdt-teal);
}

#create-resume-form .add-btn:not(.has-text):hover {
  background: var(--hdt-teal);
  color: #fff;
}

#create-resume-form .remove-btn:not(.has-text) {
  color: var(--hdt-muted);
  border: 1px solid #cfd8dc;
}

#create-resume-form .remove-btn:not(.has-text):hover {
  color: var(--hdt-error);
  border-color: var(--hdt-error);
}

/* The script shows the remove button (style="visibility: visible") only when there is more than one
   block. A hidden one takes no room at all: otherwise it pushed an empty line under "+ Toevoegen" on
   phones. */
#create-resume-form .remove-btn:not([style*="visible"]) {
  display: none !important;
}

#create-resume-form .add-btn:focus-visible,
#create-resume-form .remove-btn:focus-visible,
#create-resume-form .import-resume-btn:focus-visible,
#submit-btn:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

/* ---- Buttons ---- */
#create-resume-form .import-resume-btn {
  background-color: var(--hdt-teal);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.3s;
}

#create-resume-form .import-resume-btn:hover:not(:disabled) {
  background-color: var(--hdt-teal-dark);
}

#create-resume-form .import-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#create-resume-form .import-resume-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* While the CV is being read: a small spinner before the text, and the button stays fully coloured */
#create-resume-form .import-resume-btn.is-loading {
  opacity: 1;
}

#create-resume-form .import-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

#create-resume-form .import-resume-btn.is-loading .import-spinner {
  display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
  #create-resume-form .import-spinner {
    animation-duration: 2s;
  }
}

#create-resume-form .form-actions {
  display: flex;
  justify-content: center;
  margin: 8px 0 0;
}

#submit-btn {
  background-color: #008699;
  color: #fff;
  border: none;
  padding: 15px 44px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 134, 153, 0.25);
  transition:
    background-color 0.3s,
    transform 0.15s;
}

#submit-btn:hover:not(:disabled) {
  background-color: #007684;
  transform: translateY(-1px);
}

#submit-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ---- Undo bar after removing a work experience or education ("Ongedaan maken") ---- */
.hdt-undo-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 32px);
  box-sizing: border-box;
  padding: 12px 14px 12px 18px;
  border-radius: 12px;
  background: #22303a;
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: hdt-undo-in 0.2s ease-out;
}

.hdt-undo-bar[hidden] {
  display: none;
}

/* The message takes the free space and may wrap; the button never wraps */
.hdt-undo-bar__text {
  flex: 1 1 auto;
  min-width: 0;
}

/* The bar sits at the end of the page, outside the form, so the theme's general button styling
   (bigger font, padding, margins, uppercase) reached this button and made it stick out of the bar
   on phones. "body .hdt-undo-bar" + !important on the size-related properties keeps it as designed. */
body .hdt-undo-bar .hdt-undo-bar__btn {
  flex: none;
  margin: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  background: transparent !important;
  color: #7fd6e0 !important;
  border: 1px solid #7fd6e0 !important;
  border-radius: 50px !important;
  padding: 6px 14px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: nowrap;
  box-shadow: none !important;
  cursor: pointer;
}

body .hdt-undo-bar .hdt-undo-bar__btn:hover {
  background: #7fd6e0 !important;
  color: #22303a !important;
}

.hdt-undo-bar__btn:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

@keyframes hdt-undo-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hdt-undo-bar {
    animation: none;
  }
}

/* Phones: above the round chat button in the bottom-right corner, the full width minus 16px on
   each side, so message and button always fit next to each other */
@media (max-width: 600px) {
  .hdt-undo-bar {
    bottom: 96px;
    width: calc(100% - 32px);
    gap: 12px;
    padding: 10px 10px 10px 16px;
    font-size: 14px;
  }

  body .hdt-undo-bar .hdt-undo-bar__btn {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
}

/* ---- Smaller screens ---- */
@media only screen and (max-width: 1200px) {
  #create-resume-form .input-group {
    flex: 1 1 45%;
  }

  #create-resume-form .date-group {
    flex: 1 1 140px;
    max-width: none;
  }
}

@media only screen and (max-width: 768px) {
  #create-resume-form .border-div {
    padding: 18px 16px;
    border-radius: 14px;
  }

  #create-resume-form .input-group {
    flex: 1 1 100%;
  }

  #create-resume-form .date-group {
    flex: 1 1 40%;
  }

  #create-resume-form .form-section > p {
    margin-left: 0;
  }

  #create-resume-form .import-card {
    flex-direction: column;
    gap: 10px;
  }

  #create-resume-form .import-card__icon {
    width: 36px;
    height: 36px;
  }

  #submit-btn {
    width: 100%;
  }
}

#create-resume-form {
  transition: opacity 0.7s ease !important;
  position: relative !important;
  z-index: 2 !important;
}

#loading-spinner,
#resume-viewer {
  position: relative !important;
  z-index: 1 !important;
}

#loading-spinner {
  transition: opacity 0.7s ease !important;
  text-align: center !important;
  margin-top: 0 !important;
}

/* Loading animation (pure CSS, replaces ai-loading.gif): two rings turning in opposite directions
   around a pulsing "AI spark", in the Headit teal. Same 180 x 180 px box as the old GIF. */
.hdt-ai-loader {
  position: relative !important;
  display: block !important;
  width: 180px !important;
  height: 180px !important;
  margin: 0 auto !important;
}

/* faint full circle behind the outer ring */
.hdt-ai-loader::before {
  content: "" !important;
  position: absolute !important;
  inset: 30px !important;
  border-radius: 50% !important;
  border: 6px solid rgba(0, 134, 153, 0.12) !important;
}

.hdt-ai-loader__ring {
  position: absolute !important;
  border-radius: 50% !important;
  border: 6px solid transparent !important;
}

.hdt-ai-loader__ring--outer {
  inset: 30px !important;
  border-top-color: #008699 !important;
  border-right-color: #008699 !important;
  animation: hdt-ai-spin 2s cubic-bezier(0.5, 0.15, 0.5, 0.85) infinite !important;
}

.hdt-ai-loader__ring--inner {
  inset: 48px !important;
  border-bottom-color: #5bc3cf !important;
  border-left-color: #5bc3cf !important;
  animation: hdt-ai-spin 1.4s linear infinite reverse !important;
}

/* four-pointed star in the middle */
.hdt-ai-loader__spark {
  position: absolute !important;
  inset: 72px !important;
  background: #008699 !important;
  clip-path: polygon(
    50% 0%,
    61% 39%,
    100% 50%,
    61% 61%,
    50% 100%,
    39% 61%,
    0% 50%,
    39% 39%
  ) !important;
  animation: hdt-ai-pulse 2s ease-in-out infinite !important;
}

@keyframes hdt-ai-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hdt-ai-pulse {
  0%,
  100% {
    transform: scale(0.75) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1) rotate(45deg);
    opacity: 1;
  }
}

/* Visitors who asked their device for less motion: slower rings, no pulsing */
@media (prefers-reduced-motion: reduce) {
  .hdt-ai-loader__ring--outer {
    animation-duration: 4.2s !important;
  }
  .hdt-ai-loader__ring--inner {
    animation-duration: 3.4s !important;
  }
  .hdt-ai-loader__spark {
    animation: none !important;
  }
}

#loading-spinner-text {
  margin-top: 0 !important;
  line-height: 1.2 !important;
  /* tighter vertical rhythm */
  text-align: center !important;
  font-size: 16px !important;
  color: #666666 !important;
}

#status,
#viewer-status {
  margin-top: 10px;
  color: red;
}

#viewer-status:empty {
  display: none;
}

@media only screen and (max-width: 1200px) {
  .input-group {
    flex: 1 1 48%;
  }

  .date-group {
    flex: 1 1 100%;
    margin-bottom: 12px;
  }
}

@media only screen and (max-width: 768px) {
  .input-group {
    flex: 1 1 100%;
  }
}

#resume-viewer {
  display: none;
  text-align: center;
  transition: opacity 0.7s ease;
}

#resume-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  gap: 15px;
  flex-wrap: wrap;
}

/* Ensure the right group stays together */
.header-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  #resume-header {
    flex-direction: column;
    gap: 15px;
  }

  .header-right {
    justify-content: center;
    width: 100%;
  }

  .header-right button {
    width: 100%;
    /* Full width buttons on mobile */
    max-width: 320px;
  }
}

/* Button base style */
#resume-header button {
  background-color: #008699;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 50px;
  /* matches your rounded look */
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 0.3s;
  white-space: nowrap;
}

#resume-header button:hover {
  background-color: #007684;
}

/* Align each button for desktop */
#back-to-form-btn {
  justify-self: start;
}

#download-resume-btn {
  justify-self: center;
}

#match-resume-btn {
  justify-self: end;
}

#match-resume-btn.loading {
  display: flex;
  align-items: center;
  justify-content: center;
}

#match-resume-btn .loading-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
  margin: 0;
}

/* Hide/show logic using a class */
#match-resume-btn.loading .button-text {
  display: none;
}

#match-resume-btn.loading .loading-spinner {
  display: inline-block;
}

/* Default hidden if not loading */
#match-resume-btn .loading-spinner {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Responsiveness of buttons above the embedded pdf ---- */
@media (max-width: 900px) {
  #resume-header {
    flex-direction: column;
    gap: 15px;
    padding: 20px 10px;
  }

  .header-left {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .header-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    justify-content: center;
  }

  #resume-header button {
    width: 100%;
    max-width: 350px;
    margin: 0;
  }
}

@media (max-width: 420px) {
  #match-resume-btn {
    position: relative;
    display: inline-flex;
    /* ensure ::after is centered */
    align-items: center;
    justify-content: center;
    color: transparent !important;
    /* hide original text completely */
  }

  #match-resume-btn::after {
    content: attr(data-short-label);
    position: absolute;
    color: white;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
  }

  #match-resume-btn.loading::after {
    content: none;
  }
}

#pdf-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: #f8f8f8;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: visible !important;
  /* Let it expand naturally */
  height: auto !important;
  text-align: center !important;
  display: block !important;
}

#pdf-container canvas {
  display: block !important;
  margin: 0 auto 12px auto !important;
  max-width: 100% !important;
  height: auto !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
  border-radius: 4px !important;
}

/* ---- Limits (see the constants at the top of js/create-resume.js) ---- */
/* Counter under a text editor, from 75% of the maximum */
#create-resume-form .rich-counter {
  margin-top: 6px;
  font-size: 12px;
  color: var(--hdt-muted);
  text-align: right;
}

#create-resume-form .rich-counter.is-full {
  color: var(--hdt-error);
}

#create-resume-form .rich-counter[hidden],
#create-resume-form .repeater-max-note[hidden] {
  display: none;
}

/* "You can add up to 50 skills." under a section that is full */
#create-resume-form .repeater-max-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--hdt-muted);
}

#create-resume-form .add-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
