/* stitchfly polish · v1 · 2026-04-26
   Empty states, error states, success states, sticky filters, etc.
   Layered under popups.css + animations.css. */

/* Empty state */
.sf-empty {
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed #e0e0e6;
  border-radius: 16px;
  background: #fafafa;
  color: #6b6b73;
}
.sf-empty-art {
  font-size: 56px; line-height: 1; margin-bottom: 14px;
}
.sf-empty h3 { margin: 0 0 8px; font-size: 18px; color: #0c0c0f; }
.sf-empty p { margin: 0; font-size: 14px; max-width: 360px; margin-left: auto; margin-right: auto; }

/* Error state on form fields */
.sf-form input.is-error,
.sf-form input[aria-invalid='true'] {
  border-color: #e74c3c !important;
  background: #fff8f7 !important;
}
.sf-form .sf-error-msg {
  color: #c0392b; font-size: 12px; margin-top: 4px;
}
.sf-form input.is-success { border-color: #27ae60 !important; background: #f3fdf6 !important; }

/* Sticky filters bar (results page polish) */
.sf-sticky-filters {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
  padding: 10px 16px;
  transition: box-shadow .2s;
}
.sf-sticky-filters.is-stuck { box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }

/* Wishlist heart icon on hotel cards */
.sf-wl-heart {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, .92);
  border: 0; border-radius: 50%;
  font-size: 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  transition: transform .15s, background .15s;
  z-index: 5;
}
.sf-wl-heart:hover { transform: scale(1.1); background: #fff; }
.sf-wl-heart.is-saved { background: #ff4d6d; color: #fff; }

/* Compare checkbox on hotel cards */
.sf-cmp-toggle {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .92);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  z-index: 5;
  border: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  color: #0c0c0f;
}
.sf-cmp-toggle.is-on { background: #c9a84c; color: #fff; }

/* Map / share / alert buttons on hotel cards */
.sf-card-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 8px;
}
.sf-card-actions button {
  flex: 1 1 auto;
  padding: 6px 10px;
  border: 1px solid #eee;
  background: #fafafa;
  border-radius: 8px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: background .12s, transform .12s;
  color: #0c0c0f;
}
.sf-card-actions button:hover { background: #f0f0f0; transform: translateY(-1px); }

/* Help (?) button in navbar */
.sf-help-btn {
  position: fixed; right: 16px; bottom: 80px; z-index: 90;
  width: 44px; height: 44px;
  background: var(--sf-pop-gold, #c9a84c);
  color: #fff; border: 0; border-radius: 50%;
  font-size: 22px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 22px rgba(201, 168, 76, .4);
  transition: transform .15s;
}
.sf-help-btn:hover { transform: scale(1.08); }
@media (max-width: 768px) { .sf-help-btn { bottom: 96px; } }

/* 404 / 500 polish */
.error-page {
  min-height: 60vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px;
}
.error-page h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  margin: 0;
  background: linear-gradient(135deg, #c9a84c, #e5c97a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.error-page p { color: #6b6b73; font-size: 1.05rem; max-width: 460px; }

/* Success states with subtle glow */
.is-success-state {
  border: 1px solid rgba(46, 204, 113, .35) !important;
  background: rgba(46, 204, 113, .04) !important;
}

/* Loading overlay (when submit form / fetch is in flight) */
.sf-loading-overlay {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  display: none;
  align-items: center; justify-content: center;
  border-radius: inherit;
}
.sf-loading-overlay.is-active { display: flex; }

/* Misc small polish */
.btn { transition: transform .12s, box-shadow .12s; }
.btn:not(:disabled):active { transform: translateY(1px) scale(.99); }

/* Mobile sticky bottom CTA bar (single CTA on long pages) */
.sf-bottom-cta {
  position: fixed; left: 16px; right: 16px; bottom: 80px; z-index: 700;
  background: #0c0c0f;
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  display: none;
  align-items: center; gap: 10px;
}
.sf-bottom-cta.is-visible { display: flex; }
.sf-bottom-cta-text { flex: 1; font-weight: 600; font-size: 14px; }
@media (min-width: 769px) { .sf-bottom-cta { display: none !important; } }
