/* ==========================================================================
   SPARKLE INK TATTOOS — COMPONENTS
   Buttons, Cards, Nav, Forms, Lightbox, Carousel, Accordion, Floating CTA
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BUTTONS (Ink-sweep hover effect, Section 4.5 & 4.6)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: var(--z-base);
  border: 1px solid transparent;
  text-decoration: none;
  transition: color var(--transition-base), border-color var(--transition-base);
}

/* Ink-fill sweep pseudo-element (wipes in left to right) */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.btn:hover::before {
  transform: scaleX(1);
}

/* Primary Button (Solid Ember) */
.btn-primary {
  background-color: var(--ember);
  color: var(--ink-black);
  border-color: var(--ember);
}

.btn-primary::before {
  background-color: var(--ember-dark);
}

.btn-primary:hover {
  color: #FFFFFF;
}

/* Ghost Button (Transparent with 1px border) */
.btn-ghost {
  background-color: transparent;
  color: var(--ember);
  border-color: var(--ember);
}

.theme-dark .btn-ghost {
  color: var(--paper);
  border-color: rgba(244, 239, 230, 0.4);
}

.btn-ghost::before {
  background-color: var(--ember);
}

.btn-ghost:hover {
  color: var(--ink-black);
  border-color: var(--ember);
}

/* Small Button Variant */
.btn-sm {
  padding: 10px 18px;
  font-size: 0.7rem;
}

/* --------------------------------------------------------------------------
   2. CARDS (Flat surfaces, 1px hairline borders, --radius: 6px)
   -------------------------------------------------------------------------- */
.card {
  border-radius: var(--radius);
  transition: border-color var(--transition-base), transform var(--transition-base);
  position: relative;
}

.theme-dark .card {
  background-color: var(--charcoal);
  border: 1px solid var(--line-dark);
  color: var(--ink-light);
}

.theme-light .card {
  background-color: var(--paper-dim);
  border: 1px solid var(--line);
  color: var(--ink-black);
}

.card:hover {
  border-color: var(--ember);
}

/* --------------------------------------------------------------------------
   3. STAMPS & BADGES
   -------------------------------------------------------------------------- */
.stamp-est {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px dashed var(--rust);
  color: var(--rust);
  font-family: var(--font-stamp);
  text-transform: uppercase;
  transform: rotate(-8deg);
  user-select: none;
  line-height: 1.1;
  text-align: center;
}

.stamp-est .stamp-year {
  font-size: 1.25rem;
}

.stamp-est .stamp-text {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

.pill-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius);
  background-color: rgba(192, 138, 46, 0.15);
  color: var(--ember);
  border: 1px solid rgba(192, 138, 46, 0.3);
}

/* --------------------------------------------------------------------------
   4. FORMS (Underline-style inputs per Section 4.6)
   -------------------------------------------------------------------------- */
.form-group {
  position: relative;
  margin-bottom: var(--space-4);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: var(--space-3) 0 var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: inherit;
  border-radius: 0;
  transition: border-color var(--transition-fast);
}

.theme-dark .form-input,
.theme-dark .form-select,
.theme-dark .form-textarea {
  border-bottom-color: var(--line-dark);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--ember);
  padding-bottom: calc(var(--space-2) - 1px);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-label {
  display: block;
  font-size: var(--text-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--ink-gray-300);
  margin-bottom: var(--space-1);
}

.theme-dark .form-label {
  color: var(--ink-muted);
}

.form-select option {
  background-color: var(--charcoal);
  color: var(--ink-light);
}

.form-feedback {
  display: none;
  padding: var(--space-3);
  border-radius: var(--radius);
  margin-top: var(--space-4);
  font-size: var(--text-body-sm);
}

.form-feedback.success {
  display: block;
  background-color: rgba(30, 80, 50, 0.15);
  border: 1px solid #2e7d32;
  color: #2e7d32;
}

.theme-dark .form-feedback.success {
  background-color: rgba(46, 125, 50, 0.25);
  color: #81c784;
}

.form-feedback.error {
  display: block;
  background-color: rgba(122, 46, 42, 0.15);
  border: 1px solid var(--rust);
  color: var(--rust);
}

/* --------------------------------------------------------------------------
   5. LIGHTBOX / DIALOG (Native <dialog> per Section 6.6 & 8.3)
   -------------------------------------------------------------------------- */
