/* ── Page transition ── */
body.page-enter {
  opacity: 0;
}

body.page-enter-active {
  opacity: 1;
  transition: opacity 0.35s ease;
}

body.page-exit {
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

/* ── Skeleton loader ── */
#houlistic-skeleton {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#houlistic-skeleton.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.skeleton-nav {
  height: 64px;
  background: linear-gradient(90deg, #246bce 0%, #1e5aab 100%);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
}

.skeleton-nav .sk-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  animation: skPulse 1.4s ease-in-out infinite;
}

.skeleton-nav .sk-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.skeleton-nav .sk-pill {
  width: 48px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  animation: skPulse 1.4s ease-in-out infinite;
}

.skeleton-nav .sk-pill:nth-child(2) { animation-delay: 0.1s; }
.skeleton-nav .sk-pill:nth-child(3) { animation-delay: 0.2s; }
.skeleton-nav .sk-pill:nth-child(4) { animation-delay: 0.3s; }
.skeleton-nav .sk-pill:nth-child(5) { animation-delay: 0.4s; }

.skeleton-hero {
  flex: 1;
  min-height: 280px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
}

.skeleton-hero .sk-title {
  width: min(320px, 70%);
  height: 36px;
  border-radius: 8px;
  background: #cbd5e1;
  animation: skPulse 1.4s ease-in-out infinite;
}

.skeleton-hero .sk-search {
  width: min(480px, 90%);
  height: 48px;
  border-radius: 24px;
  background: #e2e8f0;
  animation: skPulse 1.4s ease-in-out infinite 0.15s;
}

.skeleton-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 32px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.skeleton-cards .sk-card {
  height: 220px;
  border-radius: 12px;
  background: #e2e8f0;
  animation: skPulse 1.4s ease-in-out infinite;
}

.skeleton-cards .sk-card:nth-child(2) { animation-delay: 0.12s; }
.skeleton-cards .sk-card:nth-child(3) { animation-delay: 0.24s; }
.skeleton-cards .sk-card:nth-child(4) { animation-delay: 0.36s; }

@keyframes skPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ── Toast notifications ── */
#houlistic-toast-root {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: min(420px, 92vw);
}

.houlistic-toast {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
  border-left: 4px solid #246bce;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform: translateY(-20px);
  opacity: 0;
}

.houlistic-toast.is-leaving {
  animation: toastOut 0.3s ease forwards;
}

.houlistic-toast.success { border-left-color: #22c55e; }
.houlistic-toast.error { border-left-color: #ef4444; }
.houlistic-toast.warn { border-left-color: #f59e0b; }

.houlistic-toast i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.houlistic-toast.success i { color: #22c55e; }
.houlistic-toast.error i { color: #ef4444; }
.houlistic-toast.warn i { color: #f59e0b; }
.houlistic-toast.info i { color: #246bce; }

@keyframes toastIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  to {
    transform: translateY(-12px);
    opacity: 0;
  }
}

/* Social 3D styles live in nav&footer.css / style.css */

/* ── Request result popup ── */
body.houlistic-popup-open {
  overflow: hidden;
}

.houlistic-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.houlistic-popup-overlay.is-open {
  opacity: 1;
}

.houlistic-popup {
  position: relative;
  width: min(100%, 440px);
  max-height: min(90vh, 560px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.houlistic-popup-overlay.is-open .houlistic-popup {
  transform: translateY(0) scale(1);
}

.houlistic-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}

.houlistic-popup-close:hover {
  color: #475569;
}

.houlistic-popup-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.houlistic-popup--success .houlistic-popup-icon {
  background: #dcfce7;
  color: #16a34a;
}

.houlistic-popup--error .houlistic-popup-icon {
  background: #fee2e2;
  color: #dc2626;
}

.houlistic-popup--info .houlistic-popup-icon {
  background: #dbeafe;
  color: #2563eb;
}

.houlistic-popup-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.houlistic-popup-body {
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.55;
  text-align: left;
}

.houlistic-popup-body p {
  margin: 0 0 10px;
}

.houlistic-popup-body p:last-child {
  margin-bottom: 0;
}

.houlistic-popup-btn {
  margin-top: 18px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: #246bce;
  transition: background 0.2s ease, transform 0.15s ease;
}

.houlistic-popup-btn:hover {
  background: #1e5aab;
}

.houlistic-popup-btn:active {
  transform: scale(0.98);
}

.houlistic-popup--error .houlistic-popup-btn {
  background: #dc2626;
}

.houlistic-popup--error .houlistic-popup-btn:hover {
  background: #b91c1c;
}
