.rfrw[hidden],
.rfrw [hidden] {
  display: none !important;
}

.rfrw {
  position: fixed;
  z-index: 100100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: #111;
  font-family: inherit;
}

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

.rfrw__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .62);
  animation: rfrw-fade .2s ease both;
}

.rfrw__dialog {
  position: relative;
  z-index: 1;
  width: min(768px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 32px));
  min-height: 540px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  color: #111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
  animation: rfrw-dialog-in .36s cubic-bezier(.16, 1, .3, 1) both;
}

.rfrw__close {
  position: absolute;
  z-index: 5;
  top: 17px;
  left: 20px;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  color: #111 !important;
  font: inherit;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}

.rfrw__close:hover {
  background: #f1f1f1 !important;
}

.rfrw__form {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.rfrw__step {
  min-height: 0;
  flex: 1 1 auto;
  padding: 74px 54px 24px;
  overflow: auto;
}

.rfrw__step-inner {
  width: min(480px, 100%);
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.rfrw h2 {
  margin: 0 0 26px;
  color: #111;
  font: inherit;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.rfrw__rating-step h2 {
  margin-bottom: 38px;
  font-size: 21px;
  font-weight: 500;
}

.rfrw__rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.rfrw .rfrw__star {
  width: 51px !important;
  min-width: 51px !important;
  max-width: 51px !important;
  height: 53px !important;
  min-height: 53px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #efb600 !important;
  font: 52px/1 Arial, sans-serif;
  cursor: pointer;
  appearance: none;
}

.rfrw .rfrw__star:hover,
.rfrw .rfrw__star:focus-visible {
  transform: scale(1.08);
}

.rfrw__rating-labels {
  width: 280px;
  margin: 8px auto 0;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.rfrw__subtitle {
  margin: -21px 0 34px;
  font-size: 17px;
}

.rfrw__upload-box {
  width: 100%;
  padding: 18px 16px 15px;
  display: grid;
  gap: 11px;
  border: 1px solid #888;
  border-radius: 8px;
}

.rfrw__upload-box > strong {
  margin-bottom: 2px;
  font-size: 20px;
}

.rfrw__upload-box > small {
  color: #666;
  font-size: 12px;
}

.rfrw__upload-button {
  min-height: 48px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  background: #000;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.rfrw__upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.rfrw__media-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.rfrw__media-preview:empty {
  display: none;
}

.rfrw__media-chip {
  max-width: 180px;
  padding: 5px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rfrw textarea,
.rfrw input[type="text"],
.rfrw input[type="email"] {
  width: 100% !important;
  margin: 0 !important;
  border: 1px solid #888 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #111 !important;
  font: inherit !important;
  box-shadow: none !important;
}

.rfrw textarea {
  min-height: 255px;
  padding: 14px 13px !important;
  resize: vertical;
  font-size: 16px !important;
}

.rfrw input[type="text"],
.rfrw input[type="email"] {
  height: 49px !important;
  min-height: 49px !important;
  padding: 10px 12px !important;
}

.rfrw__about-step {
  width: min(480px, 100%);
  text-align: left;
}

.rfrw__about-step h2 {
  text-align: center;
}

.rfrw__about-step label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.rfrw__label-text {
  display: inline-block;
  color: #111;
  line-height: 1.25;
}

.rfrw__label-text .rfrw__required {
  color: #bd1c1c;
}

.rfrw__text-guide {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #666;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.rfrw__text-guide b {
  font-weight: 600;
}

.rfrw__name-fields {
  margin-bottom: 25px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.rfrw__legal {
  margin: 31px auto 0;
  color: #555;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

.rfrw__legal a {
  color: inherit;
  text-decoration: underline;
}

.rfrw__footer {
  min-height: 78px;
  padding: 12px 22px 18px 34px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: end;
  gap: 18px;
}

.rfrw .rfrw__back,
.rfrw .rfrw__next,
.rfrw__success button {
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 10px 18px !important;
  border: 0 !important;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  letter-spacing: normal !important;
  text-transform: none !important;
  cursor: pointer;
}

.rfrw .rfrw__back {
  justify-self: start;
  background: transparent !important;
  color: #111 !important;
}

.rfrw .rfrw__next,
.rfrw__success button {
  min-width: 120px;
  background: #000 !important;
  color: #fff !important;
}

.rfrw .rfrw__next.is-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  margin-right: 7px;
  display: inline-block;
  vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rfrw-spin .7s linear infinite;
}

.rfrw .rfrw__next:disabled {
  background: #ccc !important;
  color: #777 !important;
  cursor: not-allowed;
}

.rfrw__progress {
  align-self: center;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.rfrw__progress span {
  width: 80px;
  height: 8px;
  border-radius: 999px;
  background: #ddd;
  transition: background-color .2s ease;
}

.rfrw__progress span.is-complete {
  background: #000;
}

.rfrw__status {
  min-height: 20px;
  margin: 0;
  padding: 0 28px;
  flex: 0 0 auto;
  color: #b42318;
  font-size: 13px;
  text-align: center;
}

.rfrw__honeypot {
  position: fixed !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.rfrw__success {
  height: 100%;
  padding: 70px;
}

.rfrw__success > div {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.rfrw__success-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 34px;
}

.rfrw__success h2 {
  margin-bottom: 12px;
}

.rfrw__success p {
  max-width: 460px;
  margin: 0 0 28px;
  color: #555;
  line-height: 1.6;
}

.rfrw .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes rfrw-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rfrw-dialog-in {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes rfrw-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 620px) {
  .rfrw { padding: 8px; }
  .rfrw__dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    min-height: 0;
  }
  .rfrw__step { padding: 70px 22px 16px; }
  .rfrw h2 { font-size: 25px; }
  .rfrw__rating-step h2 { font-size: 19px; }
  .rfrw .rfrw__star {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    font-size: 44px;
  }
  .rfrw__rating { gap: 1px; }
  .rfrw__rating-labels { width: 245px; }
  .rfrw__name-fields { grid-template-columns: 1fr; margin-bottom: 18px; }
  .rfrw__footer {
    min-height: 73px;
    padding: 10px 12px max(15px, env(safe-area-inset-bottom));
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: 8px;
  }
  .rfrw .rfrw__back,
  .rfrw .rfrw__next { min-width: 0; padding: 8px 10px !important; white-space: nowrap; }
  .rfrw__progress { width: 100%; min-width: 0; gap: 5px; }
  .rfrw__progress span { width: auto; min-width: 0; max-width: 52px; flex: 1 1 0; height: 6px; }
  .rfrw__success { padding: 48px 24px; }
}

@media (max-width: 360px) {
  .rfrw__footer { padding-inline: 8px; gap: 5px; }
  .rfrw .rfrw__back,
  .rfrw .rfrw__next { padding-inline: 7px !important; font-size: 13px; }
  .rfrw__progress { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .rfrw, .rfrw * { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
