/* Native KVS outcomes, shared by V2 pages and AJAX dialogs. */
.v2-feedback-ui .success,
.v2-feedback-ui .generic-error,
.v2-feedback-ui .text-message,
body.v2-feedback-ui .v2-email-links-result .text-message,
.v2-feedback-ui .v2-notice {
  box-sizing: border-box;
  position: relative;
  max-width: 100%;
  margin: 16px 0;
  padding: 24px;
  color: #f3e9ed;
  background: #251119;
  border: 1px solid rgba(243,233,237,.18);
  border-left: 4px solid #b2175a;
  border-radius: 12px;
  box-shadow: none;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
  overflow-wrap: anywhere;
  scroll-margin-block: 100px 24px;
}

.v2-feedback-ui .success,
.v2-feedback-ui .v2-notice--success {
  border-left-color: #82c7a3;
}

.v2-feedback-ui .generic-error,
.v2-feedback-ui .v2-notice--error {
  border-left-color: #f29fae;
  background: #351720;
}

.v2-feedback-ui .success:empty,
.v2-feedback-ui .generic-error:empty,
.v2-feedback-ui .field-error:empty {
  display: none;
}

/* KVS hidden messages may contain template whitespace. Its show/fadeIn sets
   inline display when a real response arrives, so keep this non-important. */
.v2-feedback-ui .success.hidden,
.v2-feedback-ui .generic-error.hidden,
.v2-feedback-ui .field-error.hidden,
.v2-feedback-ui .text-message.hidden,
.v2-feedback-ui .v2-notice.hidden {
  display: none;
}

.v2-feedback-ui .v2-notice h2,
.v2-feedback-ui .v2-notice h3 {
  margin: 0 0 12px;
  color: #f3e9ed;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 500;
  line-height: 1.2;
}

.v2-feedback-ui .v2-notice p,
.v2-feedback-ui .v2-notice-copy {
  margin: 0 0 16px;
  color: #f3e9ed;
  font-size: 16px;
  line-height: 1.65;
}

.v2-feedback-ui .v2-notice .v2-notice-help {
  color: #cdb7c1;
}

.v2-feedback-ui .v2-notice > :last-child { margin-bottom: 0; }

.v2-feedback-ui .success a,
.v2-feedback-ui .generic-error a,
.v2-feedback-ui .text-message a {
  color: #f3e9ed;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.v2-feedback-ui .v2-notice .v2-notice-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  color: #fff;
  background: #b2175a;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: Inter, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: normal;
}

.v2-feedback-ui .v2-notice .v2-notice-action:hover { background: #cf2a72; }

.v2-feedback-ui .v2-notice:focus-visible,
.v2-feedback-ui .success:focus-visible,
.v2-feedback-ui .generic-error:focus-visible,
.v2-feedback-ui .v2-notice-action:focus-visible {
  outline: 2px solid #f3e9ed;
  outline-offset: 4px;
}

.v2-feedback-ui .field-error {
  position: static;
  float: none;
  clear: both;
  width: 100%;
  max-width: 100%;
  margin-top: 8px;
  color: #f6adbc;
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  scroll-margin-block: 100px 24px;
}

.v2-feedback-ui .checkbox-label:has(.field-error:not(:empty)) { flex-wrap: wrap; }
.v2-feedback-ui .checkbox-label .field-error { flex: 0 0 100%; }
.v2-feedback-ui .v2-signup-label { font-size: 16px; }
.v2-feedback-ui .v2-signup-modal .input,
.v2-feedback-ui .small_popup input,
.v2-feedback-ui .v2-support-form input,
.v2-feedback-ui .v2-support-form textarea { font-size: 16px; }

.v2-feedback-ui .v2-support-form .row { margin-bottom: 24px; }
.v2-feedback-ui .v2-support-form label { display: block; }
.v2-feedback-ui .v2-support-form .name { display: block; margin-bottom: 8px; }
.v2-feedback-ui .v2-support-form .v2-field-help { margin: 8px 0 0; color: #cdb7c1; font-size: 16px; line-height: 1.5; }
.v2-feedback-ui .v2-support-form .input { width: 100%; min-height: 48px; }

/* Keep the existing Fancybox close/refresh behaviour and contain long responses. */
.v2-feedback-ui .fancybox-inner:has(.success),
.v2-feedback-ui .fancybox-inner:has([data-v2-notice]) {
  height: auto !important;
  max-height: calc(100dvh - 72px);
  overflow: auto !important;
  overscroll-behavior: contain;
}

.v2-feedback-ui .fancybox-inner > .success { margin: 0; }
.v2-feedback-ui .v2-signup-result.v2-notice { margin-inline: auto; }
.v2-feedback-ui .v2-email-links-result { display: block; }

@media (max-width: 600px) {
  .v2-feedback-ui .success,
  .v2-feedback-ui .generic-error,
  .v2-feedback-ui .text-message,
  .v2-feedback-ui .v2-notice { padding: 22px 18px; scroll-margin-top: 88px; }
  .v2-feedback-ui .v2-notice .v2-notice-action { width: 100%; }
  .v2-feedback-ui .fancybox-wrap:has(.success),
  .v2-feedback-ui .fancybox-wrap:has([data-v2-notice]) {
    width: calc(100% - 32px) !important;
    max-width: 520px;
    left: 16px !important;
  }
}
