/*
 * Wild Horse Ranch — Ticket Counter Widget (DEMO)
 * Shared styles for the demo widget.
 * Scoped to .whr-ticker — safe to load alongside any other CSS.
 *
 * When swapping in the real widget, replace this file with the
 * production CSS (same class names — full drop-in replacement).
 */

.whr-ticker {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 420px;
  margin: 1.5rem auto;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #f5f1e8 0%, #ede4d3 100%);
  border: 1px solid #d4c4a8;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(90, 60, 20, 0.08);
  color: #3a2e1f;
  transition: opacity 0.4s ease, background 0.4s ease, border-color 0.4s ease;
  box-sizing: border-box;
  position: relative;
}
.whr-ticker *, .whr-ticker *::before, .whr-ticker *::after { box-sizing: border-box; }
.whr-ticker--hidden { display: none !important; }

.whr-ticker__demo-badge {
  display: none;
  position: absolute;
  top: 8px;
  right: 10px;
  background: rgba(139, 69, 19, 0.12);
  color: #8b4513;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 3px;
  pointer-events: none;
}
.whr-ticker--demo .whr-ticker__demo-badge { display: block; }

.whr-ticker__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b5637;
  margin-bottom: 0.75rem;
}
.whr-ticker__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.6);
  animation: whr-pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes whr-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}
.whr-ticker__count {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.whr-ticker__number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: #8b4513;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}
.whr-ticker__number.is-loaded { color: #c2410c; }
.whr-ticker__separator { font-size: 1rem; color: #8b7355; }
.whr-ticker__cap {
  font-size: 1.5rem;
  font-weight: 600;
  color: #8b7355;
  font-variant-numeric: tabular-nums;
}
.whr-ticker__message {
  font-size: 1rem;
  font-weight: 600;
  color: #8b4513;
  margin-bottom: 0.75rem;
  min-height: 1.25rem;
}
.whr-ticker__bar {
  height: 8px;
  background: rgba(139, 69, 19, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.whr-ticker__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d97706 0%, #ea580c 100%);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
}
.whr-ticker__meta {
  font-size: 0.8125rem;
  color: #6b5637;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  flex-wrap: wrap;
}
.whr-ticker__sep { color: #c4b598; }
.whr-ticker__cta {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: #8b4513;
  color: #fff;
  border: none;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
}
.whr-ticker__cta:hover { background: #c2410c; }
.whr-ticker__cta:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }

.whr-ticker--tier-urgent {
  background: linear-gradient(135deg, #fef3e8 0%, #fed7aa 100%);
  border-color: #f97316;
}
.whr-ticker--tier-urgent .whr-ticker__number { color: #c2410c; }
.whr-ticker--tier-urgent .whr-ticker__bar-fill {
  background: linear-gradient(90deg, #f97316 0%, #dc2626 100%);
}
.whr-ticker--tier-sold-out {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border-color: #dc2626;
}
.whr-ticker--tier-sold-out .whr-ticker__dot {
  background: #dc2626;
  animation: none;
}

/* Waitlist modal */
.whr-waitlist-backdrop {
  position: fixed; inset: 0;
  background: rgba(30, 20, 10, 0.6);
  display: none;
  align-items: center; justify-content: center;
  z-index: 99999;
  padding: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-sizing: border-box;
}
.whr-waitlist-backdrop.is-open { display: flex; }
.whr-waitlist-backdrop *, .whr-waitlist-backdrop *::before, .whr-waitlist-backdrop *::after {
  box-sizing: border-box;
}
.whr-waitlist-modal {
  background: #fefaf3;
  border-radius: 12px;
  max-width: 420px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  color: #3a2e1f;
}
.whr-waitlist-modal__close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: transparent; border: none;
  font-size: 1.5rem; line-height: 1;
  width: 2rem; height: 2rem;
  cursor: pointer; color: #8b7355;
  border-radius: 4px;
}
.whr-waitlist-modal__close:hover { color: #3a2e1f; background: rgba(0,0,0,0.05); }
.whr-waitlist-modal h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: #8b4513;
}
.whr-waitlist-modal p {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: #6b5637;
  line-height: 1.4;
}
.whr-waitlist-modal .whr-demo-note {
  background: #fef3e8;
  border: 1px solid #f97316;
  color: #9a3412;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.whr-waitlist-field { display: block; margin-bottom: 1rem; }
.whr-waitlist-field > label {
  display: block;
  font-size: 0.875rem; font-weight: 600;
  margin-bottom: 0.25rem;
  color: #3a2e1f;
}
.whr-waitlist-field input[type="text"],
.whr-waitlist-field input[type="email"],
.whr-waitlist-field input[type="date"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #d4c4a8; border-radius: 6px;
  font-size: 1rem; font-family: inherit;
  background: #fff; color: #3a2e1f;
}
.whr-waitlist-field--checkbox {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.whr-waitlist-field--checkbox input { margin-top: 0.2rem; flex-shrink: 0; }
.whr-waitlist-field--checkbox label {
  font-size: 0.875rem; font-weight: 400; line-height: 1.35;
  color: #6b5637; cursor: pointer;
}
.whr-waitlist-submit {
  display: block; width: 100%;
  padding: 0.75rem 1rem;
  background: #8b4513; color: #fff;
  border: none; border-radius: 6px;
  font-size: 1rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
}
.whr-waitlist-submit:hover { background: #c2410c; }
.whr-waitlist-submit:disabled { background: #9ca3af; cursor: not-allowed; }
.whr-waitlist-status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  display: none;
}
.whr-waitlist-status.is-success {
  display: block;
  background: #ecfdf5; color: #065f46;
  border: 1px solid #10b981;
}

@media (max-width: 480px) {
  .whr-ticker { max-width: 100%; padding: 1rem; }
  .whr-ticker__number { font-size: 2.5rem; }
  .whr-waitlist-modal { padding: 1.5rem; }
}