dialog.lightbox-modal {
  border: none;
  padding: 0;
  max-width: 1080px;
  width: calc(100% - 32px);
  max-height: 92vh;
  margin: auto;
  border-radius: var(--radius);
  background-color: var(--charcoal);
  color: var(--ink-light);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

dialog.lightbox-modal::backdrop {
  background: rgba(14, 13, 12, 0.92);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  display: grid;
  grid-template-columns: 1fr;
  height: 100%;
}

@media (min-width: 840px) {
  .lightbox-content {
    grid-template-columns: 1.4fr 1fr;
  }
}

.lightbox-img-wrap {
  position: relative;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-details {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid var(--line-dark);
}

.lightbox-meta h3 {
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: 1.65rem;
}

.lightbox-meta p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.lightbox-cta-wrap {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-dark);
}

.lightbox-close-btn {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: rgba(14, 13, 12, 0.7);
  border: 1px solid var(--line-dark);
  color: var(--ink-light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  z-index: 10;
}

.lightbox-close-btn:hover {
  background: var(--ember);
  color: var(--ink-black);
  border-color: var(--ember);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(14, 13, 12, 0.6);
  border: 1px solid var(--line-dark);
  color: var(--ink-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  z-index: 5;
}

.lightbox-nav-btn:hover {
  background: var(--ember);
  color: var(--ink-black);
}

.lightbox-nav-prev {
  left: var(--space-3);
}

.lightbox-nav-next {
  right: var(--space-3);
}

/* --------------------------------------------------------------------------
   6. CAROUSEL (Section 6.9 & 8.3)
   -------------------------------------------------------------------------- */
.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform var(--transition-slow);
  touch-action: pan-y pinch-zoom;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  padding: var(--space-2);
}

@media (min-width: 768px) {
  .carousel-slide {
    flex: 0 0 50%;
  }
}

@media (min-width: 1024px) {
  .carousel-slide {
    flex: 0 0 33.333%;
  }
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.carousel-dots {
  display: flex;
  gap: var(--space-2);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-dark);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.theme-light .carousel-dot {
  background: var(--line);
}

.carousel-dot.active {
  background: var(--ember);
  transform: scale(1.25);
}

.carousel-btn {
  background: transparent;
  border: 1px solid var(--line-dark);
  color: inherit;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.theme-light .carousel-btn {
  border-color: var(--line);
}

.carousel-btn:hover {
  border-color: var(--ember);
  background: var(--ember);
  color: var(--ink-black);
}

/* --------------------------------------------------------------------------
   7. ACCORDION (FAQ per Section 6.11)
   -------------------------------------------------------------------------- */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--charcoal);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.theme-light .faq-item {
  border-color: var(--line);
  background: var(--paper-dim);
}

.faq-item.is-open {
  border-color: var(--ember);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: transparent;
  border: none;
  color: inherit;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
  color: var(--ember);
}

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

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-panel-inner {
  padding: 0 var(--space-5) var(--space-4);
  font-size: var(--text-body-sm);
  line-height: 1.7;
  color: var(--ink-muted);
}

.theme-light .faq-panel-inner {
  color: var(--ink-gray-500);
}

/* --------------------------------------------------------------------------
   8. PERSISTENT FLOATING CTA BAR (Section 6.14)
   -------------------------------------------------------------------------- */
/* Desktop Floating WhatsApp Badge */
.floating-cta-desktop {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-floating);
  display: none;
}

@media (min-width: 601px) {
  .floating-cta-desktop {
    display: flex;
  }
}

.floating-wa-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: #1B1917;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 40px;
  border: 1px solid rgba(192, 138, 46, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  text-decoration: none;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.floating-wa-btn:hover {
  transform: translateY(-2px);
  border-color: var(--ember);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #25D366;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: pulse-ring 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.floating-wa-label {
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
}

.floating-wa-label .sub {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* Mobile Sticky Bottom CTA Bar (< 600px) */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--ink-black);
  border-top: 1px solid var(--line-dark);
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  z-index: var(--z-floating);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

@media (min-width: 601px) {
  .mobile-sticky-bar {
    display: none;
  }
}

.mobile-bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-light);
  text-decoration: none;
  border-right: 1px solid var(--line-dark);
}

.mobile-bar-btn:last-child {
  border-right: none;
}

.mobile-bar-btn.primary {
  background: var(--ember);
  color: var(--ink-black);
  font-weight: 700;
}

.mobile-bar-btn svg {
  width: 18px;
  height: 18px;
}
