/* =========================================================
   DESIGN TOKENS — eCitizen / BRS style
========================================================= */
.surveys-main,
.surveys-unlock-overlay {
  --gov-green: #046a38;
  --gov-green-dark: #023d20;
  --gov-green-light: #e6f3ec;
  --gov-navy: #0b2545;
  --gov-navy-soft: #4a5b73;
  --gov-gold: #b8860b;
  --gov-gold-light: #fbf1dd;
  --gov-border: #d8e0da;
  --gov-surface: #f6f8f7;
  --gov-red: #a3271f;
}

/* =========================================================
   SURVEYS PAGE
========================================================= */

.surveys-main {
  padding: 20px;
  background: var(--gov-surface);
}

.surveys-page {
  max-width: 1100px;
  margin: 0 auto;
}

.surveys-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gov-green);
}

.surveys-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.surveys-heading-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--gov-green);
  color: #ffffff;
}

.surveys-heading-icon .icon {
  width: 22px;
  height: 22px;
}

.surveys-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--gov-navy);
}

.surveys-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--gov-navy-soft);
}

.surveys-count {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gov-green-dark);
  background: var(--gov-green-light);
  border: 1px solid var(--gov-green);
  padding: 6px 12px;
  border-radius: 3px;
  white-space: nowrap;
}


/* =========================================================
   SURVEY GRID
========================================================= */

.surveys-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}


/* =========================================================
   SURVEY CARD
========================================================= */

.survey-card {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--gov-border);
  border-left: 4px solid var(--gov-green);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(11, 37, 69, 0.06);
}

.survey-card-locked {
  overflow: hidden;
  border-left-color: var(--gov-navy-soft);
}

.survey-card-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--gov-green-light);
  color: var(--gov-green-dark);
  border: 1px solid var(--gov-green);
}

.survey-card-icon .icon {
  width: 21px;
  height: 21px;
}

.survey-card-content {
  min-width: 0;
  flex: 1;
}

.surveys-premium-disabled .survey-card-content {
  pointer-events: none;
  user-select: none;
}

.survey-card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--gov-navy);
}

.survey-card-question {
  display: -webkit-box;
  margin: 8px 0 16px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--gov-navy-soft);
}

.survey-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--gov-border);
}

.survey-card-reward {
  font-size: 14px;
  font-weight: 700;
  color: var(--gov-green-dark);
  white-space: nowrap;
}

.survey-locked-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gov-navy-soft);
  white-space: nowrap;
}

.survey-locked-label .icon {
  width: 13px;
  height: 13px;
}

.survey-start-btn {
  min-height: 36px;
  padding: 8px 16px;
  border: 1px solid var(--gov-green-dark);
  border-radius: 3px;
  background: var(--gov-green);
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.survey-start-btn:hover {
  background: var(--gov-green-dark);
}

.survey-start-btn:active {
  transform: translateY(1px);
}


/* =========================================================
   EMPTY STATE
========================================================= */

.surveys-empty {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed var(--gov-border);
  border-radius: 4px;
}

.surveys-empty-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 4px;
  background: var(--gov-green-light);
  color: var(--gov-green-dark);
  border: 1px solid var(--gov-green);
}

.surveys-empty-icon .icon {
  width: 24px;
  height: 24px;
}

.surveys-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--gov-navy);
}

.surveys-empty-text {
  max-width: 380px;
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--gov-navy-soft);
}


/* =========================================================
   PREMIUM OVERLAY (on locked cards)
========================================================= */

.surveys-premium-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 37, 69, 0.88);
  border-radius: 3px;
}

.surveys-premium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  text-align: center;
}

.surveys-premium-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.surveys-premium-icon .icon {
  width: 18px;
  height: 18px;
}

