/* ═══════════════════════════════════════════════════════════════════
   CanineConnect UI Overhaul — Pure Black + White Buttons + Gold Glow
   Loaded AFTER inline <style> blocks on every page.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. ENFORCE PURE BLACK BACKGROUND ── */
html, body {
  background: #000000 !important;
}

/* ── 2. PRIMARY CTA BUTTONS — White bg + Black text ── */
.btn-primary,
.btn-primary-sm,
.btn-hero-primary,
.btn-cta,
.btn-cta-full,
.btn-book-now,
.nav-btn.primary,
.mobile-nav-cta {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  border: 1px solid #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus-visible,
.btn-primary-sm:hover, .btn-primary-sm:focus-visible,
.btn-hero-primary:hover, .btn-hero-primary:focus-visible,
.btn-cta:hover, .btn-cta:focus-visible,
.btn-cta-full:hover, .btn-cta-full:focus-visible,
.btn-book-now:hover, .btn-book-now:focus-visible,
.nav-btn.primary:hover, .nav-btn.primary:focus-visible,
.mobile-nav-cta:hover, .mobile-nav-cta:focus-visible {
  background: #e8e8e8 !important;
  color: #000000 !important;
  border-color: #e8e8e8 !important;
}

/* Glossy hero CTA — flatten to pure white */
.btn-hero-glossy {
  background: #ffffff !important;
  color: #000000 !important;
  border: none !important;
  box-shadow: 0 2px 16px rgba(255,255,255,0.15), inset 0 1px 0 rgba(255,255,255,0.9) !important;
}
.btn-hero-glossy:hover, .btn-hero-glossy:focus-visible {
  background: #f0f0f0 !important;
  box-shadow: 0 4px 28px rgba(255,255,255,0.22), inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ── 3. SECONDARY BUTTONS — White outlined border + White text ── */
.btn-ghost,
.btn-hero-secondary,
.btn-hero-glossy-secondary,
.btn-outline,
.tc-btn {
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
}

.btn-ghost:hover, .btn-ghost:focus-visible,
.btn-hero-secondary:hover, .btn-hero-secondary:focus-visible,
.btn-hero-glossy-secondary:hover, .btn-hero-glossy-secondary:focus-visible,
.btn-outline:hover, .btn-outline:focus-visible,
.tc-btn:hover, .tc-btn:focus-visible {
  border-color: #ffffff !important;
  background: rgba(255,255,255,0.06) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(255,255,255,0.06) !important;
}

/* Keep glossy-secondary at 2px border for visual weight */
.btn-hero-glossy-secondary {
  border-width: 2px !important;
}

/* Nav ghost buttons — slightly thinner border in nav context */
nav .btn-ghost {
  border-color: rgba(255,255,255,0.25) !important;
}
nav .btn-ghost:hover, nav .btn-ghost:focus-visible {
  border-color: #ffffff !important;
}

/* App nav buttons (app.html uses .nav-btn) */
.nav-btn:not(.primary):not(.active) {
  border-color: rgba(255,255,255,0.25) !important;
  color: rgba(255,255,255,0.7) !important;
}
.nav-btn:not(.primary):not(.active):hover,
.nav-btn:not(.primary):not(.active):focus-visible {
  border-color: #ffffff !important;
  color: #ffffff !important;
}

/* ── 4. FOCUS VISIBLE — keep high contrast ── */
:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
}

/* ── 5. GOLD GLOW ANIMATIONS ── */
@keyframes cc-gold-glow-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8); }
  35%  { box-shadow: 0 0 32px 14px rgba(255, 215, 0, 0.45), 0 0 60px 24px rgba(255, 180, 0, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

@keyframes cc-gold-border-flash {
  0%   { border-color: rgba(255, 215, 0, 0.9); }
  100% { border-color: rgba(245, 158, 11, 0.25); }
}

@keyframes cc-gold-bg-fade {
  0%   { background-color: rgba(255, 215, 0, 0.1); }
  100% { background-color: rgba(245, 158, 11, 0.04); }
}

@keyframes cc-checkmark-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* Applied via JS when a task checkbox is checked */
.cc-task-glow {
  animation: cc-gold-glow-pulse 1.5s ease-out forwards,
             cc-gold-border-flash 1.5s ease-out forwards,
             cc-gold-bg-fade 1.5s ease-out forwards !important;
}

/* ── 6. DAILY TRAINING TASK CHECKBOX COMPONENT ── */
.daily-task-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
}

.daily-task-item:hover {
  border-color: rgba(255,255,255,0.15);
}

/* Custom checkbox */
.daily-task-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.daily-task-item input[type="checkbox"]:checked {
  background: #f59e0b;
  border-color: #f59e0b;
}

.daily-task-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 6px;
  height: 11px;
  border: solid #000000;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  animation: cc-checkmark-pop 0.3s ease-out;
}

.daily-task-item input[type="checkbox"]:focus-visible {
  outline: 2px solid #f59e0b !important;
  outline-offset: 2px !important;
}

/* Task label */
.daily-task-label {
  font-size: 0.95rem;
  color: #ffffff;
  transition: color 0.3s, text-decoration-color 0.3s;
  flex: 1;
}

/* Completed state */
.daily-task-item.completed .daily-task-label {
  color: rgba(255,255,255,0.4);
  text-decoration: line-through;
  text-decoration-color: rgba(245, 158, 11, 0.5);
}

.daily-task-item.completed {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.04);
}

/* Gold star indicator for completed tasks */
.daily-task-reward {
  font-size: 1.1rem;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.3s;
}

.daily-task-item.completed .daily-task-reward {
  opacity: 1;
  transform: scale(1);
  animation: cc-checkmark-pop 0.4s ease-out;
}

/* ── 7. GENERAL CHECKBOX GOLD GLOW ── */
/* Any checkbox on site gets the gold treatment when checked */
input[type="checkbox"]:checked {
  accent-color: #f59e0b;
}

/* Specialty checkboxes in trainer portal */
.specialty-check input[type="checkbox"]:checked {
  accent-color: #f59e0b;
}

/* Terms checkbox */
.terms-check input[type="checkbox"]:checked {
  accent-color: #f59e0b;
}

/* ── 8. ACCESSIBILITY — prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .cc-task-glow {
    animation: none !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    background-color: rgba(245, 158, 11, 0.06) !important;
  }

  .daily-task-item input[type="checkbox"]:checked::after {
    animation: none !important;
  }

  .daily-task-reward {
    animation: none !important;
    transition: none !important;
  }

  .daily-task-item {
    transition: none !important;
  }

  /* Disable all button hover transitions for motion-sensitive users */
  .btn-primary, .btn-ghost, .btn-hero-primary, .btn-hero-secondary,
  .btn-hero-glossy, .btn-hero-glossy-secondary, .btn-cta, .btn-cta-full,
  .btn-outline, .btn-book-now, .btn-primary-sm, .nav-btn, .tc-btn {
    transition: none !important;
  }
}

/* ── 9. HIGH CONTRAST ENFORCEMENT ── */
/* Ensure card backgrounds don't drift from the dark theme */
/* Cards stay very dark (not gray) — these are subtle, not overridden */

/* Ensure all text links remain visible */
a { color: #f59e0b; }
a:hover { color: #fbbf24; }

/* Keep muted text readable against black */
/* Minimum 4.5:1 contrast ratio maintained with #a0a0a8 on #000000 = 7.1:1 */
