/* ── Base ── */

html,
body {
  height: 100%;
  margin: 0;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  min-height: 100vh;
}

/* ── Map ── */

.map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  background: #1e293b;
  filter: blur(5px) saturate(1.2) brightness(0.92);
  transform: scale(1.06);
}

.map-vignette {
  position: absolute;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, transparent 0%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, transparent 30%, transparent 70%, rgba(15, 23, 42, 0.2) 100%);
}

.map-blur-overlay {
  position: absolute;
  inset: 0;
  z-index: 350;
  pointer-events: none;
  background: rgba(248, 250, 252, 0.04);
}

/* markers */
.station-marker,
.user-marker {
  background: none !important;
  border: none !important;
}

.station-marker__dot {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.user-marker {
  position: relative;
  width: 26px;
  height: 26px;
}

.user-marker__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #6366f1;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.5);
  z-index: 2;
}

.user-marker__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.3);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

.map-attribution {
  position: fixed;
  right: 10px;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 45;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 10px;
  color: #64748b;
}

.map-attribution a {
  color: #ea580c;
  text-decoration: none;
}

/* ── Logo ── */

.logo-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  padding: 20px 24px;
}

.logo-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  color: #ea580c;
}

.logo-mark__glow {
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.35), rgba(251, 146, 60, 0.25));
  filter: blur(8px);
  z-index: -1;
  opacity: 0.7;
}

.logo-mark__icon {
  width: 24px;
  height: 24px;
}

/* ── Card ── */

.offer-wrap {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.offer-card {
  width: 100%;
  max-width: 400px;
  flex-shrink: 0;
  margin: auto;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 32px 64px -16px rgba(15, 23, 42, 0.18),
    0 0 80px -20px rgba(249, 115, 22, 0.18);
  overflow: hidden;
}

/* ── Alert ── */

.offer-alert {
  position: relative;
  padding: 20px 22px 18px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-bottom: 1px solid rgba(249, 115, 22, 0.15);
  overflow: hidden;
}

.offer-alert__pulse {
  position: absolute;
  top: 18px;
  left: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
  animation: alertPulse 2s ease-out infinite;
  opacity: 0;
}

@keyframes alertPulse {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5); opacity: 1; }
  70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); opacity: 0; }
  100% { opacity: 0; }
}

.offer-alert__content {
  position: relative;
}

.offer-alert__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.offer-alert__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border-radius: 100px;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.25);
  font-size: 12px;
  font-weight: 600;
  color: #c2410c;
  letter-spacing: -0.01em;
}

.offer-alert__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
  animation: dotBlink 2s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.fuel-chips {
  display: flex;
  gap: 6px;
}

.fuel-chip {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.fuel-chip--95 {
  background: rgba(255, 255, 255, 0.7);
  color: #c2410c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.fuel-chip--92 {
  background: rgba(249, 115, 22, 0.12);
  color: #9a3412;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

.offer-alert__title {
  font-size: 15px;
  font-weight: 600;
  color: #9a3412;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.offer-alert__text {
  margin-top: 4px;
  font-size: 13px;
  color: #c2410c;
  opacity: 0.85;
  line-height: 1.45;
}

/* ── Body ── */

.offer-body {
  padding: 26px 24px 22px;
}

.offer-heading {
  text-align: center;
  margin-bottom: 24px;
}

.offer-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.offer-subtitle {
  margin-top: 8px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.offer-form {
  margin-top: 0;
}

.offer-label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  letter-spacing: -0.01em;
}

.phone-input-wrapper {
  display: flex;
  align-items: stretch;
  border-radius: 16px;
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.phone-input-wrapper:focus-within {
  border-color: rgba(249, 115, 22, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(241, 245, 249, 0.8);
  border-right: 1.5px solid rgba(148, 163, 184, 0.2);
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.phone-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 16px 14px;
  font-size: 16px;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  letter-spacing: 0.01em;
}

.phone-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.offer-error {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #ef4444;
}

.offer-form .btn-primary {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary__arrow {
  transition: transform 0.2s;
}

.btn-primary:hover:not(:disabled) .btn-primary__arrow {
  transform: translateX(3px);
}

.code-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.code-digit {
  width: 46px;
  height: 54px;
  border-radius: 14px;
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  caret-color: #ea580c;
}

.code-digit:focus {
  border-color: rgba(249, 115, 22, 0.6);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.offer-phone-display {
  font-weight: 600;
  color: #c2410c;
}

.offer-back {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s;
}

.offer-back:hover {
  color: #ea580c;
}

#step-code .btn-primary {
  margin-top: 20px;
}

.offer-legal {
  margin-top: 18px;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.5;
}

.offer-legal a {
  color: #ea580c;
  text-decoration: none;
}

.offer-legal a:hover {
  text-decoration: underline;
}

/* ── Animations ── */

.alert-slide-in {
  animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-fade-in {
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Mobile ── */

@media (max-width: 480px) {
  .offer-wrap {
    align-items: center;
    padding:
      max(16px, env(safe-area-inset-top))
      14px
      max(16px, env(safe-area-inset-bottom));
  }

  .offer-card {
    margin: auto;
    border-radius: 24px;
  }

  .offer-body {
    padding: 20px 18px 18px;
  }

  .offer-title {
    font-size: 20px;
  }

  .offer-heading {
    margin-bottom: 20px;
  }

  .offer-alert {
    padding: 16px 16px 14px;
  }

  .offer-alert__top {
    flex-wrap: wrap;
  }

  .code-digit {
    width: 42px;
    height: 50px;
    font-size: 20px;
    border-radius: 12px;
  }

  .code-inputs {
    gap: 6px;
  }

  .modal-fade-in {
    animation: fadeUpMobile 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes fadeUpMobile {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 481px) {
  .offer-body {
    padding: 28px 28px 26px;
  }
}
