/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Global Font - Afacad Flux */
html {
  max-width: 100vw;
  overflow-x: hidden;
}

html, body {
  font-family: "Afacad Flux", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Stili per Google PlaceAutocompleteElement (nuova API) */
/* NOTA: Il closed shadow DOM non permette ::part() selectors */
/* Usare solo CSS custom properties ufficiali di Google */
gmp-place-autocomplete {
  --gmpac-color-on-surface: #374151;
  --gmpac-color-outline: #7c3aed; /* violet-600 - bordo viola permanente */
  --gmpac-color-primary: #16a34a;
  --gmpac-color-surface: white;
  --gmpac-border-radius: 0.5rem;

  /* Dimensioni esplicite */
  display: block;
  width: 100%;
  min-height: 42px;
}

/* Stili Google Places per il form venue (tema purple) */
[data-controller="venue-address-autocomplete"] gmp-place-autocomplete {
  --gmpac-color-primary: #9333ea; /* purple-600 */
  --gmpac-border-radius: 0.75rem; /* rounded-xl */
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Scroll indicator - gradient fade on right edge
 * Usage: Wrap scrollable content in a div with class "scroll-fade-indicator"
 * The parent should have overflow: hidden
 */
.scroll-fade-indicator {
  position: relative;
}
.scroll-fade-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 100%;
  background: linear-gradient(to left, white, transparent);
  pointer-events: none;
  z-index: 10;
}

/* Flash message animation */
@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  50% {
    transform: scale(1.02) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.animate-bounce-in {
  animation: bounce-in 0.4s ease-out forwards;
}

/* Bottom Tab Bar (shared across all layouts) */
.tab-bar-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
}
.tab-bar-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  filter: drop-shadow(0 -4px 6px rgba(0, 0, 0, 0.1));
}
.tab-bar-content {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 90px;
  padding: 0 16px 16px;
}
.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #9ca3af;
  transition: color 0.2s;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  touch-action: manipulation;
}
.tab-item.active {
  color: #9333ea;
}
@media (hover: hover) and (pointer: fine) {
  .tab-item:hover {
    color: #a855f7;
  }
}
.tab-item:active {
  color: #a855f7;
}
.tab-fab {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.tab-fab:active {
  transform: translateX(-50%) scale(0.95);
}
.tab-fab.tab-fab-disabled {
  background: #9ca3af;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  cursor: default;
}
