/* California LLC Operating Agreement Generator Styles */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f9fafb;
}

h1, h2, h3, h4, h5, h6 {
  color: #111827;
  margin-bottom: 1rem;
}

a {
  color: #4f46e5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
}

/* --- Generator Layout --- */
.generator-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.generator-header {
  text-align: center;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.generator-header h2 {
  font-size: 1.5rem;
  color: #111827;
  margin-bottom: 0.5rem;
}

.generator-header p {
  color: #6b7280;
  font-size: 0.875rem;
}

.generator-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-panel {
  flex: 1;
  min-width: 300px;
  max-width: 100%;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1rem;
}

.preview-panel {
  flex: 1;
  min-width: 300px;
  max-width: 100%;
  height: 700px;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1rem;
}

.preview-content {
  padding: 0 1rem;
}

/* --- Tab Navigation --- */
.tab-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1rem;
}

.tab-button {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover {
  background-color: #e5e7eb;
}

.tab-button.active {
  background-color: #4f46e5;
  color: white;
  border-color: #4f46e5;
}

/* --- Form Elements --- */
.form-tab {
  margin-bottom: 1.5rem;
}

.form-tab h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.form-tab h4 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #4b5563;
}

.tab-description {
  margin-bottom: 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

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

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

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
}

input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: #f9fafb;
  font-size: 0.875rem;
  color: #111827;
  transition: border-color 0.2s ease;
}

select[multiple] {
  height: auto;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 0.5rem;
}

.checkbox-label span {
  font-size: 0.875rem;
}

/* --- Member/Manager Cards --- */
.member-card {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e5e7eb;
}

.member-card h4 {
  font-size: 0.875rem;
  color: #4b5563;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

/* --- Percentage Controls --- */
.percentage-input-container {
  display: flex;
  align-items: center;
}

.percentage-input-container input {
  flex: 1;
  width: auto;
}

.percentage-controls {
  display: flex;
  flex-direction: column;
  margin-left: 0.5rem;
}

.percentage-control {
  background: none;
  border: 1px solid #d1d5db;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.percentage-control:first-child {
  border-bottom: none;
  border-radius: 0.25rem 0.25rem 0 0;
}

.percentage-control:last-child {
  border-radius: 0 0 0.25rem 0.25rem;
}

.percentage-icon {
  width: 14px;
  height: 14px;
  color: #6b7280;
}

.total-percentage-display {
  background-color: #f3f4f6;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.percentage-ok {
  color: #047857;
}

.percentage-warning {
  color: #b91c1c;
  display: flex;
  align-items: center;
}

.warning-icon {
  color: #b91c1c;
  margin-left: 0.375rem;
  width: 1rem;
  height: 1rem;
}

/* --- Manager Section --- */
.managers-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* --- Buttons --- */
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: white;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background-color: #f3f4f6;
}

.prev-button, .next-button {
  background-color: #4f46e5;
  color: white;
  border-color: #4f46e5;
}

.prev-button:hover, .next-button:hover {
  background-color: #4338ca;
}

.prev-button.disabled, .next-button.disabled {
  background-color: #e5e7eb;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

.add-button, .remove-button {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.add-button {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
  margin-top: 0.5rem;
}

.add-button:hover {
  background-color: #e5e7eb;
}

.remove-button {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  margin-top: 0.5rem;
}

.remove-button:hover {
  background-color: #fecaca;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.navigation-buttons .feather {
  width: 1rem;
  height: 1rem;
}

/* --- Info/Warning Boxes --- */
.info-box, .warning-box {
  padding: 1rem;
  border-radius: 0.375rem;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.info-box {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1e40af;
}

.warning-box {
  background-color: #fff7ed;
  border: 1px solid #ffedd5;
  color: #c2410c;
}

/* --- Tooltips --- */
.tooltip {
  display: inline-flex;
  position: relative;
  margin-left: 0.375rem;
  vertical-align: middle;
}

.info-icon {
  color: #6b7280;
  width: 0.875rem;
  height: 0.875rem;
  cursor: help;
  background-color: #e5e7eb;
  border-radius: 50%;
  padding: 2px;
}

.tooltiptext {
  visibility: hidden;
  width: 300px;
  background-color: #374151;
  color: white;
  text-align: left;
  padding: 0.75rem;
  border-radius: 0.375rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -150px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.75rem;
  font-weight: normal;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  line-height: 1.4;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

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

/* --- Document Preview --- */
.document-preview {
  white-space: pre-wrap;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 1rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  height: 600px;
  overflow-y: auto;
}

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

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

/* --- Footer --- */
.generator-footer {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.875rem;
}

.generator-footer p:not(:last-child) {
  margin-bottom: 0.5rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .generator-content {
    flex-direction: column;
  }
  
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-panel, .preview-panel {
    min-width: 100%;
  }
  
  .tab-button {
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
  }
  
  .navigation-buttons {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .navigation-buttons button {
    flex: 1 0 auto;
  }
}
