:root {
  --cn-primary: #dc2626;
  --cn-primary-dark: #991b1b;
  --cn-secondary: #fef2f2;
  --cn-text: #111827;
  --cn-muted: #6b7280;
  --cn-border: rgba(255,255,255,0.65);
  --cn-shadow-xl: 0 40px 120px rgba(2, 8, 23, 0.28);
  --cn-shadow-card: 0 20px 40px rgba(15, 23, 42, 0.08);
  --cn-radius-xl: 32px;
  --cn-radius-lg: 24px;
  --cn-radius-md: 18px;
}

body.modal-open {
  overflow: hidden;
}

/* Trigger Bar */
/* =========================================
   LOCATION BAR - MOBILE RESPONSIVE
========================================= */

.cn-location-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8f8, #ffffff);
  border: 1px solid #f3d7d7;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.06);
  cursor: pointer;
  transition: all 0.35s ease;
  gap: 10px;
}

.cn-location-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.10);
}

.cn-location-bar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.cn-location-bar__left i {
  flex-shrink: 0;
  color: #dc2626;
  font-size: 14px;
}

.cn-location-bar__left span {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cn-location-bar__right {
  flex-shrink: 0;
}

.cn-location-bar__right i {
  color: #dc2626;
  font-size: 13px;
}

/* =========================================
   TABLET
========================================= */
@media (max-width: 991px) {
  .cn-location-bar {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
  }

  .cn-location-bar__left span {
    font-size: 13px;
  }
}

/* =========================================
   MOBILE
========================================= */
@media (max-width: 767px) {
  .cn-location-bar {
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    gap: 8px;
  }

  .cn-location-bar__left {
    gap: 6px;
  }

  .cn-location-bar__left i {
    font-size: 13px;
  }

  .cn-location-bar__left span {
    font-size: 13px;
    max-width: 220px;
  }

  .cn-location-bar__right i {
    font-size: 12px;
  }
}

/* =========================================
   SMALL MOBILE
========================================= */
@media (max-width: 480px) {
  .cn-location-bar {
    min-height: 40px;
    padding: 0 10px;
    border-radius: 8px;
  }

  .cn-location-bar__left span {
    font-size: 12px;
    max-width: 160px;
  }

  .cn-location-bar__left i,
  .cn-location-bar__right i {
    font-size: 12px;
  }
}

.cn-location-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.10);
}

.cn-location-bar__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cn-location-bar__left i,
.cn-location-bar__right i {
  color: var(--cn-primary);
}

#selectedCityText {
  font-size: 14px;
  font-weight: 700;
  color: var(--cn-text);
}

/* Overlay */
.cn-location-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(220,38,38,0.10), transparent 35%),
    rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all .35s ease;
}

.cn-location-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Dialog */
.cn-location-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 34px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.92));
  border: 1px solid var(--cn-border);
  box-shadow: var(--cn-shadow-xl);
  animation: cnScaleIn .45s cubic-bezier(.22,1,.36,1);
}

.cn-location-modal__dialog::-webkit-scrollbar {
  width: 8px;
}

.cn-location-modal__dialog::-webkit-scrollbar-thumb {
  background: #f3caca;
  border-radius: 999px;
}

@keyframes cnScaleIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Close */
.cn-location-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--cn-text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: all .3s ease;
}

.cn-location-modal__close:hover {
  background: var(--cn-primary);
  color: #fff;
  transform: rotate(90deg);
}

/* Progress */
.cn-progress {
  position: relative;
  margin-bottom: 34px;
  margin-top: 40px;
}

.cn-progress__track,
.cn-progress__fill {
  position: absolute;
  top: 18px;
  left: 0;
  height: 4px;
  border-radius: 999px;
}

.cn-progress__track {
  width: 100%;
  background: #f3f4f6;
}

