/* ==========================================================================
   Email Reply Writer — Roohlyn UI Alignment
   Inherits from /style.css (nav, hero, tool-card, utility-form, example-chips,
   secondary-button, output-panel, result-card, site-footer, related-tools, faq-list)
   ========================================================================== */

/* --- Selector groups ------------------------------------------------------ */

.selector-group {
  margin-bottom: 22px;
}

.selector-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

/* Chip-style radio selectors (replaces custom radio-card design) */
.example-chips [type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.chip-select {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
  user-select: none;
}

.chip-select:hover {
  border-color: rgba(12, 118, 107, 0.44);
  color: var(--accent);
  background: #f8fbf8;
  transform: translateY(-1px);
}

.chip-select:focus-within {
  outline: 2px solid rgba(12, 118, 107, 0.5);
  outline-offset: 2px;
}

.chip-select.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(8, 127, 140, 0.07);
  font-weight: 900;
  box-shadow: 0 0 0 3px rgba(8, 127, 140, 0.14);
}

/* --- Textarea ------------------------------------------------------------- */

.message-textarea {
  width: 100%;
  min-height: 160px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 43, 39, 0.1);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.97rem;
  line-height: 1.65;
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  font-family: inherit;
}

.message-textarea:focus {
  outline: none;
  border-color: rgba(12, 118, 107, 0.5);
  box-shadow: 0 0 0 3px rgba(8, 127, 140, 0.12);
}

.message-textarea::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

/* --- Tool actions --------------------------------------------------------- */

.tool-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
  margin-bottom: 24px;
}

/* --- Result outputs ------------------------------------------------------- */

.message-output-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.result-output {
  width: 100%;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 43, 39, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 0.93rem;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  transition: border-color 160ms ease;
}

.result-output:focus {
  outline: none;
  border-color: rgba(12, 118, 107, 0.4);
}

/* --- Output panel empty state --------------------------------------------- */

.output-panel .output-header h2 {
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 750;
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 767px) {
  .message-output-grid {
    grid-template-columns: 1fr;
  }

  .chip-select {
    min-height: 38px;
    font-size: 0.84rem;
    padding: 0 13px;
  }

  .selector-group {
    margin-bottom: 18px;
  }

  .tool-actions {
    margin-top: 18px;
    margin-bottom: 18px;
  }
}

@media (max-width: 480px) {
  .message-textarea {
    min-height: 130px;
  }
}

/* --- Reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .chip-select,
  .message-textarea {
    transition: none;
  }
}
