/* NaijaBody V2 - Custom Styles
   Only styles that cannot be achieved with Tailwind CSS
   ================================================== */

/* CSS Custom Properties */
:root {
  --bg: #faf9f7;
  --bg-alt: #f3f1ed;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-dim: #666666;
  --text-light: #888888;
  --border: #e5e5e5;
  --green: #10b981;
  --green-light: #d1fae5;
  --green-dark: #059669;
  --green-darker: #047857;
  --accent: #f97316;
}

/* Dark mode colors */
:root.dark {
  --bg: #0f0f0f;
  --bg-alt: #1a1a1a;
  --card: #262626;
  --text: #f5f5f5;
  --text-dim: #a0a0a0;
  --text-light: #6b6b6b;
  --border: #333333;
  --green: #10b981;
  --green-light: #064e3b;
  --green-dark: #34d399;
  --green-darker: #6ee7b7;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[x-cloak] { display: none !important; }

/* Font smoothing */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ultra-wide screen constraint - centers page on 2560px+ displays */
@media (min-width: 1920px) {
  body {
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.08);
  }
}

/* Range Slider Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  background: var(--green);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 32px;
  height: 32px;
  background: var(--green);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
  transition: transform 0.15s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
}

/* Pulse animation for badges */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse-dot {
  animation: pulse 2s ease-in-out infinite;
}

/* FAQ Accordion transition */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-item .faq-icon {
  transition: transform 0.2s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Card hover effects */
.product-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* CTA button scale on hover */
.cta-scale:hover {
  transform: scale(1.02);
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* 3D Body Viewer Styles */
.body-viewer-container {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(to bottom, #f5f5f4, #e7e5e4);
}

.dark .body-viewer-container {
  background: linear-gradient(to bottom, #44403c, #292524);
}

.body-viewer-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.body-viewer-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #78716c;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
  opacity: 0.8;
}

.dark .body-viewer-hint {
  color: #a8a29e;
}

.body-viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit;
}

.body-viewer-loading::after {
  content: '';
  width: 2rem;
  height: 2rem;
  border: 3px solid #d6d3d1;
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Weight comparison labels */
.weight-label {
  position: absolute;
  top: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.dark .weight-label {
  background: rgba(41, 37, 36, 0.9);
}

.weight-label-before {
  left: 1rem;
  color: #dc2626;
}

.weight-label-after {
  right: 1rem;
  color: #10b981;
}

/* Calculator 2-column layout utilities */
.calculator-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.calculator-input-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calculator-result-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
