/* ============================================================
   FOUNDER COCKPIT — Review Modal
   v=903 | 2026-05-06
   Customer review form — premium luxury-consultancy styling
   ============================================================ */

/* ─── Modal shell ────────────────────────────────────────── */
.rv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0s linear 0.32s;
}
.rv-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.rv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 13, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rv-modal-panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: linear-gradient(180deg, #FFFFFF 0%, #FDFBF6 100%);
  border: 1px solid rgba(28,24,20,0.08);
  border-radius: 24px;
  padding: 42px 44px 36px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 30px 80px -20px rgba(28,24,20,0.40),
    0 14px 36px -12px rgba(154,122,53,0.18);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  isolation: isolate;
}
.rv-modal.is-open .rv-modal-panel {
  transform: translateY(0) scale(1);
}

.rv-modal-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold) 20%,
    var(--gold-bright) 50%,
    var(--gold) 80%,
    transparent 100%);
  border-radius: 24px 24px 0 0;
  z-index: 1;
}

.rv-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(28,24,20,0.10);
  background: var(--bg-white);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 2;
}
.rv-modal-close:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: var(--gold-pale);
  transform: rotate(90deg);
}
.rv-modal-close svg { width: 16px; height: 16px; display: block; }

/* ─── Modal head ─────────────────────────────────────────── */
.rv-modal-head {
  margin-bottom: 28px;
}
.rv-modal-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.rv-modal-head h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-h);
  margin: 0 0 12px;
}
.rv-modal-sub {
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* ─── State containers ───────────────────────────────────── */
.rv-state {
  position: relative;
}
.rv-state[hidden] { display: none; }

/* ─── Form layout ────────────────────────────────────────── */
.rv-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rv-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.rv-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}

.rv-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-h);
  display: inline-block;
}

.rv-input,
.rv-textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-h);
  background: var(--bg-white);
  border: 1px solid rgba(28,24,20,0.14);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  width: 100%;
}
.rv-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
  font-family: var(--font-sans);
}
.rv-input:hover,
.rv-textarea:hover {
  border-color: rgba(28,24,20,0.24);
}
.rv-input:focus,
.rv-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
  background: #FFF;
}
.rv-input.rv-invalid,
.rv-textarea.rv-invalid {
  border-color: #c14848;
  box-shadow: 0 0 0 3px rgba(193,72,72,0.12);
}

.rv-counter {
  align-self: flex-end;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: -2px;
}

/* Honeypot — invisible to real users, bots fill it */
.rv-honeypot {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ─── Star rating (interactive) ──────────────────────────── */
.rv-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.rv-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}
.rv-star svg {
  width: 26px;
  height: 26px;
  fill: rgba(28,24,20,0.16);
  transition: fill 0.2s ease, transform 0.2s ease;
}
.rv-star:hover {
  background: rgba(201,168,76,0.10);
  transform: translateY(-1px);
}
.rv-star:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,168,76,0.30);
}
.rv-star.is-active svg,
.rv-star.is-hover svg {
  fill: url(#rvStarGrad);
  fill: var(--gold);
}
.rv-star.is-active svg {
  filter: drop-shadow(0 1px 2px rgba(154,122,53,0.30));
}
.rv-stars-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--gold-dark);
  margin-left: 8px;
  min-height: 22px;
}

/* ─── Checkbox (DSGVO consent) ───────────────────────────── */
.rv-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin-top: 4px;
  user-select: none;
}
.rv-checkbox input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.rv-checkbox-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid rgba(28,24,20,0.20);
  background: var(--bg-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s ease;
  margin-top: 1px;
}
.rv-checkbox-box svg {
  width: 14px;
  height: 14px;
}
.rv-checkbox:hover .rv-checkbox-box {
  border-color: var(--gold);
}
.rv-checkbox input:focus-visible + .rv-checkbox-box {
  box-shadow: 0 0 0 3px rgba(201,168,76,0.25);
}
.rv-checkbox input:checked + .rv-checkbox-box {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-dark));
  border-color: var(--gold-dark);
  color: #FFF;
}
.rv-checkbox-text {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-body);
  flex: 1;
}
.rv-checkbox-text a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.rv-checkbox-text a:hover { color: var(--gold); }

/* ─── Submit + spinner ───────────────────────────────────── */
.rv-submit {
  position: relative;
  width: 100%;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.rv-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.rv-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: rv-spin 0.7s linear infinite;
}
.rv-submit.is-loading .rv-spinner { display: inline-block; }
.rv-submit.is-loading .rv-submit-label { opacity: 0.85; }

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

.rv-footnote {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  margin: 6px 0 0;
}

/* ─── Error message ──────────────────────────────────────── */
.rv-error {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fbecec;
  border: 1px solid rgba(193,72,72,0.28);
  color: #8a2929;
  font-size: 0.86rem;
  line-height: 1.45;
}

/* ─── Success state ──────────────────────────────────────── */
.rv-state-success {
  text-align: center;
  padding: 18px 0 6px;
}
.rv-success-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FDF8E8 0%, #F5EDD4 100%);
  border: 1.5px solid rgba(201,168,76,0.30);
  color: var(--gold-dark);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.85) inset,
    0 8px 24px -8px rgba(154,122,53,0.30);
  animation: rv-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes rv-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
.rv-success-icon svg {
  width: 44px;
  height: 44px;
}
.rv-state-success h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  color: var(--text-h);
}
.rv-state-success p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 28px;
}
.rv-success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ─── Body lock when modal open ──────────────────────────── */
body.rv-modal-open {
  overflow: hidden;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .rv-modal { padding: 12px; }
  .rv-modal-panel {
    padding: 32px 22px 26px;
    border-radius: 18px;
  }
  .rv-row { grid-template-columns: 1fr; }
  .rv-modal-head h3 { font-size: 1.4rem; }
  .rv-star { width: 36px; height: 36px; }
  .rv-star svg { width: 24px; height: 24px; }
  .rv-success-actions .btn { width: 100%; }
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rv-modal,
  .rv-modal-panel,
  .rv-modal-close,
  .rv-star,
  .rv-checkbox-box,
  .rv-input,
  .rv-textarea,
  .rv-success-icon,
  .rv-spinner {
    transition: none !important;
    animation: none !important;
  }
}
