/* Job Description Parsing Modal Styles */

.jd-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.jd-modal-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: auto;
  max-height: 90vh;
}

.jd-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  transition: all 0.3s ease;
}

.jd-modal-main {
  position: relative;
  min-height: 600px;
}

.jd-modal-filters {
  transform: translateX(100%);
  opacity: 0;
  position: relative;
  overflow: scroll;
}

.jd-modal-header {
  padding: 24px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.jd-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

.btn-back {
  padding: 8px 16px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: #e2e8f0;
  color: #475569;
}

.jd-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(80vh - 200px);
  flex: 1;
}

.jd-modal-description {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Upload Dropzone */
.jd-upload-dropzone {
  border: 3px dashed #cbd5e1;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.jd-upload-dropzone:hover,
.jd-upload-dropzone.drag-over {
  border-color: #3b82f6;
  background: #eff6ff;
}

.jd-upload-icon {
  font-size: 48px;
  color: #94a3b8;
  margin-bottom: 16px;
}

.jd-upload-dropzone:hover .jd-upload-icon {
  color: #3b82f6;
}

.jd-upload-text {
  font-size: 16px;
  color: #475569;
  margin-bottom: 8px;
}

.jd-upload-text strong {
  color: #3b82f6;
  font-weight: 700;
}

.jd-upload-hint {
  font-size: 14px;
  color: #94a3b8;
}

/* Selected File Display */
.jd-selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  margin-top: 16px;
}

.jd-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.jd-file-info i {
  color: #3b82f6;
  font-size: 20px;
  flex-shrink: 0;
}

.jd-file-info span {
  font-size: 15px;
  color: #1e293b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jd-file-size {
  font-size: 13px;
  color: #64748b;
  font-weight: 400;
  margin-left: 8px;
}

.btn-remove-file {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: white;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #64748b;
  flex-shrink: 0;
}

.btn-remove-file:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

/* Processing Display */
.jd-processing {
  margin-top: 24px;
}

.jd-progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.jd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #1e40af 100%);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.jd-processing-text {
  font-size: 14px;
  color: #64748b;
  text-align: center;
  margin: 0;
}

.jd-processing-text i.fa-check-circle {
  color: #10b981;
}

/* Error Display */
.jd-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.jd-error i {
  margin-right: 8px;
  font-size: 18px;
}

/* Modal Footer */
.jd-modal-footer {
  padding: 20px 24px;
  border-top: 2px solid #e2e8f0;
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.jd-modal-footer .btn {
  flex: 1;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jd-modal-footer .btn-secondary {
  background: #f1f5f9;
  color: #64748b;
  border: 2px solid #e2e8f0;
}

.jd-modal-footer .btn-secondary:hover {
  background: #e2e8f0;
  color: #475569;
}

.jd-modal-footer .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white;
  border: none;
}

.jd-modal-footer .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.jd-modal-footer .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Filters Review */
.jd-filters-review {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.jd-filters-intro {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 8px 0;
}

/* Search Name Input */
.jd-filter-name-section {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 8px;
}

.jd-filter-name-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 12px;
}

.jd-filter-name-label i {
  color: #3b82f6;
}

.jd-filter-name-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #93c5fd;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  background: white;
  transition: all 0.2s ease;
}

.jd-filter-name-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.jd-filter-name-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.jd-filter-name-hint {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-top: 8px;
}

.jd-filter-section {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

/* Empty Filter State */
.jd-filter-section.jd-filter-empty {
  background: #fefce8;
  border-color: #fde047;
}

.jd-empty-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 14px;
  color: #78350f;
  line-height: 1.5;
}

.jd-empty-note i {
  color: #f59e0b;
  margin-top: 2px;
  flex-shrink: 0;
}

.jd-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.jd-filter-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.jd-filter-hint {
  font-size: 13px;
  color: #94a3b8;
}

.jd-filter-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jd-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  transition: all 0.2s ease;
}

.jd-filter-pill:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.jd-filter-pill i.fa-check-circle {
  color: #10b981;
}

.jd-filter-remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
  padding: 0;
}

.jd-filter-remove:hover {
  background: #fee2e2;
  color: #ef4444;
}

.jd-filter-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
}

.jd-filter-value span {
  font-size: 15px;
  color: #1e293b;
  font-weight: 600;
}

.jd-filter-remove-text {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
}

.jd-filter-remove-text:hover {
  border-color: #ef4444;
  background: #fef2f2;
  color: #ef4444;
}

/* Validation Notes */
.jd-validation-notes {
  background: #fef3c7;
  border: 2px solid #fde68a;
  border-radius: 12px;
  padding: 20px;
  margin-top: 8px;
}

.jd-validation-notes h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
}

.jd-validation-notes p {
  font-size: 14px;
  color: #78350f;
  margin: 0 0 12px 0;
}

.jd-validation-notes ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
}

.jd-validation-notes li {
  font-size: 14px;
  color: #78350f;
  margin-bottom: 8px;
}

.jd-validation-notes li strong {
  color: #92400e;
  text-transform: capitalize;
}

.jd-validation-tip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.jd-validation-tip i {
  color: #f59e0b;
  margin-top: 2px;
  flex-shrink: 0;
}

.jd-validation-tip strong {
  color: #92400e;
}

/* Responsive Design */
@media (max-width: 768px) {
  .jd-modal-container {
    max-width: 100%;
  }

  .jd-modal {
    border-radius: 0;
    max-height: 100vh;
  }

  .jd-modal-header {
    padding: 20px;
  }

  .jd-modal-body {
    padding: 20px;
  }

  .jd-upload-dropzone {
    padding: 32px 20px;
  }

  .jd-modal-footer {
    padding: 16px 20px;
    flex-direction: column;
  }

  .jd-modal-footer .btn {
    width: 100%;
  }
}

/* Animations */
@keyframes jdSlideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes jdSlideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.jd-parsing-link-container {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #e2e8f0;
}

.jd-parsing-link {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #1e40af;
  font-weight: 600;
  font-size: 15px;
}

.jd-parsing-link:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.jd-parsing-link i.fa-file-alt {
  color: #3b82f6;
  font-size: 18px;
}

.jd-parsing-link i.fa-chevron-right {
  color: #64748b;
  font-size: 14px;
  margin-left: auto;
}

.jd-parsing-link span {
  flex: 1;
}
