/* NIST NICE Framework Position Mapper - Custom Styles */

:root {
  --primary-color: #ff6b35;
  --primary-dark: #e55a25;
  --primary-light: #ff8855;
  --accent-blue: #4a9eff;
  --accent-green: #5cb85c;
  --background-dark: #1a1a1a;
  --background-secondary: #232425;
  --background-light: #2a2a2a;
  --text-light: #e0e0e0;
  --text-secondary: #b3b3bd;
  --border-color: #4e4e57;
  --border-radius: 8px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.3);
}

/* Tool Info Banner */
.tool-info {
  background: rgba(255, 107, 53, 0.1);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
}

.tool-info p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Form Styling */
#nistForm {
  background: var(--background-secondary);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  font-size: 1rem;
}

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: var(--background-dark);
  color: var(--text-light);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Slider Styling */
.slider-container {
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
}

.slider-group {
  margin-bottom: 1.5rem;
}

.slider-group:last-child {
  margin-bottom: 0;
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

.slider-group label span {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  min-width: 40px;
  text-align: center;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(to right, var(--border-color) 0%, var(--primary-color) 0%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

/* Toggle Switch Styling */
.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--background-light);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-inline:hover {
  background: var(--background-secondary);
  border-color: var(--primary-color);
}

.checkbox-inline input[type="checkbox"] {
  display: none;
}


.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.checkbox-inline input[type="checkbox"]:checked + .toggle-switch {
  background-color: var(--primary-color);
}

.checkbox-inline input[type="checkbox"]:checked + .toggle-switch .toggle-slider {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.95em;
  color: var(--text-light);
  user-select: none;
  font-weight: 500;
}

/* Form Actions Layout */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-icon {
  font-size: 1.2rem;
}

/* Result Display */
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--primary-color);
}

.result-header h3 {
  margin: 0;
  color: var(--text-light);
  font-size: 1.5rem;
}

.result-actions {
  display: flex;
  gap: 0.5rem;
}

.result-actions button {
  padding: 0.5rem 1rem;
  background: var(--background-dark);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.result-actions button:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Job Description Output */
.job-description-output {
  background: var(--background-dark);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  line-height: 1.7;
  color: var(--text-light);
  border: 1px solid var(--border-color);
}

.job-description-output h1 {
  color: var(--accent-blue);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.job-description-output h2 {
  color: var(--accent-blue);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  border-bottom: 2px solid rgba(74, 158, 255, 0.3);
  padding-bottom: 0.5rem;
}

.job-description-output h3 {
  color: var(--accent-green);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.job-description-output ul,
.job-description-output ol {
  padding-left: 2rem;
}

.job-description-output li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.job-description-output code {
  background: rgba(255, 107, 53, 0.1);
  color: #ffa575;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.job-description-output strong {
  color: #66d9ef;
  font-weight: 600;
}

.job-description-output blockquote {
  border-left: 4px solid var(--primary-color);
  background: rgba(255, 107, 53, 0.1);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  color: #ccc;
}

/* Loading & Error States */
#loadingDiv {
  text-align: center;
  padding: 2rem;
  background: var(--background-secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  color: var(--text-light);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--border-color);
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#errorDiv {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  color: #856404;
}

/* Tool Footer */
.tool-footer {
  background: var(--background-secondary);
  border-top: 3px solid var(--primary-color);
  padding: 1.5rem;
  margin-top: 3rem;
  border-radius: var(--border-radius);
  text-align: center;
  border: 1px solid var(--border-color);
}

.tool-footer p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.tool-footer strong {
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  #nistForm {
    padding: 1.5rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .result-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .result-actions button {
    flex: 1;
    min-width: 100px;
  }

  .job-description-output {
    padding: 1.5rem;
  }
}

/* Print Styles */
@media print {
  #nistForm,
  .result-actions,
  .tool-footer {
    display: none;
  }

  .job-description-output {
    box-shadow: none;
    padding: 0;
  }
}
