.aoe-widget {
  --aoe-accent: #6c5ce7;
  --aoe-accent-dark: #5546ca;
  --aoe-star: #f4b400;
  --aoe-text: #202433;
  --aoe-muted: #6b7280;
  --aoe-border: #e5e7eb;
  --aoe-surface: #ffffff;
  --aoe-columns: 3;
  color: var(--aoe-text);
  font-family: inherit;
}

.aoe-widget *,
.aoe-widget *::before,
.aoe-widget *::after {
  box-sizing: border-box;
}

.aoe-form-card,
.aoe-opinion {
  background: var(--aoe-surface);
  border: 1px solid var(--aoe-border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(21, 28, 55, 0.07);
}

.aoe-form-card {
  max-width: 760px;
  margin: 0 auto 36px;
  padding: clamp(22px, 4vw, 38px);
}

.aoe-title {
  margin: 0 0 24px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
}

.aoe-field {
  margin-bottom: 18px;
}

.aoe-field label,
.aoe-field legend {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--aoe-text);
}

.aoe-field input[type="text"],
.aoe-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--aoe-text);
  background: #fff;
  border: 1px solid var(--aoe-border);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.aoe-field textarea {
  min-height: 130px;
  resize: vertical;
}

.aoe-field input[type="text"]:focus,
.aoe-field textarea:focus {
  border-color: var(--aoe-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aoe-accent) 18%, transparent);
}

.aoe-field small,
.aoe-moderation-note {
  color: var(--aoe-muted);
  font-size: 13px;
}

.aoe-rating-field {
  padding: 0;
  border: 0;
}

.aoe-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 3px;
}

.aoe-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.aoe-stars label {
  margin: 0;
  color: #d1d5db;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transition: color .15s ease, transform .15s ease;
}

.aoe-stars label:hover,
.aoe-stars label:hover ~ label,
.aoe-stars input:checked ~ label {
  color: var(--aoe-star);
}

.aoe-stars label:hover {
  transform: translateY(-2px);
}

.aoe-stars input:focus-visible + label {
  outline: 2px solid var(--aoe-accent);
  outline-offset: 3px;
}

.aoe-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 20px;
  color: var(--aoe-muted);
  font-size: 14px;
  line-height: 1.45;
}

.aoe-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--aoe-accent);
}

.aoe-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  color: #fff;
  background: var(--aoe-accent);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease, opacity .2s ease;
}

.aoe-submit:hover {
  transform: translateY(-1px);
  filter: brightness(.93);
}

.aoe-submit:disabled {
  cursor: wait;
  opacity: .65;
}

.aoe-moderation-note {
  margin: 12px 0 0;
}

.aoe-message {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
}

.aoe-message.is-visible {
  display: block;
}

.aoe-message.is-success {
  color: #17643a;
  background: #eaf8f0;
  border: 1px solid #b8e8ca;
}

.aoe-message.is-error {
  color: #8a2632;
  background: #fff0f1;
  border: 1px solid #f4c2c7;
}

.aoe-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

.aoe-list {
  display: grid;
  grid-template-columns: repeat(var(--aoe-columns), minmax(0, 1fr));
  gap: 20px;
}

.aoe-opinion {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px;
}

.aoe-opinion-stars {
  margin-bottom: 14px;
  color: var(--aoe-star);
  font-size: 20px;
  letter-spacing: 2px;
}

.aoe-opinion-text {
  flex: 1;
  line-height: 1.65;
}

.aoe-opinion-text p:first-child {
  margin-top: 0;
}

.aoe-opinion-text p:last-child {
  margin-bottom: 0;
}

.aoe-opinion-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  color: var(--aoe-muted);
  border-top: 1px solid var(--aoe-border);
  font-size: 14px;
}

.aoe-opinion-footer strong {
  color: var(--aoe-text);
}

.aoe-empty {
  margin: 0;
  padding: 20px;
  text-align: center;
  color: var(--aoe-muted);
  border: 1px dashed var(--aoe-border);
  border-radius: 12px;
}

@media (max-width: 1024px) {
  .aoe-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .aoe-list {
    grid-template-columns: 1fr;
  }

  .aoe-form-card,
  .aoe-opinion {
    border-radius: 14px;
  }

  .aoe-opinion-footer {
    flex-direction: column;
  }
}
