/* .htaccess Generator — tool-specific styles */

/* Two-column layout */
.hag-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .hag-layout {
    grid-template-columns: 1fr;
  }
}

/* Warning callout */
.hag-warning {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.5;
}

.hag-warning strong {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Form column */
.hag-form-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section card */
.hag-section {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
}

.hag-section-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text-primary, #111827);
}

/* Checkbox row */
.hag-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary, #111827);
  margin-bottom: 0.4rem;
}

.hag-checkbox-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  cursor: pointer;
}

/* Radio row */
.hag-radio-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary, #111827);
  margin-bottom: 0.35rem;
}

.hag-radio-row input[type="radio"] {
  flex-shrink: 0;
  cursor: pointer;
}

/* Helper text */
.hag-helper {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  margin: -0.1rem 0 0.75rem 1.5rem;
  line-height: 1.4;
}

/* Fieldset */
.hag-fieldset {
  border: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.hag-legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #374151);
  margin-bottom: 0.4rem;
  padding: 0;
}

/* Sub-options (conditional) */
.hag-sub-options {
  margin-top: 0.5rem;
}

.hag-sub-options.is-hidden {
  display: none;
}

/* Select */
.hag-select {
  display: block;
  width: 100%;
  max-width: 16rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 0.375rem;
  background: var(--surface, #fff);
  color: var(--text-primary, #111827);
}

/* Text inputs */
.hag-input-row {
  margin-bottom: 0.65rem;
}

.hag-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary, #374151);
  margin-bottom: 0.25rem;
}

.hag-input {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 0.375rem;
  background: var(--surface, #fff);
  color: var(--text-primary, #111827);
  box-sizing: border-box;
}

/* Inline hint/warning */
.hag-hint-warn {
  font-size: 0.82rem;
  color: #b45309;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 0.4rem 0.65rem;
  border-radius: 0.25rem;
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

.hag-hint-warn.is-hidden {
  display: none;
}

/* Reset row */
.hag-reset-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* Output column */
.hag-output-col {
  position: sticky;
  top: 1rem;
}

.hag-output-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.hag-output-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary, #374151);
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  background: var(--surface-alt, #f9fafb);
}

.hag-output {
  margin: 0;
  padding: 1rem;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
  max-height: 60vh;
  overflow-y: auto;
  color: var(--text-primary, #111827);
  background: var(--surface, #fff);
  min-height: 6rem;
  line-height: 1.55;
}

.hag-output.hag-output-empty {
  color: var(--text-muted, #9ca3af);
}

/* Action row */
.hag-action-row {
  gap: 0.5rem;
}
