/* Strategic NDA Generator Styles */
:root {
  --primary-color: #1a56db;
  --primary-light: #e6f0ff;
  --success-color: #059669;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  color: var(--gray-800);
  background-color: #f9fafb;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header p {
  font-size: 0.875rem;
  opacity: 0.9;
}

.tab-navigation {
  display: flex;
  overflow-x: auto;
  background-color: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1rem;
}

.tab-button {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--gray-600);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s;
}

.tab-button:hover {
  color: var(--primary-color);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.form-panel {
  width: 50%;
  overflow-y: auto;
  background-color: white;
  padding: 1rem;
  border-right: 1px solid var(--gray-200);
  height: calc(100vh - 110px); /* Reduced height */
}

.preview-panel {
  width: 50%;
  overflow-y: auto;
  background-color: var(--gray-100);
  padding: 1rem;
  height: calc(100vh - 110px); /* Match form panel height */
}

.preview-content {
  background-color: white;
  padding: 1rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - 150px); /* Ensure content doesn't overflow */
  overflow-y: auto;
}

.preview-content h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.info-box {
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary-color);
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.info-box-header {
  display: flex;
  align-items: flex-start;
}

.info-box-icon {
  color: var(--primary-color);
  margin-top: 0.125rem;
  margin-right: 0.5rem;
}

.info-box-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e40af;
}

.info-box-content {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: #1e3a8a;
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.form-input:focus,
.form-select:focus {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  border-color: var(--primary-color);
}

.form-checkbox {
  margin-right: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

/* New tooltip styles */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.tooltip-icon {
  width: 16px;
  height: 16px;
  margin-left: 0.25rem;
  color: var(--gray-400);
}

.tooltip-content {
  position: absolute;
  top: 100%;
  left: 0;
  width: 250px;
  padding: 0.75rem;
  margin-top: 0.5rem;
  background-color: white;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-size: 0.75rem;
  color: var(--gray-700);
  z-index: 10;
  line-height: 1.4;
}

.tooltip-content::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 1rem;
  border-width: 0.5rem;
  border-style: solid;
  border-color: transparent transparent white transparent;
}

.form-label-with-tooltip {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

.checkbox-label-with-tooltip {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Risk indicator styles */
.risk-indicator {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}

.risk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.25rem;
}

.risk-text {
  font-size: 0.7rem;
  color: var(--danger-color);
  max-width: 200px;
}

.card {
  background-color: var(--gray-100);
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.checkbox-group {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.help-text {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.nav-button {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.prev-button {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--gray-300);
}

.prev-button:hover:not(:disabled) {
  background-color: var(--primary-light);
}

.prev-button:disabled {
  background-color: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
}

.next-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.next-button:hover {
  background-color: #1a47b8;
}

.complete-button {
  background-color: var(--success-color);
  color: white;
  border: none;
}

.complete-button:hover {
  background-color: #047857;
}

.nda-preview {
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.35;
  background-color: var(--gray-100);
  padding: 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--gray-200);
  max-width: 100%;
  overflow-x: auto;
  max-height: calc(100vh - 200px); /* Limit preview height */
}

.highlighted-text {
  background-color: #fff9c4;
  display: inline-block;
  padding: 2px 0;
  animation: highlight 2s;
}

@keyframes highlight {
  0% { background-color: #ffeb3b; }
  100% { background-color: #fff9c4; }
}

.form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-col {
  flex: 1;
}

.alert-warning {
  font-size: 0.75rem;
  color: #c05621;
  margin-top: 0.25rem;
}

.radio-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

/* Tooltip styles */
.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-container .tooltip-text {
  visibility: hidden;
  width: 300px;
  background-color: #1e3a8a;
  color: white;
  text-align: left;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.8rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  line-height: 1.4;
}

.tooltip-container .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #1e3a8a transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.info-icon {
  cursor: help;
  color: var(--primary-color);
  margin-left: 0.5rem;
  opacity: 0.7;
}

.info-icon:hover {
  opacity: 1;
}

/* Color-coding for different types of clauses */
.security-clause {
  border-left: 4px solid #10b981; /* green */
}

.warning-clause {
  border-left: 4px solid #f59e0b; /* amber */
}

.critical-clause {
  border-left: 4px solid #ef4444; /* red */
}
