.embedded-feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(15 23 42 / 0.55);
}

.embedded-feedback-overlay[hidden] {
  display: none;
}

.embedded-feedback-modal {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 32rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--on-surface);
  box-shadow: var(--shadow-lg);
  padding: clamp(1rem, 4vw, 1.5rem);
}

.embedded-feedback-modal h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.embedded-feedback-modal h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.1rem;
}

.embedded-feedback-disclosure {
  margin: 0 0 1rem;
  color: var(--on-surface-variant);
  font-size: 0.95rem;
}

.embedded-feedback-form label {
  display: block;
  margin-top: 0.75rem;
  font-weight: 700;
}

.embedded-feedback-form label span,
.embedded-feedback-count {
  color: var(--on-surface-variant);
  font-size: 0.875rem;
  font-weight: 400;
}

.embedded-feedback-form textarea,
.embedded-feedback-form input[type="email"] {
  box-sizing: border-box;
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--on-surface);
  padding: 0.7rem;
}

.embedded-feedback-form .embedded-newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
}

.embedded-newsletter-consent input {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.1rem 0 0;
}

.embedded-feedback-count {
  margin-top: 0.25rem;
  text-align: right;
}

.embedded-feedback-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.embedded-feedback-error {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  color: var(--error);
}

.embedded-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.embedded-feedback-actions button {
  min-width: 6rem;
  min-height: 3rem;
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  cursor: pointer;
}

.embedded-feedback-cancel {
  background: var(--surface-variant);
  color: var(--on-surface);
  border-color: var(--outline-variant);
}

.embedded-feedback-submit {
  background: var(--success);
  color: white;
  border-color: transparent;
}

@media (max-width: 640px) {
  #embedded-feedback-close {
    position: absolute !important;
    top: 1rem !important;
    left: 1rem !important;
    width: 3rem !important;
    min-width: 3rem !important;
    height: 3rem !important;
    min-height: 3rem !important;
    border-radius: 50% !important;
    background: var(--error) !important;
    color: white !important;
    padding: 0 !important;
  }

  #embedded-feedback-success h2 {
    padding-left: 3.5rem;
  }
}
