/* Funding preference survey modal */

#funding-survey-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(30, 31, 66, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.28s ease;
}

#funding-survey-overlay.visible {
  opacity: 1;
}

#funding-survey-overlay.hiding {
  opacity: 0;
}

.funding-survey-card {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 32px 28px 24px;
  box-shadow: 0 12px 48px rgba(45, 46, 95, 0.18);
  animation: authCardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.funding-survey-lang-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.funding-survey-lang-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
}

.funding-survey-lang-select {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
}

.funding-survey-lang-select:focus {
  outline: none;
  border-color: var(--secondary);
}

.funding-survey-card[dir="rtl"] .funding-survey-lang-bar {
  flex-direction: row-reverse;
}

.funding-survey-card[dir="rtl"] .funding-survey-option-desc {
  padding-left: 0;
  padding-right: 28px;
}

.funding-survey-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 8px;
}

.funding-survey-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 12px;
  line-height: 1.35;
}

.funding-survey-intro {
  color: var(--text-medium);
  font-size: 0.95rem;
  margin: 0 0 20px;
  line-height: 1.5;
}

.funding-survey-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.funding-survey-option {
  display: block;
  border: 2px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.funding-survey-option:hover {
  border-color: var(--editorial-lavender);
  background: #fafbff;
}

.funding-survey-option:has(input:checked) {
  border-color: var(--secondary);
  background: rgba(30, 157, 142, 0.06);
}

.funding-survey-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.funding-survey-option-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.funding-survey-option-title .emoji {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.funding-survey-option-desc {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.45;
  padding-left: 28px;
}

.funding-survey-comment-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.funding-survey-comment {
  width: 100%;
  min-height: 88px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.funding-survey-comment:focus {
  outline: none;
  border-color: var(--secondary);
}

.funding-survey-error {
  display: none;
  color: #dc2626;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.funding-survey-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.funding-survey-submit {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: var(--secondary);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.funding-survey-submit:hover:not(:disabled) {
  filter: brightness(1.05);
}

.funding-survey-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.funding-survey-secondary-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.funding-survey-defer,
.funding-survey-dismiss {
  background: none;
  border: none;
  color: var(--text-light);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.funding-survey-defer:hover,
.funding-survey-dismiss:hover {
  color: var(--text-medium);
}

body.funding-survey-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .funding-survey-card {
    padding: 24px 18px 18px;
  }
}
