/* ThaneHome.com — Smart Visitor Auth Popup (premium real-estate aesthetic) */
.th-popup-overlay {
  position: fixed; inset: 0; z-index: 2147483647;
  display: none; align-items: center; justify-content: center;
  background: rgba(16, 44, 80, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  box-sizing: border-box;
}
.th-popup-modal {
  position: relative; width: 100%; max-width: 420px; max-height: 92vh;
  overflow-y: auto; background: #ffffff;
  border-radius: 16px; box-shadow: 0 20px 50px -10px rgba(16, 44, 80, 0.45);
  padding: 32px 28px; box-sizing: border-box;
  border: 1px solid rgba(255, 144, 21, 0.2);
  animation: thPopupFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes thPopupFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.th-popup-close {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: #f1f5f9; color: #172B45;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s, color 0.2s;
}
.th-popup-close:hover { background: #e2e8f0; color: #FF9015; }

.th-popup-brand { display:flex; align-items:center; gap:8px; margin-bottom: 4px; }
.th-popup-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #102C50 0%, #173B63 100%);
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -0.5px;
  display: grid; place-items: center; font-family: 'Playfair Display', Georgia, serif;
}
.th-popup-wordmark { font-family: 'Playfair Display', Georgia, serif; font-size: 17px; font-weight: 700; color: #102C50; }
.th-popup-accent { color: #FF9015; }

.th-popup-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px; line-height: 1.25; color: #102C50; margin: 12px 0 6px; letter-spacing: -0.2px; font-weight: 700;
}
.th-popup-subtitle {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13px; line-height: 1.5; color: #718096; margin: 0 0 18px;
}

.th-popup-tabs { display:flex; gap:0; margin-bottom: 18px; border-bottom: 1px solid #e2e8f0; }
.th-popup-tab {
  flex:1; padding: 10px 8px; border: none; background: transparent;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px; font-weight: 600; color: #718096;
  cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s;
}
.th-popup-tab.th-popup-tab-active { color: #FF9015; border-bottom-color: #FF9015; font-weight: 700; }
.th-popup-tab:hover:not(.th-popup-tab-active) { color: #102C50; }

.th-popup-panel { display: none; animation: thPanelFade 0.22s ease; }
.th-popup-panel.th-popup-panel-active { display: block; }
@keyframes thPanelFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.th-popup-field { margin-bottom: 14px; }
.th-popup-label {
  display:block; font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12px; font-weight: 600; color: #172B45; margin-bottom: 4px;
}
.th-popup-input {
  width: 100%; box-sizing: border-box; padding: 10px 13px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px; color: #172B45;
  border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.th-popup-input:focus {
  outline: none; border-color: #FF9015; background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 144, 21, 0.15);
}

.th-popup-footer-actions { margin-top: 6px; display:flex; gap:8px; flex-direction: column; }
.th-popup-btn {
  width: 100%; box-sizing: border-box; padding: 11px 16px; border: none; border-radius: 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none;
  transition: transform 0.1s, opacity 0.2s, background 0.2s; display: block;
}
.th-popup-btn:active { transform: scale(0.985); }
.th-popup-btn-primary {
  background: #102C50; color: #ffffff;
}
.th-popup-btn-primary:hover { background: #173B63; }
.th-popup-btn-whatsapp {
  background: #25d366; color: #ffffff; margin-top: 8px;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.th-popup-btn-whatsapp:hover { background: #20bd5f; }
.th-popup-wa-icon { font-size: 15px; line-height: 1; }

.th-popup-divider {
  display:flex; align-items:center; text-align:center; margin: 16px 0 12px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11.5px; color: #94a3b8;
}
.th-popup-divider::before, .th-popup-divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.th-popup-divider span { padding: 0 10px; white-space: nowrap; }

.th-popup-forgot {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12.5px; color: #173B63; text-decoration: underline;
  text-decoration-color: rgba(23, 59, 99, 0.4); text-underline-offset: 3px;
  align-self: flex-start;
}
.th-popup-forgot:hover { color: #FF9015; }

.th-popup-hint {
  margin: 8px 0 0; font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12.5px; color: #718096; text-align: center;
}
.th-popup-hint button {
  background: none; border: none; color: #102C50; font-weight: 700;
  font-family: inherit; font-size: inherit; cursor: pointer; text-decoration: underline;
  text-decoration-color: rgba(16, 44, 80, 0.4); text-underline-offset: 3px; padding: 0;
}
.th-popup-hint button:hover { color: #FF9015; }

.th-popup-field-checkbox {
  display:flex; align-items: flex-start; gap:8px; margin-bottom: 14px;
}
.th-popup-checkbox { width: 15px; height: 15px; margin-top: 2px; accent-color: #FF9015; cursor: pointer; }
.th-popup-label-check {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12px; color: #172B45; line-height: 1.45; cursor: pointer; user-select: none;
}
.th-popup-label-check a { color: #102C50; text-decoration: underline; text-decoration-color: rgba(16, 44, 80, 0.4); }
.th-popup-label-check a:hover { color: #FF9015; }

.th-popup-flash {
  margin-bottom: 12px; padding: 8px 12px; border-radius: 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 12.5px; line-height: 1.4;
}
.th-popup-flash-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.th-popup-flash-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* Mobile */
@media (max-width: 560px) {
  .th-popup-overlay { padding: 14px; }
  .th-popup-modal { padding: 26px 18px; max-height: 94vh; }
  .th-popup-heading { font-size: 18px; }
  .th-popup-btn { padding: 10px 14px; font-size: 13.5px; }
}

/* Google Sign In Button */
.th-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-bottom: 8px;
}
.th-btn-google:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.th-btn-google:active {
  transform: scale(0.985);
  background: #f3f4f6;
}
.th-google-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .th-popup-modal { animation: none; }
  .th-popup-panel { animation: none; }
}