.surveys-premium-badge {
  padding: 3px 12px;
  border-radius: 2px;
  background: var(--gov-gold);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.surveys-premium-title {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.surveys-premium-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #cdd8e6;
}

.surveys-upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 18px;
  border: 1px solid var(--gov-gold);
  border-radius: 3px;
  background: var(--gov-gold);
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.surveys-upgrade-btn:hover {
  background: #96700a;
}

.surveys-upgrade-btn .icon {
  width: 13px;
  height: 13px;
}


/* =========================================================
   UNLOCK MODAL — OVERLAY / SHELL
========================================================= */

.surveys-unlock-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(11, 37, 69, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.surveys-unlock-overlay.is-open {
  opacity: 1;
}

.surveys-unlock-overlay.hidden {
  display: none;
}

body.surveys-unlock-open {
  overflow: hidden;
}

.surveys-unlock-modal {
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
  background: #ffffff;
  border-top: 4px solid var(--gov-green);
  border-radius: 6px 6px 0 0;
  transform: translateY(24px);
  transition: transform 0.28s ease;

  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.surveys-unlock-modal::-webkit-scrollbar {
  display: none;
}

.surveys-unlock-overlay.is-open .surveys-unlock-modal {
  transform: translateY(0);
}

@media (min-width: 560px) {
  .surveys-unlock-overlay {
    align-items: center;
  }
  .surveys-unlock-modal {
    border-top: 4px solid var(--gov-green);
    border-radius: 6px;
  }
}

/* HEADER */
.surveys-unlock-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gov-border);
}

.surveys-unlock-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--gov-green-light);
  color: var(--gov-green-dark);
  border: 1px solid var(--gov-green);
}

.surveys-unlock-icon .icon {
  width: 20px;
  height: 20px;
}

.surveys-unlock-header h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--gov-navy);
}

.surveys-unlock-header p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--gov-navy-soft);
}

.surveys-unlock-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gov-border);
  border-radius: 3px;
  background: #ffffff;
  color: var(--gov-navy-soft);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.surveys-unlock-close:hover {
  background: var(--gov-surface);
}

/* MESSAGE */
.surveys-unlock-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--gov-surface);
  border: 1px solid var(--gov-border);
  border-radius: 4px;
}

.surveys-unlock-message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gov-green-dark);
}

.surveys-unlock-message p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--gov-navy-soft);
}

/* PRICE BOX */
.surveys-unlock-price-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--gov-navy);
  border-radius: 4px;
  text-align: center;
}

.surveys-unlock-offer {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gov-gold);
}

.surveys-unlock-old-price {
  font-size: 13px;
  font-weight: 600;
  color: #93a3ba;
  text-decoration: line-through;
}

.surveys-unlock-price {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
}

.surveys-unlock-savings {
  font-size: 12px;
  font-weight: 650;
  color: #6fcf97;
}

.surveys-unlock-price-note {
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #93a3ba;
}

/* PAYMENT METHOD */
.surveys-payment-section {
  margin-bottom: 14px;
}

.surveys-payment-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gov-navy);
}

.surveys-payment-method {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gov-green);
  border-radius: 4px;
  background: var(--gov-green-light);
  font-family: inherit;
  cursor: default;
  text-align: left;
}

.surveys-payment-method-icon {
  font-size: 19px;
}

.surveys-payment-method strong {
  display: block;
  font-size: 13px;
  color: var(--gov-navy);
}

.surveys-payment-method small {
  font-size: 11px;
  color: var(--gov-navy-soft);
}

.surveys-payment-check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: var(--gov-green);
  color: #ffffff;
  font-size: 12px;
}

/* STK PUSH SECTION */
.surveys-stk-section {
  margin-bottom: 6px;
}

.surveys-stk-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gov-navy);
}

.surveys-stk-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 12px;
  border: 1px solid var(--gov-border);
  border-radius: 4px;
  background: #ffffff;
}

.surveys-stk-input-row:focus-within {
  border-color: var(--gov-green);
  box-shadow: 0 0 0 3px var(--gov-green-light);
}

.surveys-stk-prefix {
  font-size: 15px;
}

.surveys-stk-input {
  flex: 1;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--gov-navy);
}

.surveys-stk-input:focus {
  outline: none;
}

.surveys-stk-btn {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--gov-green-dark);
  border-radius: 4px;
  background: var(--gov-green);
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.surveys-stk-btn:hover {
  background: var(--gov-green-dark);
}

.surveys-stk-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.surveys-stk-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--gov-navy-soft);
  text-align: center;
}

.surveys-stk-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  animation: surveys-spin 0.7s linear infinite;
}

@keyframes surveys-spin {
  to { transform: rotate(360deg); }
}

/* MANUAL PAYMENT (collapsed fallback) */
.surveys-manual-section {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease;
}

