/**
 * House Drawing Loader
 * Property Rental WordPress Theme
 * --------------------------------
 * Drop this file in your theme folder and enqueue it,
 * OR paste into Appearance > Customize > Additional CSS
 */

/* ── Overlay that covers the page on load ── */
#site-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#site-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── House SVG wrapper ── */
.house-loader {
  width: 80px;
  height: 72px;
  position: relative;
}

.house-loader svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ── Animated stroke paths ── */
.house-path,
.door-path,
.window-path {
  fill: none;
  stroke: #EC2A60;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(232, 200, 122, 0.5));
}

.house-path {
  stroke-dasharray: 370;
  stroke-dashoffset: 370;
  animation: draw-house 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.door-path {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: draw-door 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.window-path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: draw-window 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ── Keyframes ── */
@keyframes draw-house {
  0%   { stroke-dashoffset: 370; opacity: 1; }
  50%  { stroke-dashoffset: 0;   opacity: 1; }
  70%  { stroke-dashoffset: 0;   opacity: 1; }
  90%  { stroke-dashoffset: 0;   opacity: 0; }
  100% { stroke-dashoffset: 370; opacity: 0; }
}

@keyframes draw-door {
  0%   { stroke-dashoffset: 80; opacity: 1; }
  30%  { stroke-dashoffset: 80; opacity: 1; }
  55%  { stroke-dashoffset: 0;  opacity: 1; }
  70%  { stroke-dashoffset: 0;  opacity: 1; }
  90%  { stroke-dashoffset: 0;  opacity: 0; }
  100% { stroke-dashoffset: 80; opacity: 0; }
}

@keyframes draw-window {
  0%   { stroke-dashoffset: 60; opacity: 1; }
  40%  { stroke-dashoffset: 60; opacity: 1; }
  60%  { stroke-dashoffset: 0;  opacity: 1; }
  70%  { stroke-dashoffset: 0;  opacity: 1; }
  90%  { stroke-dashoffset: 0;  opacity: 0; }
  100% { stroke-dashoffset: 60; opacity: 0; }
}

/* ── Tagline text ── */
.house-loader-tagline {
  color: #EC2A60;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: Georgia, serif;
}

/* ── Pulsing dots ── */
.house-loader-dots {
  display: flex;
  gap: 6px;
}

.house-loader-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #EC2A60;
  opacity: 0.3;
  animation: dot-pulse 1.4s ease-in-out infinite;
}

.house-loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.house-loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1.2); }
}
