/* GradCafe-inspired application outcome survey (light academic / community tone) */
.survey-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: min(92vh, 900px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--jp-border, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  background: var(--jp-surface, #fff);
  color: var(--jp-ink, #0f172a);
}

.survey-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.survey-dialog[open] {
  display: flex;
  flex-direction: column;
}

.survey-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}

.survey-header {
  position: relative;
  padding: 18px 48px 14px 22px;
  border-bottom: 1px solid var(--jp-border, #e2e8f0);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  border-radius: 16px 16px 0 0;
}

.survey-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jp-accent, #db2777);
}

.survey-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.survey-sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--jp-muted, #64748b);
  line-height: 1.45;
}

.survey-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--jp-ink-secondary, #334155);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.survey-close:hover {
  background: rgba(15, 23, 42, 0.1);
}

.survey-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.survey-field {
  margin-bottom: 18px;
}

.survey-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--jp-ink-secondary, #334155);
  margin-bottom: 6px;
}

.survey-field input[type="text"],
.survey-field input[type="email"],
.survey-field input[type="tel"],
.survey-field input[type="date"],
.survey-field input[type="search"],
.survey-field select,
.survey-field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--jp-border, #e2e8f0);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: var(--jp-ink, #0f172a);
  background: #fff;
}

.survey-field textarea {
  min-height: 100px;
  resize: vertical;
}

.survey-field input:focus,
.survey-field select:focus,
.survey-field textarea:focus {
  outline: none;
  border-color: var(--jp-accent, #db2777);
  box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.12);
}

.survey-search-wrap {
  position: relative;
}

.survey-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid var(--jp-border, #e2e8f0);
  border-radius: 12px;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.survey-results:empty {
  display: none;
}

.survey-icon-slot {
  display: inline-flex;
  flex-shrink: 0;
  vertical-align: middle;
}

.survey-icon-slot svg {
  border-radius: 10px;
  overflow: hidden;
}

.survey-results li button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.survey-results li:last-child button {
  border-bottom: 0;
}

.survey-results li button:hover,
.survey-results li button:focus-visible {
  background: #f8fafc;
}

.survey-results .r-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--jp-muted, #64748b);
  font-weight: 600;
}

.survey-picked {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.08), rgba(13, 148, 136, 0.08));
  border: 1px solid rgba(219, 39, 119, 0.2);
  margin-top: 10px;
}

.survey-picked.hidden {
  display: none !important;
}

.survey-picked strong {
  display: block;
  font-size: 15px;
}

.survey-picked span {
  font-size: 12px;
  color: var(--jp-muted, #64748b);
}

.survey-drop {
  border: 2px dashed var(--jp-border-strong, #cbd5e1);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: var(--jp-surface-subtle, #f8fafc);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.survey-drop:hover,
.survey-drop.dragover {
  border-color: var(--jp-teal, #0d9488);
  background: rgba(13, 148, 136, 0.06);
}

.survey-drop input[type="file"] {
  display: none;
}

.survey-drop p {
  margin: 0;
  font-size: 13px;
  color: var(--jp-muted, #64748b);
}

.survey-drop strong {
  color: var(--jp-teal-hover, #0f766e);
}

.survey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--jp-border, #e2e8f0);
}

.survey-actions .primary-btn {
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

.survey-note {
  font-size: 12px;
  color: var(--jp-muted, #64748b);
  margin-top: 10px;
}

.survey-success {
  padding: 14px;
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.35);
  color: var(--jp-teal-hover, #0f766e);
  font-weight: 600;
  font-size: 14px;
}

.survey-success.hidden {
  display: none !important;
}

@media (max-width: 540px) {
  .survey-dialog {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .survey-header {
    border-radius: 0;
  }
}
