/* NYMG Trip Planner Survey Styles
   Brand: newyork.co.uk
   Colors: Red #D61F26, Blue #1D36CC, Yellow #F7B731, Green #5AAF42
   Typography: Montserrat (Gotham alternative), Open Sans
*/

/* CSS Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand Colors */
  --nymg-red: #d61f26;
  --nymg-red-dark: #b51a20;
  --nymg-blue: #1d36cc;
  --nymg-yellow: #f7b731;
  --nymg-green: #5aaf42;
  --erics-tip-blue: #cdeafa;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-muted: #666666;
  --bg-light: #f8f9fa;

  /* Typography */
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;

  /* Spacing */
  --container-max: 800px;
  --section-padding: 80px;
  --section-padding-mobile: 48px;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  margin-bottom: 16px;
}

p {
  margin-bottom: 16px;
}

/* Header */
.header {
  padding: 20px 0;
  background: var(--white);
  border-bottom: 1px solid #eee;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
}

.logo {
  text-decoration: none;
  display: inline-block;
}

.logo-img {
  height: 28px;
  width: auto;
}

/* Survey Hero */
.survey-hero {
  padding: 120px 24px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.survey-intro {
  text-align: center;
  margin-bottom: 32px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 40px;
}

.progress-bar {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--nymg-red) 0%, var(--nymg-blue) 100%);
  border-radius: 4px;
  width: 20%;
  transition: width 0.4s ease;
}

.progress-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
}

#progress-current {
  color: var(--nymg-red);
  font-weight: 700;
}

/* Survey Form */
.survey-form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Survey Steps */
.survey-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.survey-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Step Header */
.step-header {
  text-align: center;
  margin-bottom: 32px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--nymg-red);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.25rem;
  border-radius: 50%;
  margin-bottom: 16px;
}

.step-hint {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 8px;
}

/* Options Grid */
.options-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.options-single {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.options-multi {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.options-large {
  grid-template-columns: 1fr;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Option Card */
.option-card {
  position: relative;
  cursor: pointer;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--white);
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  text-align: center;
  transition: all 0.2s ease;
  min-height: 80px;
}

.option-card:hover .option-content {
  border-color: var(--nymg-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 54, 204, 0.15);
}

.option-card input:checked + .option-content {
  border-color: var(--nymg-red);
  background: rgba(214, 31, 38, 0.05);
  box-shadow: 0 4px 16px rgba(214, 31, 38, 0.2);
}

.option-card input:checked + .option-content::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--nymg-red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
}

.option-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  line-height: 1;
}

.option-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9375rem;
}

.option-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Large option cards */
.options-large .option-content {
  padding: 24px 20px;
  min-height: 100px;
}

.options-large .option-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.options-large .option-label {
  font-size: 1.125rem;
}

/* Step Navigation */
.step-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.btn-back,
.btn-next,
.btn-submit {
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid #e0e0e0;
}

.btn-back:hover {
  border-color: var(--text-muted);
  color: var(--text-dark);
}

.btn-next {
  background: var(--nymg-blue);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(29, 54, 204, 0.3);
}

.btn-next:hover {
  background: #1629a8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 54, 204, 0.4);
}

.btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-submit {
  background: var(--nymg-green);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(90, 175, 66, 0.3);
  min-width: 180px;
}

.btn-submit:hover {
  background: #4a9938;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(90, 175, 66, 0.4);
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-submit.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

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

/* Email Step */
.email-form-group {
  max-width: 400px;
  margin: 0 auto 32px;
}

.form-input {
  width: 100%;
  padding: 18px 20px;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: var(--white);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--nymg-blue);
  box-shadow: 0 0 0 4px rgba(29, 54, 204, 0.15);
}

.form-input::placeholder {
  color: #999;
}

/* Footer */
.footer {
  padding: 48px 0 32px;
  background: #111;
  color: var(--white);
  margin-top: auto;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.logo-dot {
  color: var(--nymg-blue);
}

.footer-copy {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--white);
}

/* Error Toast */
.error-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--nymg-red);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 2000;
  animation: slideUp 0.3s ease;
  box-shadow: 0 4px 20px rgba(214, 31, 38, 0.4);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .survey-hero {
    padding: 100px 16px 40px;
  }

  .options-single,
  .options-multi {
    grid-template-columns: repeat(2, 1fr);
  }

  .options-large {
    grid-template-columns: 1fr;
  }

  .option-content {
    padding: 16px 12px;
    min-height: 70px;
  }

  .option-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
  }

  .option-label {
    font-size: 0.8125rem;
  }

  .step-nav {
    flex-direction: column;
  }

  .btn-back,
  .btn-next,
  .btn-submit {
    width: 100%;
  }

  .footer-nav {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 400px) {
  .options-single,
  .options-multi {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .option-content {
    padding: 12px 8px;
  }
}
