/* CV Apply Job Popup - Góc dưới bên trái, UI giống ảnh (Bạn chưa thể ứng tuyển + panel CV + progress + Để sau / Cập nhật CV) */

.cv-apply-job-popup {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  width: 392px;
  display: block;
  box-sizing: border-box;
}

@keyframes cvApplyJobSlideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes cvApplyJobSlideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.cv-apply-job-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
  gap: 16px;
  width: 420px;
  max-width: calc(100vw - 40px);
  background: #ffffff;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  box-sizing: border-box;
}

.cv-apply-job-header {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 0;
  gap: 10px;
  flex-shrink: 0;
}

.cv-apply-job-header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.cv-apply-job-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #fce96a 0%, #fdfdea 50%, #ffffff 100%);
  border-radius: 50%;
  box-sizing: border-box;
}

.cv-apply-job-icon-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  background: #ffffff;
  border: 1px solid #faca15;
  border-radius: 50%;
  box-sizing: border-box;
}

.cv-apply-job-icon-img {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  object-fit: contain;
  display: block;
}

.cv-apply-job-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.cv-apply-job-title {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 150%;
  color: rgba(0, 0, 0, 0.85);
  margin: 0;
}

.cv-apply-job-message {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 150%;
  color: #1f2a37;
  margin: 0;
}

.cv-apply-job-message-percent {
  font-weight: 600;
}

.cv-apply-job-close {
  align-self: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.cv-apply-job-close:hover {
  opacity: 0.7;
}

.cv-apply-job-close svg {
  display: block;
  width: 20px;
  height: 20px;
}

.cv-apply-job-divider {
  height: 0;
  border: none;
  border-top: 1px dashed #e5e7eb;
  margin: 0;
}

/* CV Info panel - nền cam nhạt, viền cam, giống update-cv-list */
.cv-apply-job-info {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--orange-400, #ff8a4c);
  background: linear-gradient(90deg, var(--orange-50, #fff8f1) 0%, #fff 100%);
  box-sizing: border-box;
}

.cv-apply-job-name {
  color: var(--character-title-85, rgba(0, 0, 0, 0.85));

  /* text-lg/font-semibold */
  font-family: Inter;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 27px;
  margin: 0 0 4px 0;
}

.cv-apply-job-date {
  color: var(--character-secondary-45, rgba(0, 0, 0, 0.45));

  /* text-sm/font-normal */
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 21px;
  margin: 0 0 12px 0;
}

/* Dòng: Hoàn chỉnh CV (trái) ...................... % (phải) */
.cv-apply-job-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.cv-apply-job-progress-label {
  color: var(--character-title-85, rgba(0, 0, 0, 0.85));

  /* text-sm/font-medium */
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 21px;
  white-space: nowrap;
}

/* Progress bar full width, dòng dưới */
.cv-apply-job-progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.cv-apply-job-progress-fill {
  height: 100%;
  background: #f07e1d;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Badge % bên phải (cùng dòng với "Hoàn chỉnh CV") */
.cv-apply-job-progress-badge {
  color: var(--white, #fff);
  text-align: center;

  /* text-xs/font-medium */
  font-family: Inter;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px;
  background: #f07e1d;
  padding: 0 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.cv-apply-job-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.cv-apply-job-btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  height: 38px;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
  border: none;
}

.cv-apply-job-btn-secondary {
  background: #ffffff;
  color: #1f2a37;
  border: 1px solid #e5e7eb;
}

.cv-apply-job-btn-secondary:hover {
  background: #f9fafb;
}

.cv-apply-job-btn-primary {
  background: #f07e1d;
  color: #ffffff;
}

.cv-apply-job-btn-primary:hover,
.cv-apply-job-btn-primary:focus,
.cv-apply-job-btn-primary:active,
a.cv-apply-job-btn-primary:hover,
a.cv-apply-job-btn-primary:focus,
a.cv-apply-job-btn-primary:active {
  background: #e06d0c;
  color: #ffffff;
  text-decoration: none;
}

@media screen and (max-width: 768px) {
  .cv-apply-job-popup {
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
    max-width: 392px;
  }

  .cv-apply-job-content {
    padding: 16px;
    gap: 16px;
    width: 100%;
  }

  .cv-apply-job-title {
    font-size: 16px;
  }

  .cv-apply-job-message {
    font-size: 13px;
  }

  .cv-apply-job-info {
    padding: 12px;
  }

  .cv-apply-job-name {
    font-size: 15px;
  }

  .cv-apply-job-date {
    font-size: 13px;
  }

  .cv-apply-job-actions {
    gap: 12px;
  }

  .cv-apply-job-btn {
    padding: 8px 16px;
    height: 38px;
  }
}
