/* Scoped to .letter-sum-widget to avoid site-wide changes */
.letter-sum-widget {
  font-family: Arial, sans-serif;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  background: #FAF7F0;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  color: #111;
}

/* Title */
.letter-sum-widget__title {
  margin: 0 0 14px 0;
  font-size: 20px;
  text-align: center;
}

/* Grid layout: input left, output right on desktop */
.letter-sum-widget__grid {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Panels */
.letter-sum-widget__panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Labels */
.letter-sum-widget__label {
  font-weight: 600;
  font-size: 14px;
  color: #222;
}

/* Textareas */
.letter-sum-widget__textarea {
  width: 100%;
  min-height: 220px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #d3d3d3;
  resize: vertical;
  font-size: 15px;
  line-height: 1.4;
  background: #fff;
}

/* Output textarea slight different look */
.letter-sum-widget__textarea--output {
  background: #fff;
  min-height: 200px;
  font-weight: 600;
  color: #0b3a2a;
}

/* Options area */
.letter-sum-widget__opts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.letter-sum-widget__opt {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.letter-sum-widget__opt-radio {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

/* Actions (buttons) */
.letter-sum-widget__actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.letter-sum-widget__actions--right {
  justify-content: flex-end;
}

/* Buttons: primary and default */
.letter-sum-widget__btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  background: #e0e0e0;
  color: #111;
  transition: transform .12s ease, box-shadow .12s ease;
}

.letter-sum-widget__btn:active { transform: translateY(1px); }

.letter-sum-widget__btn--primary {
  background: #4CAF50;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(76,175,80,0.14);
}

.letter-sum-widget__btn:hover { opacity: 0.95; }

/* Clear button variant */
.letter-sum-widget__btn--clear {
  background: #bdbdbd;
}

/* Responsive: stack panels for narrow screens */
@media (max-width: 768px) {
  .letter-sum-widget__grid {
    flex-direction: column;
  }

  .letter-sum-widget__textarea {
    min-height: 180px;
  }

  .letter-sum-widget__actions {
    flex-wrap: wrap;
  }
}

/* Small visual polish */
.letter-sum-widget__panel--input { order: 1; }
.letter-sum-widget__panel--output { order: 2; }
