.research-widget,
.research-dev-panel {
  --research-accent: #ffd978;
  --research-surface: #ffffff;
  --research-border: rgba(0, 0, 0, 0.12);
  --research-muted: rgba(0, 0, 0, 0.62);
  font-family: inherit;
}

.research-widget[hidden],
.research-backdrop[hidden],
.research-dev-panel[hidden] {
  display: none !important;
}

.research-backdrop {
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(0, 0, 0, 0.18);
}

.research-widget {
  position: fixed;
  z-index: 90;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--research-border);
  border-radius: 24px;
  background: var(--research-surface);
  color: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.14);
}

.research-widget--floating {
  right: 24px;
  bottom: 24px;
}

.research-widget--slide-in {
  top: 24px;
  right: 24px;
  bottom: 24px;
}

.research-widget--modal {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.research-widget__inner {
  padding: 22px;
}

.research-widget__accent {
  width: 42px;
  height: 6px;
  border-radius: 999px;
  background: var(--research-accent);
  margin-bottom: 18px;
}

.research-widget__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.research-widget h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.1;
}

.research-widget p {
  margin: 8px 0 0;
  color: var(--research-muted);
  line-height: 1.45;
}

.research-widget__close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--research-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.research-form {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.research-question {
  display: grid;
  gap: 10px;
}

.research-question legend,
.research-question label:first-child {
  font-weight: 700;
}

.research-question fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.research-options {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.research-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111;
}

.research-rating {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.research-rating .research-option {
  min-width: 38px;
  height: 38px;
  justify-content: center;
  border: 1px solid var(--research-border);
  border-radius: 999px;
}

.research-question input[type="text"],
.research-question textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--research-border);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
}

.research-question textarea {
  min-height: 96px;
  resize: vertical;
}

.research-widget__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.research-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.research-button--primary {
  background: #000;
  color: #fff;
}

.research-button--secondary {
  background: #f4f4f4;
  color: #000;
}

.research-dev-panel {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 95;
  width: min(340px, calc(100vw - 32px));
  border: 1px solid var(--research-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.14);
  padding: 14px;
}

.research-dev-panel h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.research-dev-panel ul {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.research-dev-panel li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.research-dev-panel button {
  border: 1px solid var(--research-border);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .research-widget,
  .research-widget--floating,
  .research-widget--slide-in,
  .research-widget--modal {
    right: 12px;
    bottom: 12px;
    left: 12px;
    top: auto;
    width: auto;
    max-height: calc(100vh - 24px);
    transform: none;
  }
}
