/* Fixed artwork CV: the supplied 1046 × 1504 reference is the visual base. */
@font-face {
  font-family: "Waisal CV Tajawal";
  src: url("../../web-assets/fonts/Tajawal-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
}

.cv-profile-export,
.waisal-cv,
.waisal-cv * {
  box-sizing: border-box;
}

.cv-profile-export {
  --cv-scale: 1;
  width: 1046px;
  flex: 0 0 1046px;
  margin: 0 auto;
  overflow: visible;
  border: 0;
  background: #fff;
  box-shadow: 0 18px 50px rgba(6, 48, 118, .14);
  line-height: normal;
  transform: scale(var(--cv-scale));
  transform-origin: top center;
}

.waisal-cv,
.waisal-cv * {
  font-family: "Waisal CV Tajawal", Arial, sans-serif !important;
}

.waisal-cv--reference {
  position: relative;
  width: 1046px;
  height: 1504px;
  overflow: hidden;
  background-color: #fff;
  background-image: none;
  background-repeat: no-repeat;
  background-position: top left;
  background-size: 1046px 1504px;
  color: #071f62;
}

/* The reference includes the full frame, labels, icons and decoration.
   Only live worker data is drawn on top of its matching positions. */
.waisal-cv__photos,
.waisal-cv__personal-section,
.waisal-cv__employment-section,
.waisal-cv__skills-section {
  position: absolute;
  z-index: 1;
}

.waisal-cv__photos {
  inset: 0;
  pointer-events: none;
}

.waisal-cv__portrait-frame {
  position: absolute;
  top: 190px;
  left: 55px;
  display: block;
  width: 234px;
  height: 234px;
  padding: 16px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
}

.waisal-cv__portrait-frame::before,
.waisal-cv__portrait-frame::after {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.waisal-cv__portrait-frame::before {
  inset: 0;
  border: 4px solid #cf9f50;
}

.waisal-cv__portrait-frame::after {
  inset: 8px;
  border: 4px solid #0a347d;
}

.waisal-cv__full-photo-frame {
  position: absolute;
  top: 476px;
  left: 40px;
  width: 270px;
  height: 594px;
  overflow: hidden;
  border-radius: 18px;
  background: #f5f6f3;
}

.waisal-cv__portrait,
.waisal-cv__full-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.waisal-cv__photo-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 35%, rgba(89, 118, 133, .18) 0 20%, transparent 21%),
    linear-gradient(145deg, #f9faf9, #e7eeee);
  color: #597685;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.waisal-cv__personal-section {
  top: 244px;
  left: 543px;
  width: 302px;
  height: 800px;
  overflow: hidden;
}

.waisal-cv__personal-table {
  width: 100%;
  height: 100%;
  margin: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: fixed;
}

.waisal-cv__personal-table tbody {
  display: grid;
  grid-template-rows: repeat(16, 50px);
  height: 800px;
}

.waisal-cv__personal-table tr {
  display: block;
  height: 50px;
}

.waisal-cv__personal-table th {
  display: none;
}

.waisal-cv__personal-table td {
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  overflow: hidden;
  color: #131313;
  direction: ltr;
  font-family: Arial, "Waisal CV Tajawal", sans-serif !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;

  border: 0px solid rgba(29, 42, 51, .10) !important;
}

.waisal-cv__personal-table tr:last-child td {
  border-bottom: 0;
}

.waisal-cv__employment-section {
  top: 1227px;
  left: 338px;
  width: 672px;
  height: calc(32px + var(--employment-extra-height, 0px));
  overflow: hidden;
}

.waisal-cv__employment-table {
  width: 100%;
  margin: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: fixed;
  direction: rtl;
}

.waisal-cv__employment-table tr {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 32px;
}

.waisal-cv__employment-table td {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 32px;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 5px 3px;
  overflow: hidden;
  color: #0b337d;
  direction: ltr;
  font-family: Arial, "Waisal CV Tajawal", sans-serif !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fff;
}

.waisal-cv__employment-table td::before {
  position: absolute;
  top: 5px;
  left: calc(50% - 20px);
  width: 40px;
  height: 1px;
  background: #d4a352;
  content: "";
}

.waisal-cv__employment-table td::after {
  position: absolute;
  top: 3px;
  left: calc(50% - 2px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d4a352;
  content: "";
}

.waisal-cv__employment-table td+td {
  border-right: 1px solid rgba(11, 51, 125, .09);
}

.waisal-cv__employment-table tr + tr td {
  border-top: 1px solid rgba(11, 51, 125, .12);
}

/* When a worker has a second or third employment record, make room for it
   before the skills panel. The lower reference artwork is re-painted at its
   new position, preserving the supplied CV design rather than overlapping the
   additional records. */
.waisal-cv--employment-expanded {
  height: calc(1504px + var(--employment-extra-height));
}

.waisal-cv__employment-expansion-mask,
.waisal-cv__skills-artwork {
  position: absolute;
  left: 0;
  width: 1046px;
  pointer-events: none;
}

.waisal-cv__employment-expansion-mask {
  z-index: 0;
  top: 1259px;
  bottom: 0;
  background: #fff;
}

.waisal-cv__skills-artwork {
  z-index: 1;
  top: calc(1270px + var(--employment-extra-height));
  height: 234px;
  overflow: hidden;
  background: #fff;
}

.waisal-cv__skills-artwork img {
  display: block;
  width: 1046px;
  max-width: none;
  height: 1504px;
  transform: translateY(-1270px);
  transform-origin: top left;
}

.waisal-cv--employment-expanded .waisal-cv__employment-section {
  z-index: 3;
}

.waisal-cv--employment-expanded .waisal-cv__skills-section {
  z-index: 3;
  top: calc(1321px + var(--employment-extra-height));
}

.waisal-cv__skills-section {
  top: 1321px;
  left: 39px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, 34px);
  width: 968px;
  height: 136px;
  column-gap: 21px;
  direction: ltr;
}

.waisal-cv__skill {
  position: relative;
  min-width: 0;
  height: 34px;
}

.waisal-cv__skill-status {
  position: absolute;
  top: 5px;
  left: 5px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 2px solid #0c3d87;
  border-radius: 50%;
  background: #fff;
  color: #1e5da2;
  font-family: Arial, sans-serif !important;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.waisal-cv__skill.is-disabled .waisal-cv__skill-status {
  color: #0c3d87;
  font-size: 22px;
  font-weight: 500;
}

.waisal-cv__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cv-profile-fit,
.cv-certificate-fit {
  display: flex;
  width: 100%;
  max-width: 1046px;
  min-width: 0;
  min-height: 1px;
  margin: 0 auto;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
}

/* Applied only after the responsive script has calculated a display scale.
   The certificate remains a 1046px source so exports always use the original
   layout; this wrapper simply clips its unscaled layout box on small screens. */
.waisal-cv-detail-main .cv-certificate-fit.is-scaled-cv {
  overflow: hidden;
}

.cv-admin-page {
  min-width: 0;
  margin: 0;
  padding: 22px;
  background: #f2f6fc;
  color: #18233d;
  font-family: "Waisal CV Tajawal", Arial, sans-serif;
}

.cv-admin-toolbar {
  display: flex;
  width: min(100%, 1046px);
  margin: 0 auto 18px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.cv-admin-toolbar button {
  min-height: 42px;
  padding: 9px 16px;
  border: 0;
  border-radius: 9px;
  background: #0a3c8d;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cv-admin-toolbar button.is-secondary {
  border: 1px solid #cbd9ee;
  background: #fff;
  color: #0a3c8d;
}

.cv-admin-toolbar button:disabled {
  cursor: wait;
  opacity: .65;
}

.cv-admin-status {
  color: #526277;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 760px) {

  .cv-profile-fit,
  .cv-certificate-fit {
    max-width: 100%;
    min-width: 0;
  }

  .cv-admin-page {
    padding: 12px 0;
  }

  .cv-admin-toolbar {
    width: calc(100% - 24px);
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media print {

  .cv-admin-toolbar,
  .cv-download-toolbar {
    display: none !important;
  }

  .cv-admin-page {
    padding: 0;
    background: #fff;
  }

  .cv-profile-export {
    width: 1046px;
    border: 0;
    box-shadow: none;
    transform: none !important;
  }
}
