/* OVG Reaction Widget */

.ovg-reaction-widget {
  margin: 2rem 0 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid #e5e7eb;
}

.ovg-reaction-label {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0 0 1rem;
}

/* Buttons */
.ovg-reaction-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ovg-reaction-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  background: #f9fafb;
  font-size: 0.9rem;
  font-family: inherit;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-height: 44px;
}

.ovg-reaction-button:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.ovg-reaction-button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.ovg-reaction-button--selected {
  background: #ede9fe;
  border-color: #6366f1;
  color: #4338ca;
  font-weight: 600;
}

.ovg-reaction-button:disabled {
  cursor: default;
  opacity: 0.7;
}

/* Inline form */
.ovg-reaction-form[hidden] {
  display: none;
}

.ovg-reaction-form {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 360px;
}

.ovg-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ovg-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.ovg-field input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s;
}

.ovg-field input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.ovg-field-error {
  font-size: 0.8rem;
  color: #dc2626;
  min-height: 1em;
  margin: 0;
}

/* Submit button */
.ovg-submit-button {
  align-self: flex-start;
  padding: 0.5rem 1.5rem;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s;
}

.ovg-submit-button:hover:not(:disabled) {
  background: #4f46e5;
}

.ovg-submit-button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.ovg-submit-button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Confirmation / error message */
.ovg-reaction-message {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: #374151;
  min-height: 1.25em;
}

/* Mobile */
@media (max-width: 480px) {
  .ovg-reaction-buttons {
    flex-direction: column;
  }

  .ovg-reaction-button {
    width: 100%;
    justify-content: center;
  }

  .ovg-reaction-form {
    max-width: 100%;
  }

  .ovg-field input {
    width: 100%;
  }

  .ovg-submit-button {
    width: 100%;
    justify-content: center;
  }
}
