/* ============================================
   P2A BOOKING PAGE – clean, scoped, mobile-safe
   ============================================ */

/* /booking and /local render their own fixed background layers.
   Disable the global backdrop from local.css on these pages so
   mobile/desktop scrolling does not drag multiple fullscreen stacks. */
body.p2a-scroll-optimised {
  background: #000 !important;
}

body.p2a-scroll-optimised::before,
body.p2a-scroll-optimised::after {
  content: none !important;
}

/* ===== Background layers ===== */
#fixed-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
#fixed-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/static/img/poster5.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
}

#ffixed-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

#ffixed-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/static/img/topixa.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
}

#overlay-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}
#overlay-bg .bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.0);
  transition: background 0.7s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}


/* ===== Core animations ===== */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px) scale(.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.fade-in-up { animation: fadeInUp 1.5s ease-out forwards; }

@keyframes fadeIn {
  0% { opacity: 0; transform: scale(.95); }
  100% { opacity: 1; transform: scale(1); }
}
.animate-fade-in { animation: fadeIn 1.5s ease-out forwards; }

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(5px); }
}
.fade-out { animation: fadeOut 1.5s ease-in forwards; }

@keyframes fadeInDownScale {
  0% { opacity: 0; transform: translateY(-20px) scale(.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-fade-in-down-scale { animation: fadeInDownScale .5s ease-out forwards; }

/* dacă ai layer de utilities Tailwind */
@layer utilities {
  .fade-in    { animation: fadeIn .5s ease-out forwards; }
  .fade-out   { animation: fadeOut .5s ease-in forwards; }
  .fade-in-up.quick { animation: fadeInUp 1s ease-out forwards; }
}

/* ===== Micro-interactions ===== */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}
.shake,
.fade-warning.shake {
  animation: shake .3s ease-in-out;
}

/* ===== Autofill dark ===== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.1) inset !important;
  -webkit-text-fill-color: #fff !important;
  transition: background-color 2500s ease-in-out 0s;
}



/* ===== Recap lines ===== */
.recap-bullet {
  color: #fff;
  font-size: 1.4em;
  font-weight: 700;
  margin-right: .6em;
  display: inline-block;
  vertical-align: middle;
  text-shadow: 0 0 4px #fff8, 0 1px 0 #2228;
  user-select: none;
  transform: translateY(-4px);
}
@media (max-width: 600px) {
  .recap-bullet { transform: translateY(-1px); }
}
.recap-line {
  padding: .28em 0;
  font-size: 1.07em;
  letter-spacing: .01em;
}

/* ===== Result cards ===== */
@keyframes cardInSmooth {
  0%   { opacity: 0; transform: translateY(28px) scale(.94); filter: blur(2px); }
  60%  { opacity: 1; transform: translateY(0) scale(1.02); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.card-animate-smooth {
  opacity: 0;
  animation: cardInSmooth 2.4s cubic-bezier(.22,.8,.26,.99) forwards;
  will-change: transform, opacity, filter;
}
.card-animate-smooth.delay-0   { animation-delay: 0s; }
.card-animate-smooth.delay-200 { animation-delay: .2s; }
.card-animate-smooth.delay-400 { animation-delay: .4s; }

/* ===== Price explosion ===== */
@keyframes explodeIn {
  0%   { opacity:0; transform:scale(.75) rotate(-180deg); filter:blur(6px); }
  65%  { opacity:1; transform:scale(1.08) rotate(30deg);  filter:blur(0); }
  100% { transform:scale(1) rotate(0); }
}
.price-explosion {
  animation: explodeIn 2.4s cubic-bezier(.25,.8,.25,1) forwards;
}

/* ===== CTA pulse (optional) ===== */
@keyframes ctaPulseColour {
  0% {
    transform: scale(.90);
    background-color: #b91c1c;
    border-color: #1d4ed8;
    color: #000;
  }
  50% {
    transform: scale(1.10);
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
  }
  100% {
    transform: scale(.90);
    background-color: #b91c1c;
    border-color: #1d4ed8;
    color: #000;
  }
}
.booknow-pulse {
  animation: ctaPulseColour 2.4s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, background-color, border-color, color;
}

/* ===== Respectă reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .fade-in-up,
  .fade-out,
  .animate-fade-in-down-scale,
  .card-animate-smooth,
  .price-explosion,
  .booknow-pulse {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Mobile touch fixes ===== */
@media (hover: none), (pointer: coarse) {
  a:hover,
  button:hover {
    transform: none !important;
    filter: none !important;
  }
  .hover\:bg-white\/20:hover,
  .hover\:bg-white\/30:hover {
    background-color: transparent !important;
  }
  .hover\:scale-90:hover,
  .hover\:scale-105:hover,
  .hover\:scale-110:hover {
    transform: none !important;
  }
}

/* ===== ASAP toggle small on mobile ===== */
@media (max-width: 480px) {
  #asap-toggle span.relative {
    height: 22px !important;
    width: 44px !important;
  }
  #asap-toggle .asap-knob {
    height: 18px !important;
    width: 18px !important;
    transform: translateX(2px) !important;
  }
  #asap-toggle[data-active="1"] .asap-knob {
    transform: translateX(22px) !important;
  }
  #asap-toggle span:last-child {
    font-size: .95rem !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }
}

/* ===== iOS zoom/focus fix ===== */
@supports (-webkit-touch-callout: none) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ===== Global tiny polish ===== */
* {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* cards pe mobil puțin mai strânse */
@media (max-width: 480px) {
  .card-animate-smooth { padding: .9rem !important; }
}

/* ===== datetime & toggle layout guard ===== */
#datetime {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
#asap-toggle {
  max-width: 100%;
  contain: layout paint;
}