.surveys-manual-section.is-open {
  max-height: 700px;
  opacity: 1;
  margin-top: 14px;
}

.surveys-payment-instructions {
  padding: 14px;
  background: var(--gov-surface);
  border: 1px solid var(--gov-border);
  border-radius: 4px;
}

.surveys-payment-instructions h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gov-navy);
}

.surveys-payment-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--gov-navy-soft);
}

.surveys-payment-step .step-number {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: var(--gov-navy);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

.surveys-payment-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px dashed var(--gov-border);
  border-radius: 4px;
  font-size: 13px;
}

.surveys-payment-amount span {
  color: var(--gov-navy-soft);
}

.surveys-payment-amount strong {
  color: var(--gov-green-dark);
  font-size: 14px;
}

.surveys-payment-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--gov-gold-light);
  border: 1px solid #e6cf8f;
  border-radius: 4px;
}

.surveys-payment-notice .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
  color: var(--gov-gold);
}

.surveys-payment-notice p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #7a5c0c;
}

.surveys-manual-whatsapp-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid #1e9e56;
  border-radius: 4px;
  background: #25d366;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.surveys-manual-whatsapp-btn:hover {
  background: #1fb855;
}

.surveys-manual-whatsapp-btn .icon {
  width: 16px;
  height: 16px;
}

/* ACTIONS */
.surveys-unlock-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--gov-border);
}

.surveys-unlock-cancel {
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--gov-navy-soft);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.surveys-unlock-cancel:hover {
  color: var(--gov-navy);
}

.surveys-unlock-manual-toggle {
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--gov-green-dark);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.surveys-unlock-manual-toggle:hover {
  text-decoration: underline;
}

/* =========================================================
   SURVEY TASK MODAL
========================================================= */

.survey-task-modal {
  max-width: 480px;
}

.survey-task-body {
  margin-bottom: 4px;
}

.survey-card-question-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gov-navy-soft);
}

.survey-task-question {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: var(--gov-surface);
  border: 1px solid var(--gov-border);
  border-radius: 4px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--gov-navy);
}

.survey-task-input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--gov-border);
  border-radius: 4px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--gov-navy);
  resize: vertical;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.survey-task-input::-webkit-scrollbar {
  display: none;
}

.survey-task-input:focus {
  outline: none;
  border-color: var(--gov-green);
  box-shadow: 0 0 0 3px var(--gov-green-light);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 760px) {
  .surveys-main {
    padding: 16px;
  }
  .surveys-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .survey-card {
    padding: 15px;
  }
  .survey-card-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .survey-card-title {
    font-size: 15px;
  }
  .survey-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .survey-start-btn {
    width: 100%;
  }
  .surveys-unlock-modal {
    padding: 18px;
  }
  .surveys-unlock-price {
    font-size: 25px;
  }
  .surveys-premium-card {
    max-width: 180px;
  }
}
.surveys-payment-step-copyable {
  justify-content: space-between;
}

.surveys-step-copy-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gov-border);
  border-radius: 4px;
  background: #ffffff;
  color: var(--gov-green-dark);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.surveys-step-copy-btn:hover {
  background: var(--gov-green-light);
  border-color: var(--gov-green);
}

.surveys-step-copy-btn svg {
  width: 14px;
  height: 14px;
}

.surveys-step-copy-btn.is-copied {
  background: var(--gov-green);
  border-color: var(--gov-green-dark);
  color: #ffffff;
}

.surveys-payment-step-copyable {
  justify-content: space-between;
}

.surveys-payment-step-text {
  flex: 1;
  min-width: 0;
}

.survey-word-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.survey-word-progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--gov-border);
  overflow: hidden;
}

.survey-word-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gov-gold);
  transition: width 0.2s ease, background 0.2s ease;
}

.survey-word-progress.is-complete .survey-word-progress-fill {
  background: var(--gov-green);
}

.survey-word-count {
  align-self: flex-end;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gov-navy-soft);
}

.survey-word-count.is-complete {
  color: var(--gov-green-dark);
}

.survey-research-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--gov-gold-light);
  border: 1px solid #e6cf8f;
  border-radius: 4px;
}

.survey-research-notice .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
  color: var(--gov-gold);
}

.survey-research-notice p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #7a5c0c;
}