/* Slotivo Global Animations — all accommodation 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);       /* spring-like, refined */
  --sv-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);   /* smooth, neutral */
  --sv-ease-soft: cubic-bezier(0.32, 0.72, 0, 1);     /* Apple-like quietness */
  --sv-ease-snappy: cubic-bezier(0.34, 1.16, 0.64, 1); /* gentle overshoot */
  --sv-dur-quick: 180ms;
  --sv-dur-base: 280ms;
  --sv-dur-slow: 560ms;
  --sv-dur-reveal: 720ms;

  /* Refined shadow scale (Impeccable / Vercel-ish) */
  --sv-shadow-xs: 0 1px 2px rgba(15, 15, 15, 0.04);
  --sv-shadow-sm: 0 1px 2px rgba(15, 15, 15, 0.04), 0 2px 6px rgba(15, 15, 15, 0.05);
  --sv-shadow-md: 0 2px 4px rgba(15, 15, 15, 0.04), 0 8px 20px rgba(15, 15, 15, 0.06);
  --sv-shadow-lg: 0 4px 8px rgba(15, 15, 15, 0.05), 0 16px 40px rgba(15, 15, 15, 0.08);
  --sv-shadow-xl: 0 6px 12px rgba(15, 15, 15, 0.06), 0 28px 64px rgba(15, 15, 15, 0.1);

  /* Hairline */
  --sv-hairline: rgba(15, 15, 15, 0.07);
  --sv-hairline-strong: rgba(15, 15, 15, 0.12);

  /* Focus ring (a11y + polish) */
  --sv-focus-ring: 0 0 0 3px rgba(15, 15, 15, 0.12);
  --sv-focus-ring-inset: inset 0 0 0 1px rgba(15, 15, 15, 0.16);
}

/* Premium typographic baseline */
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;
}

/* Tabular numerals where it matters (prices, dates, counters) */
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;
}

/* Refined selection styling — calmer, no harsh blue */
body[class*='slotivo-kostur-'] ::selection {
  background: rgba(15, 15, 15, 0.86);
  color: #fff;
}

/* Focus-visible ring (only on keyboard, not on click) */
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-'] button:focus-visible,
body[class*='slotivo-kostur-'] a:focus-visible {
  outline: none;
  box-shadow: var(--sv-focus-ring);
}

/* Image rendering hint — sharper edges on scaled images */
body[class*='slotivo-kostur-'] img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Smoother native form controls */
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);
}

/* Print: clean, no decorations */
@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-'] #successModal {
    display: none !important;
  }
}

/* Native wheel/touch scroll stays instant; anchor clicks use JS scrollIntoView(smooth). */
html {
  scroll-behavior: auto;
}

@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;
  }
}

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(14px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

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

  @keyframes slotivo-select-pulse {
    0% { box-shadow: 0 0 0 0 rgba(15, 15, 15, 0.14); }
    100% { box-shadow: 0 0 0 6px rgba(15, 15, 15, 0); }
  }

  @keyframes slotivo-modal-pop {
    from {
      opacity: 0;
      transform: scale(0.985) translateY(8px);
    }
    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(0, 0, 0, 0.08); }
    100% { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12); }
  }

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

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

  body.slotivo-anim-ready [data-slotivo-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity var(--sv-dur-reveal) var(--sv-ease-out),
                transform var(--sv-dur-reveal) var(--sv-ease-out);
  }

  body.slotivo-anim-ready [data-slotivo-reveal].slotivo-revealed {
    opacity: 1;
    transform: translateY(0);
  }

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

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

  body.slotivo-anim-ready .slotivo-btn-anim {
    position: relative;
    transition: transform 180ms var(--sv-ease-soft),
                box-shadow 220ms var(--sv-ease-soft),
                opacity 180ms var(--sv-ease-soft),
                background-color 220ms var(--sv-ease-soft),
                color 220ms var(--sv-ease-soft);
  }

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

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

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

  body.slotivo-anim-ready .slotivo-selected,
  body.slotivo-anim-ready select.slotivo-selected,
  body.slotivo-anim-ready input.slotivo-selected {
    animation: slotivo-select-pulse 480ms var(--sv-ease-soft);
  }

  body.slotivo-anim-ready .slotivo-field-focus {
    transform: translateY(-1px);
    transition: transform 220ms var(--sv-ease-soft),
                box-shadow 260ms var(--sv-ease-soft);
  }

  body.slotivo-anim-ready .slotivo-modal-open > .slotivo-modal-panel,
  .slotivo-modal-open > *:last-child:not(.slotivo-modal-backdrop),
  #success-modal:not(.hidden):not(.opacity-0) #success-modal-content,
  #success-modal.flex #success-modal-content,
  #successModal:not(.hidden) #modalContent,
  #successModal.flex #modalContent {
    animation: slotivo-modal-pop 520ms var(--sv-ease-out) both;
  }

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

  body.slotivo-anim-ready section .group img,
  body.slotivo-anim-ready section [class*='overflow-hidden'] > img {
    transition: transform 900ms var(--sv-ease-out),
                filter 600ms var(--sv-ease-soft);
  }

  body.slotivo-anim-ready section .group:hover img {
    transform: scale(1.03);
  }

  #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;
  }
}

/* Scroll performance — no visual change (animations + blur untouched) */
html[data-slotivo-template-ready] body > * {
  overflow-x: clip;
  max-width: none;
}

html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > header,
html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > nav,
html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > main,
html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > footer,
html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > #cookie-banner,
html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > #cookie-preferences-modal,
html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > #success-modal {
  overflow-x: visible;
}

html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > header.fixed,
html[data-slotivo-template-ready] body[class*='slotivo-kostur-'] > nav.fixed {
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