/* ===== Toggle transitions ===== */
#asap-toggle .asap-knob,
#add-baby-seat .baby-knob {
  transition: transform 200ms ease;
  will-change: transform;
}
#asap-toggle .asap-track,
#add-baby-seat .baby-track {
  transition: background-color 200ms ease;
}
.toggle-off {
  background-color: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
}
.toggle-on {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.glow-sep {
  background: linear-gradient(
    90deg,
    rgba(59,130,246,0) 0%,
    rgba(59,130,246,1) 20%,
    rgba(255,255,255,0.9) 50%,
    rgba(59,130,246,1) 80%,
    rgba(59,130,246,0) 100%
  );
  box-shadow: 0 0 18px rgba(59,130,246,0.35),
              0 0 6px rgba(255,255,255,0.25) inset;
  border-radius: 9999px;
}

/* saved message */
@keyframes savedPulse {
  0%   { opacity: 0; transform: translateY(2px); }
  30%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; }
}
#save-details-msg.show {
  display: block !important;
  animation: savedPulse 2.4s ease-out forwards;
}

/* ===== iOS datetime-local styling ===== */
@supports (-webkit-touch-callout: none) {
  input[type="datetime-local"].dt-ios {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-height: 3.25rem;
    line-height: 1.5rem;
    padding: .75rem 1rem;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: .75rem;
    color: #fff;
    display: block;
  }
  input[type="datetime-local"].dt-ios::-webkit-date-and-time-value {
    min-height: 1.5rem;
  }
  input[type="datetime-local"].dt-ios::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: .85;
  }
}
input[type="datetime-local"].dt-ios,
input[type="datetime-local"].dt-ios::-webkit-datetime-edit,
input[type="datetime-local"].dt-ios::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"].dt-ios::-webkit-datetime-edit-text,
input[type="datetime-local"].dt-ios::-webkit-datetime-edit-month-field,
input[type="datetime-local"].dt-ios::-webkit-datetime-edit-day-field,
input[type="datetime-local"].dt-ios::-webkit-datetime-edit-year-field,
input[type="datetime-local"].dt-ios::-webkit-datetime-edit-hour-field,
input[type="datetime-local"].dt-ios::-webkit-datetime-edit-minute-field {
  font-style: normal;
}
#datetime.dt-ios,
#return-datetime.dt-ios {
  border-radius: .375rem !important;
}

/* ===== Maps 2 columns when return ===== */
#maps-wrapper.return-two-cols {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
#maps-wrapper.return-two-cols > div {
  min-width: 0;
}
@media (max-width: 480px) {
  #map,
  #return-map {
    height: 160px !important;
  }
  #map-heading-outbound,
  #map-heading-return {
    font-size: .7rem;
  }
}

/* destination: /home/ale/p2a/static/css/booking.css */
@media (max-width: 380px) {
  .return-two-col {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .return-two-col .p-3 {
    padding: 0.5rem !important;
  }
}

/* destination: /home/ale/p2a/static/css/booking.css */
#results .return-two-col > div > .rounded-md {
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.04);
}

/* ===== chat panel gets same login glass shadow ===== */


/* Brand chip + beam for #promo-banner (British English comments) */
#promo-banner .promo-chip{
  display:inline-block;
  padding:.15rem .5rem;
  border-radius:9999px;
  font-weight:800;
  background: linear-gradient(90deg, #456eff 0%, #ff2323 100%);
  color:#0b1220; /* deep night blue for contrast */
  box-shadow: 0 0 0 1px rgba(255,255,255,.5) inset, 0 6px 20px rgba(56,189,248,.35);
}

/* subtle animated diagonal beam across the glass card */
#promo-banner .beam{
  position:absolute;
  top:-40%;
  left:-20%;
  width:160%;
  height:200%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: rotate(12deg);
  animation: beamSweep 5.5s ease-in-out infinite;
  filter: blur(2px);
  opacity:.7;
}

@keyframes beamSweep{
  0%   { transform: translateX(-10%) rotate(12deg); opacity:.0; }
  15%  { opacity:.75; }
  50%  { transform: translateX(10%)  rotate(12deg); opacity:.35; }
  85%  { opacity:.75; }
  100% { transform: translateX(30%)  rotate(12deg); opacity:0; }
}


/* ===== Mobile-consistent booking checkboxes ===== */
.booking-consents {
  width: 100%;
}

.booking-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  line-height: 1.45;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.booking-consent-row.hidden {
  display: none !important;
}

.booking-consent-text {
  min-width: 0;
  flex: 1 1 auto;
  padding-top: 0;
}

.booking-consent-checkbox,
#call-me-consent,
#marketing-consent,
#terms-consent,
#local-email-optin {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  flex: 0 0 20px !important;
  margin: 0.22rem 0 0 0 !important;
  cursor: pointer;
  transform: none !important;
}

#call-me-consent { accent-color: #10b981; }
#marketing-consent { accent-color: #16a34a; }
#terms-consent,
#local-email-optin { accent-color: #2563eb; }

@media (max-width: 640px) {
  .booking-consents {
    font-size: 1rem;
  }

  .booking-consent-row {
    gap: 0.95rem;
    line-height: 1.42;
  }

  .booking-consent-checkbox,
  #call-me-consent,
  #marketing-consent,
  #terms-consent,
  #local-email-optin {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    flex-basis: 22px !important;
    margin-top: 0.16rem !important;
  }
}


/* Keep Google Places suggestions above the booking/local glass UI. */
.pac-container {
  z-index: 2147483647 !important;
}
