/* Island Concierge - Caribbean Luxury Theme */

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slowZoom {
  0% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1.15);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes goldShimmer {
  0% {
    box-shadow: 0 4px 20px rgba(200, 168, 90, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(200, 168, 90, 0.6), 0 0 20px rgba(200, 168, 90, 0.3);
  }
  100% {
    box-shadow: 0 4px 20px rgba(200, 168, 90, 0.4);
  }
}

@keyframes bounce-slow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

.animate-fadeInDown {
  animation: fadeInDown 0.8s ease-out;
}

.animate-slideUp {
  animation: slideUp 0.6s ease-out 0.2s both;
}

.animate-slowZoom {
  animation: slowZoom 20s ease-in-out infinite alternate;
}

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

.animate-goldShimmer {
  animation: goldShimmer 2s ease-in-out infinite;
}

.animate-bounce-slow {
  animation: bounce-slow 3s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(200, 168, 90, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 168, 90, 0.7);
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Navigation Items */
.nav-item {
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
  color: #C8A85A;
  text-shadow: 0 0 10px rgba(200, 168, 90, 0.5);
}

.nav-item.active i {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(200, 168, 90, 0.6));
}

/* Filter Buttons */
.filter-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.filter-btn:hover {
  background: rgba(200, 168, 90, 0.2);
  color: #C8A85A;
  border-color: #C8A85A;
}

.filter-btn.active {
  background: #C8A85A;
  color: #021B33;
  border-color: #C8A85A;
  font-weight: 600;
}

/* Activity Cards */
.activity-card {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.activity-card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.activity-card:active {
  transform: scale(0.98);
}

/* Activity Items (Grouped List) */
.activity-item {
  transition: all 0.2s ease;
}

.activity-item:active {
  transform: scale(0.99);
}

/* Quick Chips */
.quick-chip {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-chip:active {
  transform: scale(0.95);
}

/* Chat Container Scrolling */
#chatContainer {
  scroll-behavior: smooth;
}

/* Input Focus States */
input:focus {
  box-shadow: 0 0 0 3px rgba(200, 168, 90, 0.2);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .font-display {
    font-size: 1.5rem;
  }
}

/* Prevent text selection on interactive elements */
button, .activity-card, .activity-item, .quick-chip, .nav-item {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Modal Backdrop Blur */
#activityModal {
  backdrop-filter: blur(8px);
}

/* Smooth Transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Caribbean Gradient Backgrounds */
.gradient-caribbean {
  background: linear-gradient(135deg, #0A938C 0%, #021B33 100%);
}

.gradient-gold {
  background: linear-gradient(135deg, #C8A85A 0%, #9B7E3F 100%);
}

/* Text Shadows for Better Readability */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Card Hover Effects */
@media (hover: hover) {
  .activity-card:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
  }
  
  .activity-card img {
    transition: transform 0.3s ease;
  }
}

/* Prevent Layout Shift */
img {
  display: block;
}

/* Safe Area for Mobile Devices */
@supports (padding: env(safe-area-inset-bottom)) {
  nav {
    padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
  }
}

/* Chat Container Bottom Padding - for fixed input and chips */
#chatContainer {
  padding-bottom: 140px !important;
}

/* Ensure Bottom Nav is Always on Top */
nav {
  z-index: 9999 !important;
}

/* Input Area - Fixed positioning handled inline now */

/* Prevent iOS Safari from zooming on input focus */
input[type="text"] {
  font-size: 16px !important;
}

/* Fix for mobile browser bottom bars */
@supports (-webkit-touch-callout: none) {
  /* iOS specific fixes */
  #chatContainer {
    padding-bottom: 240px !important;
  }
}

/* Android-specific fixes for keyboard */
@media screen and (max-width: 640px) {
  /* When keyboard is open, adjust layout */
  body.keyboard-open #chatContainer {
    padding-bottom: 150px !important;
  }
  
  body.keyboard-open .flex-shrink-0:has(#chatForm) {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }
  
  body.keyboard-open nav {
    display: none;
  }
}
