/* ============================================================
   Interview Checklist Popup — Floating Button + Modal
   ============================================================ */

/* Floating trigger button */
.checklist-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy, #0f172a);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body, system-ui, sans-serif);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.4s;
  opacity: 0;
  pointer-events: none;
}

.checklist-fab.visible {
  opacity: 1;
  pointer-events: auto;
}

.checklist-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
}

.checklist-fab__icon {
  font-size: 20px;
  line-height: 1;
}

.checklist-fab__pulse {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: var(--teal, #0d9488);
  border-radius: 50%;
  border: 2px solid #fff;
  animation: fabPulse 2s infinite;
}

@keyframes fabPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* Backdrop */
.checklist-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.checklist-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal */
.checklist-modal {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 1001;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.checklist-overlay.open .checklist-modal {
  transform: translateY(0);
}

/* Modal header */
.checklist-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  flex-shrink: 0;
}

.checklist-modal__title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy, #0f172a);
  margin: 0;
}

.checklist-modal__close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-light, #9ca3af);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.checklist-modal__close:hover {
  color: var(--navy, #0f172a);
  background: var(--gray-100, #f3f4f6);
}

/* Progress bar in modal */
.checklist-modal__progress {
  padding: 12px 20px 0;
  flex-shrink: 0;
}

.checklist-modal__progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light, #9ca3af);
  font-weight: 500;
  margin-bottom: 6px;
}

.checklist-modal__bar-wrap {
  background: var(--gray-100, #f3f4f6);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.checklist-modal__bar-fill {
  background: linear-gradient(90deg, var(--teal, #0d9488), var(--teal-light, #5eead4));
  height: 100%;
  border-radius: 20px;
  width: 17%;
  transition: width 0.4s ease;
}

/* Scrollable body */
.checklist-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
  -webkit-overflow-scrolling: touch;
}

/* Step dots */
.cp-step-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.cp-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-200, #e5e7eb);
  transition: all 0.3s;
}

.cp-step-dot.active {
  background: var(--teal, #0d9488);
  transform: scale(1.3);
}

.cp-step-dot.completed {
  background: var(--teal-light, #5eead4);
}

/* Sections */
.cp-section {
  display: none;
  animation: cpSlideIn 0.3s ease;
}

.cp-section.active {
  display: block;
}

@keyframes cpSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cp-section h3 {
  font-family: var(--font-display, Georgia, serif);
  font-size: 16px;
  color: var(--navy, #0f172a);
  margin: 0 0 12px;
}

/* Check items */
.cp-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  cursor: pointer;
}

.cp-item:last-of-type {
  border-bottom: none;
}

.cp-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal, #0d9488);
  cursor: pointer;
  flex-shrink: 0;
}

.cp-item label {
  font-size: 14px;
  color: var(--text-secondary, #4b5563);
  cursor: pointer;
  line-height: 1.5;
}

.cp-item input:checked + label {
  color: var(--navy, #0f172a);
  font-weight: 500;
}

/* Navigation buttons */
.cp-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}

.cp-btn-back {
  background: none;
  border: 1px solid var(--gray-300, #d1d5db);
  color: var(--text-secondary, #4b5563);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body, system-ui, sans-serif);
  cursor: pointer;
  transition: all 0.2s;
}

.cp-btn-back:hover {
  border-color: var(--navy, #0f172a);
  color: var(--navy, #0f172a);
}

.cp-btn-next {
  background: var(--teal, #0d9488);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body, system-ui, sans-serif);
  cursor: pointer;
  transition: background 0.2s;
}

.cp-btn-next:hover {
  background: var(--teal-dark, #0f766e);
}

/* Contact section */
.cp-contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cp-form-group {
  display: flex;
  flex-direction: column;
}

.cp-form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--navy, #0f172a);
  margin-bottom: 4px;
}

.cp-form-group input {
  padding: 10px 12px;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--text-primary, #1f2937);
  transition: border-color 0.2s;
}

.cp-form-group input:focus {
  outline: none;
  border-color: var(--teal, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.cp-radio-group {
  margin-top: 12px;
}

.cp-radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary, #4b5563);
  cursor: pointer;
}

.cp-radio-group input[type="radio"] {
  accent-color: var(--teal, #0d9488);
}

.cp-submit-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  background: var(--navy, #0f172a);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body, system-ui, sans-serif);
  cursor: pointer;
  transition: opacity 0.2s;
}

.cp-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cp-submit-btn:not(:disabled):hover {
  opacity: 0.9;
}

.cp-privacy {
  font-size: 11px;
  color: var(--text-light, #9ca3af);
  text-align: center;
  margin-top: 8px;
}

/* Results in popup */
.cp-results {
  text-align: center;
  padding: 12px 0;
}

.cp-results h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.cp-results p {
  font-size: 14px;
  color: var(--text-secondary, #4b5563);
  margin-bottom: 16px;
}

.cp-results .cp-btn-next {
  display: inline-block;
  text-decoration: none;
  padding: 10px 20px;
}

/* Desktop: slide from right side */
@media (min-width: 769px) {
  .checklist-modal {
    top: 0;
    bottom: 0;
    right: 0;
    border-radius: 16px 0 0 16px;
    transform: translateX(100%);
    max-height: 100vh;
  }

  .checklist-overlay.open .checklist-modal {
    transform: translateX(0);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .checklist-fab {
    bottom: 16px;
    right: 16px;
    padding: 12px 18px;
    font-size: 14px;
  }

  .checklist-fab__label {
    display: none;
  }

  .checklist-fab {
    border-radius: 50%;
    padding: 14px;
  }

  .checklist-modal {
    max-width: 100%;
    max-height: 85vh;
  }

  .cp-contact-fields {
    grid-template-columns: 1fr;
  }
}
