/* Job Setup Page Styles */
/* Merged from: JDpill.css + pills.css */

/* ====== JOB DESCRIPTION SECTION ====== */
.jd-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.jd-label {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  letter-spacing: -0.15px;
}

.jd-textarea-container {
  position: relative;
}

.jd-helper {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.jd-error {
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
}

#jobDescription {
  width: 100%;
  height: 128px;
  background-color: #f3f3f5;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  color: #111827;
  resize: none;
  box-sizing: border-box;
  letter-spacing: -0.15px;
}

#jobDescription::placeholder {
  color: #717182;
}

#jobDescription:focus {
  outline: none;
  border-color: #2563eb;
  background-color: white;
}

/* ====== GENERATE BUTTON ====== */
.generate-section {
  margin-top: 20px;
}

.btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 9999px; font-size: 14px; font-weight: 600; letter-spacing: -0.15px; cursor: pointer; transition: all 0.2s ease; }
.btn--primary { background: #2563eb; color: #fff; }
.btn--primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,.1); }
.btn--primary:disabled { background: #9ca3af; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--lg { height: 44px; padding: 10px 24px; }
.btn--sm { height: 36px; padding: 8px 14px; }

.generate-btn { width: auto; }
/* Card-based Pills Design */

/* Container for all pills */
.pills-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Individual pill card */
.pill-item {
  background-color: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pill-item:hover {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.pill-item:focus-within {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Pill content container */
.pill-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pill-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Text input area */
.pill-input-container {
  position: relative;
}

.pill-input {
  width: 100%;
  height: 40px;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  padding: 0;
  margin: 0;
  letter-spacing: -0.15px;
  resize: none;
  overflow: hidden;
}

.pill-counter {
  position: absolute;
  right: 0;
  top: -16px;
  font-size: 11px;
  color: #6b7280;
}

.pill-counter.limit {
  color: #b45309; /* subtle warning */
}

.pill-input::placeholder {
  color: rgba(10, 10, 10, 0.5);
}

/* Toggle switch container */
.pill-toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toggle switch */
.pill-toggle {
  position: relative;
  width: 32px;
  height: 18px;
  background-color: #2563eb;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-toggle.nice-to-have {
  background-color: #cbced4;
}

.pill-toggle::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 15px;
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.pill-toggle.nice-to-have::after {
  left: 1px;
}

.pill-toggle:focus { outline: 2px solid #2563eb; outline-offset: 2px; }

/* Toggle label */
.pill-toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
}

/* Delete button */
.pill-delete-btn {
  width: 36px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pill-delete-btn { opacity: 0; pointer-events: none; }
.pill-item:hover .pill-delete-btn, .pill-item:focus-within .pill-delete-btn { opacity: 1; pointer-events: auto; }
.pill-delete-btn:focus { outline: 2px solid #2563eb; outline-offset: 2px; }

.pill-delete-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.pill-delete-btn .delete-icon {
  font-size: 16px;
  color: #6b7280;
}

.pill-delete-btn:hover .delete-icon {
  color: #dc2626;
}

/* Pill Controls Section */
.pill-controls {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Must-Have Toggle */
.must-have-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.must-have-toggle input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
}

.must-have-toggle.must-have .toggle-text {
  color: #dc2626;
  font-weight: 600;
}

.must-have-toggle.nice-to-have .toggle-text {
  color: #9ca3af;
  font-weight: 400;
}

/* Threshold Controls */
.threshold-label {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
}

.threshold-value {
  color: #059669;
  font-weight: 600;
}

.threshold-slider {
  width: 80px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.threshold-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: #059669;
  border-radius: 50%;
  cursor: pointer;
}

.threshold-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #059669;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* Search Controls */
.search-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sort-mode-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-mode-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.sort-mode-select {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  min-width: 160px;
}

.sort-mode-select:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.1);
}

/* Pill Pass Summary (in pills section) */
.pill-pass-summary-container {
  background: #f0f9ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.pill-pass-summary-header h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e40af;
}

.pill-pass-summary-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pill-pass-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  background: white;
  border: 1px solid #e0e7ff;
  border-radius: 4px;
  font-size: 12px;
}

.pass-count {
  font-weight: 600;
  color: #1e40af;
  min-width: 70px;
}

.threshold-requirement {
  color: #6b7280;
  font-size: 11px;
  min-width: 65px;
}

.pill-name {
  color: #374151;
  flex: 1;
}

/* (duplicate disabled state removed; see earlier .generate-btn:disabled) */

/* Pills Section */
.pills-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.pills-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
}

.pills-header h2 {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  margin: 0;
  letter-spacing: -0.15px;
}
.pills-title { white-space: nowrap; }
.pills-helper { margin: 6px 0 0 0; font-size: 12px; color: #6b7280; }
.pill-add-editor { display:flex; align-items:center; gap:8px; margin: 8px 0; }
.pill-add-input { flex:1; height: 36px; background:#f3f3f5; border:1px solid transparent; border-radius:8px; padding:0 12px; font-size:14px; }
.pill-add-input:focus { outline:none; border-color:#2563eb; background:white; }
.pill-add-counter { margin-left:auto; font-size:11px; color:#6b7280; }
.pill-add-counter.limit { color:#b45309; }
.pill-add-error { font-size:12px; color:#dc2626; margin-left:8px; }
.pill-add-actions { display:flex; gap:8px; }
.pill-add-btn { background:#2563eb; color:white; border:none; border-radius:8px; padding:6px 12px; font-size:12px; cursor:pointer; }
.pill-cancel-btn { background:#e5e7eb; color:#111827; border:none; border-radius:8px; padding:6px 12px; font-size:12px; cursor:pointer; }
.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; }
/* Legacy class retained only for markup compatibility; no visual styles here */
.add-requirement-btn { white-space: nowrap; }
.btn-icon { font-size: 16px; color: currentColor; }

.btn-text { font-size: 14px; font-weight: 500; color: currentColor; letter-spacing: -0.15px; }

/* (duplicate .pills-container removed; earlier definition kept) */

/* Search Button */
.search-button-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
/* Buttons now use .btn utilities */

.pill-item, .pill-content, .pill-input { min-height: 44px; }
.pill-error { color: #dc2626; font-size: 12px; margin-top: 6px; }
