/*
 * Pink Zebra Moving — Zip Router Modal Styles
 * Impakt Digital — v2.2
 *
 * CUSTOMIZATION:
 * Edit the CSS variables in :root to match your Avada theme.
 * Everything else inherits automatically.
 */

:root {
  /* ── Brand ───────────────────────────────────────────────────────────── */
  --pz-accent:         #E8127D;
  --pz-accent-light:   rgba(232, 18, 125, 0.08);
  --pz-accent-border:  rgba(232, 18, 125, 0.30);

  /* ── Modal shell — pink background ───────────────────────────────────── */
  --pz-bg:             #E8127D;
  --pz-bg-secondary:   #ffffff;
  --pz-border:         rgba(255, 255, 255, 0.35);
  --pz-text:           #ffffff;
  --pz-text-muted:     rgba(255, 255, 255, 0.85);
  --pz-text-hint:      rgba(255, 255, 255, 0.60);

  /* ── Layout ───────────────────────────────────────────────────────────── */
  --pz-radius:         8px;
  --pz-font:           inherit;
  --pz-overlay-z:      99999;
}

/* ─────────────────────────────────────────────────────────────────────────────
   OVERLAY
───────────────────────────────────────────────────────────────────────────── */

#pz-overlay {
  display:         none;
  position:        fixed;
  inset:           0;
  background:      rgba(0, 0, 0, 0.55);
  z-index:         var(--pz-overlay-z);
  align-items:     flex-start;
  justify-content: center;
  padding:         64px 16px 24px;
}

#pz-overlay.pz-visible {
  display: flex;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MODAL BOX
───────────────────────────────────────────────────────────────────────────── */

#pz-modal {
  background:    var(--pz-bg);
  border-radius: 12px;
  border:        1px solid var(--pz-border);
  width:         100%;
  max-width:     400px;
  padding:       24px;
  font-family:   var(--pz-font);
  font-size:     15px;
  line-height:   1.5;
}

/* ── Header ── */

#pz-modal-header {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  margin-bottom:   18px;
  gap:             8px;
}

/* Zebra stripe decoration */
.pz-stripe {
  height:        3px;
  margin-bottom: 11px;
  background:    repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.9)  0px,
    rgba(255, 255, 255, 0.9)  10px,
    rgba(255, 255, 255, 0.25) 10px,
    rgba(255, 255, 255, 0.25) 20px
  );
  border-radius: 2px;
}

#pz-modal-title {
  font-size:   17px;
  font-weight: 600;
  color:       #ffffff;
  margin:      0 0 3px;
}

#pz-modal-subtitle {
  font-size: 13px;
  color:     rgba(255, 255, 255, 0.85);
  margin:    0;
}

#pz-close {
  background:  none;
  border:      none;
  font-size:   22px;
  line-height: 1;
  color:       rgba(255, 255, 255, 0.75);
  cursor:      pointer;
  padding:     2px 6px;
  flex-shrink: 0;
  transition:  color 0.15s;
}

#pz-close:hover { color: #ffffff; }

/* ─────────────────────────────────────────────────────────────────────────────
   INPUT ROW
───────────────────────────────────────────────────────────────────────────── */

#pz-input-row {
  display:       flex;
  gap:           8px;
  margin-bottom: 0;
}

#pz-zip-input {
  flex:          1;
  font-size:     16px;
  padding:       10px 14px;
  border:        1px solid rgba(255, 255, 255, 0.40);
  border-radius: var(--pz-radius);
  background:    #ffffff;
  color:         #E8127D;
  outline:       none;
  font-family:   var(--pz-font);
  font-weight:   600;
  transition:    border-color 0.15s, box-shadow 0.15s;
}

#pz-zip-input::placeholder {
  color:       rgba(232, 18, 125, 0.40);
  font-weight: 400;
}

#pz-zip-input:focus {
  border-color: rgba(255, 255, 255, 0.80);
  box-shadow:   0 0 0 3px rgba(255, 255, 255, 0.20);
}

#pz-check-btn {
  background:    #ffffff;
  color:         #E8127D;
  border:        none;
  border-radius: var(--pz-radius);
  padding:       10px 20px;
  font-size:     14px;
  font-weight:   700;
  cursor:        pointer;
  font-family:   var(--pz-font);
  transition:    opacity 0.15s, background 0.15s;
  white-space:   nowrap;
}

#pz-check-btn:disabled {
  background:    rgba(255, 255, 255, 0.30);
  color:         rgba(255, 255, 255, 0.60);
  cursor:        not-allowed;
}

#pz-check-btn:not(:disabled):hover { opacity: 0.87; }

/* ─────────────────────────────────────────────────────────────────────────────
   LOADING SPINNER
───────────────────────────────────────────────────────────────────────────── */

#pz-loading {
  display:     none;
  align-items: center;
  gap:         10px;
  font-size:   13px;
  color:       rgba(255, 255, 255, 0.85);
  margin-top:  14px;
}

.pz-spinner {
  width:         16px;
  height:        16px;
  border:        2px solid rgba(255, 255, 255, 0.30);
  border-top-color: #ffffff;
  border-radius: 50%;
  flex-shrink:   0;
  animation:     pz-spin 0.7s linear infinite;
}

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

/* ─────────────────────────────────────────────────────────────────────────────
   RESULT AREA
───────────────────────────────────────────────────────────────────────────── */

