/* ==========================================================================
   Public Resolver UI - Focused, Minimalist, Mobile-First
   Full parity with Server's static/css/resolver.css
   ========================================================================== */

:root {
  --resolver-card-bg: #0D1014;
  --resolver-border: #222933;
  --resolver-text-main: #F5F7FA;
  --resolver-text-sub: #A7AFBA;
  --resolver-primary: #1677FF;
  --resolver-success: #16a34a;
  --resolver-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
}

:root,
[data-theme="dark"] {
  --resolver-card-bg: #0D1014;
  --resolver-border: #222933;
  --resolver-text-main: #F5F7FA;
  --resolver-text-sub: #A7AFBA;
  --resolver-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] {
  --resolver-card-bg: #FFFFFF;
  --resolver-border: #E2E8F0;
  --resolver-text-main: #0F172A;
  --resolver-text-sub: #475569;
  --resolver-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.resolver-card {
  background: var(--resolver-card-bg);
  border: 1px solid var(--resolver-border);
  border-radius: 28px;
  padding: 36px 30px;
  max-width: 620px;
  width: 100%;
  margin: 24px auto 36px;
  box-shadow: var(--resolver-shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: cardSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Icon & Pulse Animation */
.resolver-icon-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resolver-icon-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  animation: pulseRing 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.resolver-icon-circle {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.4);
  transition: transform 0.3s ease;
}

.resolver-icon-circle.success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 8px 16px -4px rgba(34, 197, 94, 0.4);
}

@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 0.2; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.resolver-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--resolver-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 18px;
}

/* Address Text Display */
.resolver-address-box {
  margin-bottom: 22px;
  background: var(--bg-app);
  border: 1px solid var(--resolver-border);
  border-radius: 16px;
  padding: 16px 20px;
}

.resolver-address-text {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--resolver-text-main);
  letter-spacing: -0.02em;
  word-break: break-word;
}

.resolver-city-country {
  font-size: 14px;
  color: var(--resolver-text-sub);
  margin-top: 6px;
  font-weight: 600;
}

/* Copy Confirmation Card */
.copy-status-card {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 16px;
  padding: 12px 18px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.copy-status-card.visible {
  display: flex;
}

.copy-status-card .status-icon {
  color: var(--resolver-success);
}

.copy-status-card .status-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--resolver-success);
}

/* Driving Navigation Card & Button */
.driving-nav-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 20px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.driving-nav-card.copied-active {
  border-color: #16a34a;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(37, 99, 235, 0.06) 100%);
  box-shadow: 0 8px 24px -4px rgba(22, 163, 74, 0.25);
  animation: navPulseGlow 2s infinite ease-in-out;
}

@keyframes navPulseGlow {
  0% { transform: scale(1); box-shadow: 0 8px 24px -4px rgba(22, 163, 74, 0.25); }
  50% { transform: scale(1.015); box-shadow: 0 10px 30px -2px rgba(22, 163, 74, 0.35); }
  100% { transform: scale(1); box-shadow: 0 8px 24px -4px rgba(22, 163, 74, 0.25); }
}

.driving-nav-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.driving-nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.driving-nav-badge .pulsing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.85); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.5; }
  100% { transform: scale(0.85); opacity: 1; }
}

.btn-driving-directions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  transition: all 0.2s ease;
}

.btn-driving-directions:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.45);
}

.driving-nav-hint {
  font-size: 12px;
  color: var(--resolver-text-sub);
  margin: 10px 0 0 0;
  line-height: 1.4;
}

/* Fallback Manual Copy Button */
.btn-manual-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--resolver-primary);
  color: white;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.btn-manual-copy:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Actions Row in Result Card */
.resolver-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Dynamic Sponsored Ads Placement */
.ad-banner-wrapper {
  display: none; /* Shown dynamically ONLY if admin enables */
  max-width: 620px;
  margin: 20px auto;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ad-tag {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface-secondary);
  padding: 2px 8px;
  border-radius: 4px;
}

.ad-banner-link {
  display: block;
  text-decoration: none;
}

.ad-banner-img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}

.resolver-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--resolver-text-sub);
}

.resolver-footer a {
  color: var(--resolver-primary);
  text-decoration: none;
  font-weight: 600;
}
