/* Slotivo Global Animations — all barbershop kostur templates */
/* Polish layer: Emil Kowalski / Impeccable / Design Taste principles */

:root {
  /* Premium easing curves — Emil Kowalski set */
  --sv-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sv-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --sv-ease-soft: cubic-bezier(0.32, 0.72, 0, 1);
  --sv-ease-snappy: cubic-bezier(0.34, 1.16, 0.64, 1);
  --sv-dur-quick: 180ms;
  --sv-dur-base: 280ms;
  --sv-dur-slow: 560ms;
  --sv-dur-reveal: 720ms;

  /* Refined shadow scale (dark-friendly for barbershop dark themes) */
  --sv-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --sv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.3);
  --sv-shadow-md: 0 2px 4px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(0, 0, 0, 0.35);
  --sv-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
  --sv-shadow-xl: 0 6px 12px rgba(0, 0, 0, 0.35), 0 28px 64px rgba(0, 0, 0, 0.55);

  /* Hairline */
  --sv-hairline: rgba(255, 255, 255, 0.08);
  --sv-hairline-strong: rgba(255, 255, 255, 0.16);

  /* Focus ring */
  --sv-focus-ring: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

body[class*='slotivo-kostur-'] {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'ss01' 1;
  font-synthesis: none;
}

body[class*='slotivo-kostur-'] [class*='price'],
body[class*='slotivo-kostur-'] [class*='total'],
body[class*='slotivo-kostur-'] time,
body[class*='slotivo-kostur-'] input[type='number'],
body[class*='slotivo-kostur-'] input[type='date'] {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

body[class*='slotivo-kostur-'] ::selection {
  background: rgba(212, 175, 55, 0.6);
  color: #0a0a0a;
}

body[class*='slotivo-kostur-'] :focus {
  outline: none;
}
body[class*='slotivo-kostur-'] :focus-visible {
  outline: none;
  box-shadow: var(--sv-focus-ring);
  border-radius: inherit;
}

body[class*='slotivo-kostur-'] img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

body[class*='slotivo-kostur-'] select,
body[class*='slotivo-kostur-'] input,
body[class*='slotivo-kostur-'] textarea,
body[class*='slotivo-kostur-'] button {
  transition: box-shadow 220ms var(--sv-ease-soft),
              border-color 220ms var(--sv-ease-soft),
              background-color 220ms var(--sv-ease-soft),
              color 220ms var(--sv-ease-soft);
}

@media print {
  body[class*='slotivo-kostur-'] *,
  body[class*='slotivo-kostur-'] *::before,
  body[class*='slotivo-kostur-'] *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  body[class*='slotivo-kostur-'] nav,
  body[class*='slotivo-kostur-'] [data-slotivo-cookie-banner],
  body[class*='slotivo-kostur-'] #success-modal,
  body[class*='slotivo-kostur-'] #booking-success-modal {
    display: none !important;
  }
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Kostur-specific files override hover/reveal timing below */
body[class*='slotivo-kostur-'] [data-slotivo-reveal] {
  transition-duration: inherit;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes slotivo-page-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes slotivo-reveal-up {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes slotivo-booking-enter {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes slotivo-select-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.32); }
    100% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
  }

  @keyframes slotivo-modal-pop {
    from {
      opacity: 0;
      transform: scale(0.985) translateY(10px);
    }
    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  @keyframes slotivo-cookie-slide-up {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes slotivo-btn-glow {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25); }
    100% { box-shadow: 0 0 18px 2px rgba(255, 255, 255, 0.15); }
  }

  body.slotivo-anim-init {
    opacity: 0;
  }

  body.slotivo-page-loaded {
    animation: slotivo-page-fade-in 0.55s ease-out forwards;
  }

  [data-slotivo-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--sv-dur-reveal) var(--sv-ease-out),
                transform var(--sv-dur-reveal) var(--sv-ease-out);
    will-change: opacity, transform;
  }

  [data-slotivo-reveal].slotivo-revealed {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
  }

  .slotivo-card-lift {
    transition: transform 320ms var(--sv-ease-soft),
                box-shadow 320ms var(--sv-ease-soft);
  }

  .slotivo-card-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--sv-shadow-md);
  }

  .slotivo-btn-anim {
    position: relative;
    overflow: hidden;
    transition: transform 180ms var(--sv-ease-soft),
                box-shadow 220ms var(--sv-ease-soft),
                border-color 240ms var(--sv-ease-soft),
                background-color 240ms var(--sv-ease-soft),
                color 240ms var(--sv-ease-soft);
  }

  .slotivo-btn-anim::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, 0.10) 50%, transparent 58%);
    transform: translateX(-120%);
    transition: transform 700ms var(--sv-ease-out);
    pointer-events: none;
  }

  .slotivo-btn-anim:hover::after {
    transform: translateX(120%);
  }

  .slotivo-btn-anim:hover {
    box-shadow: var(--sv-shadow-sm);
  }

  .slotivo-btn-anim:active {
    transform: scale(0.985);
    transition-duration: 80ms;
  }

  [data-slotivo-booking] {
    animation: slotivo-booking-enter 720ms var(--sv-ease-out) 120ms both;
  }

  .slotivo-selected,
  .service-card.selected,
  .barber-card.slotivo-selected {
    animation: slotivo-select-pulse 520ms var(--sv-ease-soft);
  }

  .slotivo-modal-open > *:last-child,
  .slotivo-modal-open .slotivo-modal-panel,
  #success-modal:not(.hidden) > *:last-child,
  #booking-success-modal:not(.hidden) #booking-success-modal-content,
  #booking-success-modal.flex #booking-success-modal-content {
    animation: slotivo-modal-pop 520ms var(--sv-ease-out) both;
  }

  [data-slotivo-cookie-banner] {
    animation: slotivo-cookie-slide-up 560ms var(--sv-ease-out) 200ms both;
  }

  #slotivo-mobile-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  #slotivo-mobile-menu.slotivo-menu-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #slotivo-mobile-menu .slotivo-mobile-menu-panel {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  #slotivo-mobile-menu.slotivo-menu-open .slotivo-mobile-menu-panel {
    transform: translateX(0);
  }

  #slotivo-mobile-menu .slotivo-mobile-menu-backdrop {
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  #slotivo-mobile-menu.slotivo-menu-open .slotivo-mobile-menu-backdrop {
    opacity: 1;
  }
}

/* React preview: platform globals-post loads after template CSS — restore motion timing */
@media (prefers-reduced-motion: no-preference) {
  html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] .slotivo-stagger-item,
  html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] [data-slotivo-reveal],
  html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] .slotivo-card-lift,
  html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] .slotivo-btn-anim,
  html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] section img,
  html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] article img {
    animation-play-state: running !important;
  }
}