.cn-progress__fill {
  width: 20%;
  background: linear-gradient(90deg, var(--cn-primary), #fb7185);
  transition: width .35s ease;
}

.cn-progress__steps {
  display: flex;
  justify-content: space-between;
}

.cn-progress__steps span {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e5e7eb;
  color: #9ca3af;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.cn-progress__steps span.active,
.cn-progress__steps span.completed {
  background: linear-gradient(135deg, var(--cn-primary), var(--cn-primary-dark));
  border-color: transparent;
  color: #fff;
}

/* Steps */
.cn-step {
  display: none;
}

.cn-step.active {
  display: block;
  animation: cnFadeUp .45s ease;
}

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

.cn-step-header {
  text-align: center;
  margin-bottom: 28px;
}

.cn-step-header__icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cn-primary), var(--cn-primary-dark));
  color: #fff;
  font-size: 30px;
  box-shadow: 0 20px 40px rgba(220, 38, 38, 0.28);
}

.cn-step-header h3 {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 800;
  color: var(--cn-text);
  letter-spacing: -0.02em;
}

.cn-step-header p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--cn-muted);
  font-size: 15px;
  line-height: 1.8;
}

/* Cards Grid */
.cn-premium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cn-premium-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cn-premium-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Premium Card */
.cn-premium-card {
  position: relative;
  padding: 26px 20px;
  border-radius: var(--cn-radius-lg);
  border: 1px solid rgba(229, 231, 235, 0.9);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(249,250,251,0.95));
  text-align: center;
  cursor: pointer;
  transition: all .35s cubic-bezier(.22,1,.36,1);
  box-shadow: var(--cn-shadow-card);
  overflow: hidden;
}

.cn-premium-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(220,38,38,0.06), transparent 55%);
  opacity: 0;
  transition: opacity .35s ease;
}

.cn-premium-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(220, 38, 38, 0.25);
  box-shadow: 0 28px 50px rgba(220, 38, 38, 0.12);
}

.cn-premium-card:hover::before,
.cn-premium-card.selected::before {
  opacity: 1;
}

.cn-premium-card.selected {
  border-color: rgba(220, 38, 38, 0.35);
  background: linear-gradient(180deg, #fff7f7, #ffffff);
  box-shadow: 0 30px 60px rgba(220, 38, 38, 0.18);
}

.cn-premium-card.selected::after {
  content: '/ff00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cn-primary), var(--cn-primary-dark));
  color: #fff;
  font-size: 11px;
}

.cn-premium-card span {
  display: block;
  font-size: 34px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.cn-premium-card strong,
.cn-premium-card small {
  position: relative;
  z-index: 1;
}

.cn-premium-card strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--cn-text);
  line-height: 1.4;
}

.cn-premium-card small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--cn-muted);
}

.cn-premium-card--large {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Footer */
.cn-wizard-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
}

.cn-btn {
  height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .3s ease;
}

.cn-btn--light {
  background: #fff;
  color: var(--cn-text);
  border: 1px solid #e5e7eb;
}

.cn-btn--light:hover {
  background: #f9fafb;
}

.cn-btn--primary {
  margin-left: auto;
  background: linear-gradient(135deg, var(--cn-primary), var(--cn-primary-dark));
  color: #fff;
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.22);
}

.cn-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgba(220, 38, 38, 0.30);
}

/* Mobile */
@media (max-width: 767px) {
  .cn-location-modal {
    padding: 12px;
  }

  .cn-location-modal__dialog {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .cn-step-header__icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 24px;
  }

  .cn-step-header h3 {
    font-size: 26px;
  }

  .cn-premium-grid,
  .cn-premium-grid--2,
  .cn-premium-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cn-premium-card {
    padding: 18px 12px;
    border-radius: 18px;
  }

  .cn-premium-card span {
    font-size: 26px;
  }

  .cn-wizard-footer {
    flex-direction: column;
  }

  .cn-btn,
  .cn-btn--primary {
    width: 100%;
    margin-left: 0;
  }
}

/* ==========================================================
   FINAL FIXES FOR LOCATION POPUP MODAL
   Add this code at the END of your existing CSS file.
   This preserves all your current styles and fixes:
   1. Popup not opening on mobile
   2. Popup not clickable
   3. Popup not scrollable
   4. Incorrect selected check icon
========================================================== */

/* Prevent background scrolling when popup is open */
body.modal-open {
    overflow: hidden;
    touch-action: none;
}