#pz-result {
  display:    none;
  margin-top: 14px;
}

/* Status line */
.pz-status {
  display:       flex;
  align-items:   center;
  gap:           8px;
  font-size:     13px;
  font-weight:   600;
  margin-bottom: 11px;
}

/* Status text colors — readable on pink background */
.pz-status--success { color: #ffffff; }
.pz-status--warning { color: rgba(255, 255, 255, 0.90); }
.pz-status--neutral { color: rgba(255, 255, 255, 0.80); }

.pz-dot {
  width:         9px;
  height:        9px;
  border-radius: 50%;
  flex-shrink:   0;
}

.pz-dot--green { background: #10b981; }
.pz-dot--amber { background: #fbbf24; }
.pz-dot--gray  { background: rgba(255, 255, 255, 0.40); }

/* ── Territory card — white box inside pink modal ── */
.pz-territory-card {
  background:    #ffffff;
  border:        1px solid rgba(255, 255, 255, 0.50);
  border-radius: var(--pz-radius);
  padding:       14px;
  margin-bottom: 12px;
  color:         #222222;
}

/* Pink accent card for "not in your area" message */
.pz-territory-card--pink {
  background:   rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 255, 255, 0.30);
  color:        #ffffff;
}

.pz-territory-card strong {
  display:       block;
  font-size:     14px;
  color:         #222222;
  margin-bottom: 3px;
}

.pz-territory-card--pink strong {
  color: #ffffff;
}

.pz-territory-info {
  display:     flex;
  align-items: flex-start;
  gap:         10px;
}

/* Avatar circle */
.pz-avatar {
  width:           38px;
  height:          38px;
  border-radius:   50%;
  background:      rgba(232, 18, 125, 0.10);
  border:          1.5px solid #E8127D;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       12px;
  font-weight:     700;
  color:           #E8127D;
  flex-shrink:     0;
  font-family:     var(--pz-font);
}

/* Text inside white cards — dark and readable */
.pz-meta {
  font-size:  12px;
  color:      #666666;
  margin-top: 2px;
}

.pz-nearby-note {
  font-size:    12px;
  color:        #555555;
  margin:       0 0 10px;
  line-height:  1.55;
}

.pz-territory-card--pink .pz-nearby-note {
  color: rgba(255, 255, 255, 0.85);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────────────────────────── */

.pz-btn {
  display:       block;
  width:         100%;
  padding:       10px 16px;
  border-radius: var(--pz-radius);
  font-size:     14px;
  font-weight:   700;
  cursor:        pointer;
  text-align:    center;
  font-family:   var(--pz-font);
  border:        none;
  margin-bottom: 6px;
  transition:    opacity 0.15s;
}

/* Primary button — white background, pink text */
.pz-btn--primary {
  background: #ffffff;
  color:      #E8127D;
}

.pz-btn--primary:hover { opacity: 0.87; }

/* Ghost button — white underlined text */
.pz-btn--ghost {
  background:      none;
  color:           rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  font-size:       13px;
  padding:         6px 0;
  font-weight:     400;
}

.pz-btn--ghost:hover { color: #ffffff; }

/* Error state */
.pz-error {
  font-size:  13px;
  color:      rgba(255, 255, 255, 0.90);
  text-align: center;
  padding:    12px 0;
  margin:     0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  #pz-overlay { padding: 40px 12px 20px; }
  #pz-modal   { padding: 18px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   IP DETECTION SUGGESTION CARD
   Shown when the modal opens and we've detected the user's nearest location.
───────────────────────────────────────────────────────────────────────────── */

#pz-detect-suggestion {
  margin-bottom: 14px;
}

.pz-suggestion-label {
  display:       flex;
  align-items:   center;
  gap:           7px;
  font-size:     12px;
  font-weight:   600;
  color:         rgba(255, 255, 255, 0.90);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.pz-suggestion-dot {
  width:         8px;
  height:        8px;
  border-radius: 50%;
  background:    #ffffff;
  flex-shrink:   0;
  animation:     pz-pulse 2s ease-in-out infinite;
}

@keyframes pz-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

.pz-suggestion-card {
  background:    #ffffff;
  border-radius: var(--pz-radius);
  padding:       14px;
  margin-bottom: 12px;
  display:       flex;
  flex-direction: column;
  gap:           12px;
}

.pz-suggestion-info {
  display:     flex;
  align-items: flex-start;
  gap:         10px;
  color:       #222222;
}

.pz-suggestion-info strong {
  display:     block;
  font-size:   14px;
  color:       #111111;
  font-weight: 600;
}

.pz-suggestion-go {
  width:      100%;
  background: #E8127D;
  color:      #ffffff;
  border:     none;
  border-radius: var(--pz-radius);
  padding:    10px 16px;
  font-size:  14px;
  font-weight: 700;
  cursor:     pointer;
  font-family: var(--pz-font);
  transition: opacity 0.15s;
}

.pz-suggestion-go:hover { opacity: 0.87; }

.pz-suggestion-divider {
  display:     flex;
  align-items: center;
  gap:         10px;
  margin:      4px 0 10px;
}

.pz-suggestion-divider::before,
.pz-suggestion-divider::after {
  content:    '';
  flex:       1;
  height:     1px;
  background: rgba(255, 255, 255, 0.30);
}

.pz-suggestion-divider span {
  font-size:   12px;
  color:       rgba(255, 255, 255, 0.70);
  white-space: nowrap;
}
