:root {
  --primary-color: #1a56db;
  --secondary-color: #e5edff;
  --success-color: #31c48d;
  --warning-color: #faca15;
  --danger-color: #e02424;
  --gray-100: #f4f5f7;
  --gray-200: #e5e7eb;
  --gray-300: #d2d6dc;
  --gray-400: #9fa6b2;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #252f3f;
  --gray-900: #161e2e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray-800);
  background-color: #f9fafb;
  padding: 0;
  margin: 0;
}

.generator-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.header p {
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

.tab-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.tab-button {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

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

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.tab-content {
  display: flex;
  gap: 2rem;
  min-height: 450px;
}

.form-panel {
  flex: 1;
  max-width: 50%;
}

.preview-panel {
  flex: 1;
  max-width: 50%;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 1rem;
  background-color: white;
  overflow: auto;
  height: 450px;
}

.preview-content h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--gray-700);
}

.document-preview {
  white-space: pre-wrap;
  font-family: 'Calibri', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-900);
}

.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-section {
  margin-bottom: 1.5rem;
}

.form-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--gray-800);
}

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

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group label {
  margin-bottom: 0;
}

input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.nav-button {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  background-color: white;
  color: var(--gray-700);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background-color: var(--gray-100);
}

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

.nav-button.next-button:hover {
  background-color: #1646a7;
}

.nav-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.risk-assessment {
  margin-top: 1rem;
}

.risk-item {
  padding: 0.75rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.risk-high {
  background-color: rgba(224, 36, 36, 0.1);
  border-left: 4px solid var(--danger-color);
}

.risk-medium {
  background-color: rgba(250, 202, 21, 0.1);
  border-left: 4px solid var(--warning-color);
}

.risk-low {
  background-color: rgba(49, 196, 141, 0.1);
  border-left: 4px solid var(--success-color);
}

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

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
}

/* Calendar widget */
.calendly-inline-widget {
  min-width: 320px;
  height: 700px;
}

/* Popup styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.popup-content {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.popup-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-500);
}