/* Popup overlay */
.cn-location-modal {
    /* Keep your existing styles and override only what's needed */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    align-items: flex-start;
}

/* Popup active state */
.cn-location-modal.active {
    pointer-events: auto;
}

/* Popup dialog */
.cn-location-modal__dialog {
    max-height: calc(100vh - 40px) !important;
    margin: 20px auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Close button always clickable */
.cn-location-modal__close {
    z-index: 10;
}

/* Correct selected card icon */
.cn-premium-card.selected::after {
    content: '\f00c' !important;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* ==========================================================
   TABLET FIX
========================================================== */
@media (max-width: 991px) {
    .cn-location-modal {
        padding: 16px !important;
    }

    .cn-location-modal__dialog {
        max-width: 100% !important;
        max-height: calc(100vh - 32px) !important;
        margin: 16px auto !important;
        padding: 28px 22px !important;
        border-radius: 22px !important;
    }
}

/* ==========================================================
   MOBILE FIX
========================================================== */
@media (max-width: 767px) {
    .cn-location-modal {
        padding: 10px !important;
    }

    .cn-location-modal__dialog {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100vh - 20px) !important;
        margin: 10px auto !important;
        padding: 22px 16px !important;
        border-radius: 20px !important;
    }

    .cn-location-modal__close {
        width: 42px !important;
        height: 42px !important;
        top: 12px !important;
        right: 12px !important;
        font-size: 14px !important;
    }

    .cn-step-header h3 {
        font-size: 24px !important;
        line-height: 1.3;
    }

    .cn-step-header p {
        font-size: 14px !important;
        line-height: 1.6;
    }

    .cn-premium-grid,
    .cn-premium-grid--2,
    .cn-premium-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .cn-premium-card {
        padding: 18px 12px !important;
        border-radius: 18px !important;
    }

    .cn-premium-card span {
        font-size: 24px !important;
    }

    .cn-premium-card strong {
        font-size: 13px !important;
    }

    .cn-premium-card small {
        font-size: 11px !important;
    }

    .cn-wizard-footer {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .cn-btn,
    .cn-btn--primary {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* ==========================================================
   SMALL MOBILE FIX
========================================================== */
@media (max-width: 480px) {
    .cn-location-modal {
        padding: 8px !important;
    }

    .cn-location-modal__dialog {
        padding: 20px 14px !important;
        border-radius: 18px !important;
        max-height: calc(100vh - 16px) !important;
    }

    .cn-progress__steps span {
        width: 34px !important;
        height: 34px !important;
        font-size: 12px !important;
    }

    .cn-step-header__icon {
        width: 56px !important;
        height: 56px !important;
        border-radius: 18px !important;
        font-size: 22px !important;
    }

    .cn-step-header h3 {
        font-size: 21px !important;
    }

    /* Single column cards on very small screens */
    .cn-premium-grid,
    .cn-premium-grid--2,
    .cn-premium-grid--3 {
        grid-template-columns: 1fr !important;
    }

    .cn-premium-card span {
        font-size: 22px !important;
    }
}
/* ==========================================================
   LOCATION TRIGGER MOBILE FIX
   Add this CSS at the END of your stylesheet.
   Fixes .locationTrigger not responding on mobile.
========================================================== */

/* Main trigger element */
.locationTrigger,
.cn-location-bar {
    position: relative !important;
    /* z-index: 2 !important; */
    display: flex !important;
    width: 100% !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* All child elements should also allow click */
.locationTrigger *,
.cn-location-bar * {
    pointer-events: none;
}

/* Hidden modal must not block clicks */
.cn-location-modal {
    pointer-events: none !important;
}

/* Active modal becomes clickable */
.cn-location-modal.active {
    pointer-events: auto !important;
}

/* Prevent pseudo-elements from blocking click */
.cn-location-bar::before,
.cn-location-bar::after {
    pointer-events: none;
}

/* Mobile specific */
@media (max-width: 991px) {
    .locationTrigger,
    .cn-location-bar {
        min-height: 42px;
        pointer-events: auto !important;
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
    }
}