/* Review submission page (Skriv anmeldelse) */

/* These elements set their own display, which would otherwise override the
   browser's [hidden] rule and leave them permanently visible (the overlay
   would sit on top of the form and block every click). Keep [hidden] winning. */
.dp-review-overlay[hidden],
.dp-review-upload__done[hidden],
.dp-review-upload__placeholder[hidden],
.dp-review-form__status[hidden] {
  display: none !important;
}

.dp-review-form-page {
  background: var(--dp-bg);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}

.dp-review-form-section__inner {
  width: min(640px, calc(100vw - 2rem));
  margin: 0 auto;
}

.dp-review-form__head {
  text-align: center;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.dp-review-form__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dp-accent);
  margin: 0 0 0.6rem;
}

.dp-review-form__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 1.1;
  color: var(--dp-text);
  margin: 0 0 0.75rem;
}

.dp-review-form__subtitle {
  color: var(--dp-text-soft);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.dp-review-form {
  background: #fff;
  border: 1px solid var(--dp-border);
  border-radius: 24px;
  box-shadow: var(--dp-shadow-soft);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.dp-review-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dp-review-form__label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dp-text);
}

.dp-review-form__req {
  color: #ff3722;
}

.dp-review-form__input,
.dp-review-form__textarea {
  width: 100%;
  border: 1.5px solid var(--dp-border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--dp-text);
  background: var(--dp-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dp-review-form__textarea {
  resize: vertical;
  min-height: 120px;
}

.dp-review-form__input:focus,
.dp-review-form__textarea:focus {
  outline: none;
  border-color: var(--dp-accent);
  box-shadow: 0 0 0 3px rgba(106, 90, 224, 0.15);
}

/* Star picker */
.dp-star-picker {
  display: inline-flex;
  gap: 0.35rem;
}

.dp-star-picker__star {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}

.dp-star-picker__star svg {
  width: 38px;
  height: 38px;
  fill: rgba(19, 36, 64, 0.16);
  transition: fill 0.12s ease, transform 0.12s ease;
}

.dp-star-picker__star:hover svg {
  transform: scale(1.08);
}

.dp-star-picker__star.is-active svg {
  fill: #00b67a;
}

/* Image upload */
.dp-review-upload {
  display: block;
  position: relative;
  border: 1.5px dashed var(--dp-border);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dp-review-upload:hover {
  border-color: var(--dp-accent);
  background: rgba(106, 90, 224, 0.04);
}

.dp-review-upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dp-review-upload__placeholder {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--dp-text-muted);
  font-size: 0.95rem;
}

/* Uploaded state: green check + filename, no big preview */
.dp-review-upload.is-done {
  border-style: solid;
  border-color: rgba(0, 182, 122, 0.5);
  background: rgba(0, 182, 122, 0.06);
}

.dp-review-upload__done {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #0a7a55;
  font-size: 0.95rem;
  font-weight: 600;
}

.dp-review-upload__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #00b67a;
  color: #fff;
  flex-shrink: 0;
}

.dp-review-upload__filename {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Consent */
.dp-review-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--dp-text-soft);
  line-height: 1.5;
}

.dp-review-form__consent input {
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--dp-accent);
  flex-shrink: 0;
}

/* Honeypot — hidden from humans */
.dp-review-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Submit — Apple "liquid glass" style, slightly rounded (not a full pill) */
.dp-review-form__submit {
  position: relative;
  overflow: hidden;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(122, 104, 255, 0.92) 0%, rgba(91, 63, 214, 0.88) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  box-shadow:
    0 8px 26px rgba(90, 63, 214, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 6px rgba(58, 34, 168, 0.35);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.5rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.15s ease;
}

/* glossy top highlight */
.dp-review-form__submit::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 44%;
  border-radius: 15px 15px 60% 60%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.dp-review-form__submit:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 36px rgba(90, 63, 214, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 6px rgba(58, 34, 168, 0.4);
}

.dp-review-form__submit:active {
  transform: translateY(0);
}

.dp-review-form__submit:disabled,
.dp-review-form__submit.is-loading {
  cursor: progress;
}

/* Spinner inside the button (shown only while loading) */
.dp-review-form__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: dp-review-spin 0.7s linear infinite;
}

.dp-review-form__submit.is-loading .dp-review-form__spinner {
  display: inline-block;
}

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

/* Status message */
.dp-review-form__status {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.dp-review-form__status.is-success {
  background: rgba(0, 182, 122, 0.1);
  color: #0a7a55;
}

.dp-review-form__status.is-error {
  background: rgba(255, 55, 34, 0.08);
  color: #c0291a;
}

/* CTA button on the reviews listing page */
.dp-reviews-cta {
  text-align: center;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

/* The site's standard button, copied from the shared base in site.css rather
   than joined to it: this stylesheet loads after site.css, so a flat colour and
   a lighter weight here quietly beat the shared rule and the button ended up
   looking like nothing else on the site.
   18px rather than the base's 999px — the softened rectangle .dp-steps-editorial__cta
   already uses, which is the same button without the lozenge. */
.dp-reviews-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 58px;
  padding: 15px 34px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #6a5ae0, #5b3fd6);
  box-shadow: 0 10px 28px rgba(90, 63, 214, 0.26);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dp-reviews-cta__btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(90, 63, 214, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  .dp-reviews-cta__btn,
  .dp-reviews-cta__btn:hover {
    transition: none;
    transform: none;
  }
}

/* ── Success overlay ─────────────────────────────────────────── */
body.dp-review-overlay-open {
  overflow: hidden;
}

.dp-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(19, 36, 64, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dp-review-overlay.is-visible {
  opacity: 1;
}

.dp-review-overlay__card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow: var(--dp-shadow-medium);
  padding: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.dp-review-overlay.is-visible .dp-review-overlay__card {
  transform: translateY(0) scale(1);
}

.dp-review-overlay__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: #00b67a;
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 182, 122, 0.32);
}

.dp-review-overlay__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  color: var(--dp-text);
  margin: 0 0 0.6rem;
}

.dp-review-overlay__text {
  color: var(--dp-text-soft);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.6rem;
}

/* Apple "liquid glass" button, slightly rounded (matches submit) */
.dp-review-overlay__btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.9rem 1.9rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(122, 104, 255, 0.92) 0%, rgba(91, 63, 214, 0.88) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  box-shadow:
    0 8px 26px rgba(90, 63, 214, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 6px rgba(58, 34, 168, 0.35);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dp-review-overlay__btn::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 44%;
  border-radius: 15px 15px 60% 60%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.dp-review-overlay__btn:hover {
  transform: translateY(-1px);
  color: #fff;
  box-shadow:
    0 14px 36px rgba(90, 63, 214, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 6px rgba(58, 34, 168, 0.4);
}
