/* Delaware 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: #f8f9fa;
}

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

a {
  color: #003087;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
}

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

.generator-header {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #003087 0%, #0055cc 100%);
  color: white;
  border-radius: 0 0 1rem 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.generator-header h2 {
  font-size: 1.75rem;
  color: white;
  margin-bottom: 0.5rem;
}

.generator-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.header-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-de {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-free {
  background: #10b981;
  color: white;
}

.badge-instant {
  background: #f59e0b;
  color: white;
}

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

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

.preview-panel {
  flex: 1;
  min-width: 350px;
  max-width: 100%;
  height: 750px;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
  position: sticky;
  top: 1rem;
}

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

.preview-content h2 {
  font-size: 1.125rem;
  color: #003087;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #003087;
}

/* --- 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.875rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

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

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

.form-tab h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #003087;
  color: #003087;
}

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

.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: #374151;
}

input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  font-size: 0.875rem;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 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: #003087;
  box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.1);
}

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

.checkbox-label input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 1rem;
  height: 1rem;
  accent-color: #003087;
}

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

/* --- Member/Manager Cards --- */
.member-card {
  background-color: #f8fafc;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
}

.member-card h4 {
  font-size: 0.9375rem;
  color: #003087;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

/* --- Delaware-Specific Options --- */
.delaware-options {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0ff 100%);
  border-radius: 0.75rem;
  border: 1px solid #c7d8f4;
}

.delaware-options h4 {
  color: #003087;
  margin-top: 0;
}

/* --- 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: white;
  border: 1px solid #d1d5db;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.percentage-control:hover {
  background-color: #f3f4f6;
}

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

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

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

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

.percentage-ok {
  color: #047857;
}

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

.warning-icon {
  color: #dc2626;
  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.625rem 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: white;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.2s ease;
  gap: 0.375rem;
}

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

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

.prev-button:hover, .next-button:hover {
  background-color: #0055cc;
}

.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.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  gap: 0.375rem;
}

.add-button {
  background-color: #f0f5ff;
  color: #003087;
  border: 1px solid #c7d8f4;
  margin-top: 0.5rem;
}

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

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

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

.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 1.25rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.info-box {
  background-color: #f0f5ff;
  border: 1px solid #c7d8f4;
  color: #003087;
}

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

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

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

.tooltiptext {
  visibility: hidden;
  width: 280px;
  background-color: #1f2937;
  color: white;
  text-align: left;
  padding: 0.875rem;
  border-radius: 0.5rem;
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  margin-left: -140px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.8125rem;
  font-weight: normal;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  line-height: 1.5;
}

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

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

/* --- Document Preview --- */
.document-preview {
  white-space: pre-wrap;
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 0.8125rem;
  line-height: 1.6;
  padding: 1.25rem;
  background-color: #fafbfc;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  height: 620px;
  overflow-y: auto;
}

.highlighted-text {
  background-color: #fff3cd;
  display: inline-block;
  padding: 1px 3px;
  border-radius: 2px;
  animation: highlight 2s;
}

@keyframes highlight {
  0% { background-color: #ffc107; }
  100% { background-color: #fff3cd; }
}

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

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

.generator-footer a {
  color: #003087;
  font-weight: 500;
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  .generator-content {
    flex-direction: column;
  }

  .preview-panel {
    position: relative;
    top: 0;
    height: 500px;
  }

  .form-panel, .preview-panel {
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .generator-header h2 {
    font-size: 1.375rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .tab-button {
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
  }

  .navigation-buttons {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .navigation-buttons > * {
    flex: 1 0 auto;
  }

  .navigation-buttons > div {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
  }
}
