/* ==========================================================================
   Spectacle Maps - Civic Advocacy Banner & Lead Generation Engine
   ========================================================================== */

/* --- Floating Civic Advocacy Pill (Bottom-Right) --- */
.adv-floating-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f1c30 0%, #172a46 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 9999px;
  padding: 4px 6px 4px 14px;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.7), 0 0 16px rgba(59, 130, 246, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: advPillSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.adv-floating-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.8), 0 0 24px rgba(59, 130, 246, 0.45);
}

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

.adv-pill-button {
  background: none;
  border: none;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 4px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  text-align: left;
}

.adv-pill-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
}

.adv-pill-text {
  color: #cbd5e1;
  line-height: 1.25;
}

.adv-pill-text strong {
  color: #ffffff;
  font-weight: 700;
}

.adv-pill-cta {
  color: #60a5fa;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 2px;
}

.adv-pill-dismiss-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 50%;
  margin-left: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adv-pill-dismiss-btn:hover {
  color: #f8fafc;
  background-color: rgba(255, 255, 255, 0.12);
}

/* --- Advocacy Modal Overlay & Extended Card --- */
#advocacy-modal {
  z-index: 10000 !important;
}

.adv-modal-card {
  max-width: 560px !important;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.adv-target-box {
  background-color: #0b1322;
  border: 1px solid #283548;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.adv-target-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.18);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.adv-target-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.adv-target-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.adv-target-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adv-target-email {
  color: #60a5fa;
  font-weight: 600;
}

/* Persona Chips */
.adv-persona-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.adv-persona-chip {
  background-color: #0b1322;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 10px;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.adv-persona-chip:hover {
  border-color: #475569;
  background-color: #131d2e;
  color: #f8fafc;
}

.adv-persona-chip.active {
  background-color: rgba(37, 99, 235, 0.22);
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.adv-persona-chip i {
  font-size: 0.82rem;
  opacity: 0.85;
}

/* Editable Note Area */
.adv-note-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.adv-note-textarea {
  width: 100%;
  height: 140px;
  background-color: #070d18;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 10px 12px;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.adv-note-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Action Buttons */
.adv-primary-btn {
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transition: all 0.15s ease;
  font-family: inherit;
}

.adv-primary-btn:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

.adv-switch-mode-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 10px;
  padding: 4px;
  text-align: center;
  width: 100%;
  transition: color 0.15s ease;
}

.adv-switch-mode-btn:hover {
  color: #f8fafc;
}

/* Partner Lock Badge */
.adv-partner-notice {
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  padding: 14px;
  color: #6ee7b7;
  font-size: 0.85rem;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.adv-partner-notice i {
  font-size: 1.1rem;
  color: #34d399;
  margin-top: 2px;
}

/* Inactive County Card Callout in Directory Inspector */
.dir-county-inspector-card.has-advocacy {
  height: auto !important;
  min-height: 242px;
  max-height: none !important;
  padding-bottom: 16px !important;
}

.dir-county-inspector-card.has-advocacy .inspector-tags {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.inspector-advocacy-card {
  margin-top: 6px;
  background: linear-gradient(135deg, #0b1424 0%, #112036 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inspector-advocacy-header {
  font-size: 0.82rem;
  font-weight: 700;
  color: #60a5fa;
  display: flex;
  align-items: center;
  gap: 7px;
}

.inspector-advocacy-text {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

.inspector-advocacy-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.inspector-advocacy-btn:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .adv-floating-pill {
    bottom: 16px;
    right: 16px;
    left: 16px;
    border-radius: 12px;
    padding: 8px 12px;
    justify-content: space-between;
  }

  .adv-persona-grid {
    grid-template-columns: 1fr;
  }

  .adv-modal-card {
    padding: 20px 18px !important;
  }
}
