/* Navis Tour Finder - Custom Styles */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Body */
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Form elements focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button hover effects */
button {
  transition: all 0.2s ease-in-out;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Card hover effects */
.hover\:shadow-lg:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Modal backdrop animation */
#tour-modal {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#tour-modal > div > div {
  animation: slideUp 0.3s ease-out;
}

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

/* Progress bar animation */
#progress-bar {
  transition: width 0.5s ease-in-out;
}

/* Tour card image loading state */
.bg-gray-200 {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Badge styles */
.bg-green-100 {
  background-color: #d1fae5;
}

.text-green-800 {
  color: #065f46;
}

.bg-red-100 {
  background-color: #fee2e2;
}

.text-red-800 {
  color: #991b1b;
}

.bg-blue-100 {
  background-color: #dbeafe;
}

.text-blue-800 {
  color: #1e40af;
}

/* Stars styling */
.text-yellow-500 {
  color: #f59e0b;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  /* Sticky sidebar on mobile becomes static */
  .sticky {
    position: static !important;
  }
  
  /* Adjust padding for mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Full width buttons on mobile */
  button {
    width: 100%;
  }
  
  /* Modal adjustments for mobile */
  #tour-modal > div > div {
    margin: 1rem;
    max-height: 95vh;
  }
}

/* Print styles */
@media print {
  header,
  #search-form-container,
  button {
    display: none;
  }
  
  #results-container {
    width: 100%;
  }
  
  .shadow-md,
  .shadow-lg {
    box-shadow: none !important;
  }
}

/* Additional filters animation */
#additional-filters {
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

#additional-filters.hidden {
  max-height: 0;
  opacity: 0;
}

#additional-filters:not(.hidden) {
  max-height: 1000px;
  opacity: 1;
}

/* Loading spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Tooltip styles (optional) */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 100;
  margin-bottom: 0.5rem;
}

/* Empty state styles */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state i {
  font-size: 4rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

/* Price highlight */
.price-highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Image lazy loading placeholder */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode */
  /*
  body {
    background-color: #1a202c;
    color: #e2e8f0;
  }
  
  .bg-white {
    background-color: #2d3748 !important;
  }
  
  .text-gray-800 {
    color: #e2e8f0 !important;
  }
  */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  button,
  input,
  select {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Text clamp utility for hotel description */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== PREMIUM MODAL STYLES ===== */

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease-in-out;
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.badge-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.badge-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.badge-yellow {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.badge-purple {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.3);
}

.badge-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Image Carousel */
.carousel-image {
  transition: opacity 0.5s ease-in-out;
  object-fit: cover;
}

.carousel-dot {
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.carousel-dot:hover {
  transform: scale(1.2);
}

/* Carousel Controls */
button[onclick^="nextImage"],
button[onclick^="previousImage"] {
  transition: all 0.2s ease-in-out;
  backdrop-filter: blur(4px);
}

button[onclick^="nextImage"]:hover,
button[onclick^="previousImage"]:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Gradient Overlays */
.gradient-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
}

/* Price Structure Box */
.bg-gradient-to-r {
  animation: shimmer 3s ease-in-out infinite;
  background-size: 200% 100%;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Smooth height transitions */
.transition-height {
  transition: height 0.3s ease-in-out;
}

/* Tour details grid */
@media (min-width: 768px) {
  .tour-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
  }
}

/* Sticky booking button */
.sticky-booking {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0.95) 100%);
  backdrop-filter: blur(10px);
}

/* Flight card animations */
.flight-card {
  transition: all 0.2s ease-in-out;
}

.flight-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Included/Excluded items */
.included-item {
  transition: all 0.2s ease-in-out;
}

.included-item:hover {
  transform: translateX(4px);
}

/* Modal content scrollbar */
#modal-content::-webkit-scrollbar {
  width: 6px;
}

#modal-content::-webkit-scrollbar-track {
  background: #f9fafb;
  border-radius: 3px;
}

#modal-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

#modal-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ===== PHOTO CAROUSEL STYLES ===== */

/* Carousel container */
.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Carousel slides */
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Carousel navigation buttons */
.carousel-nav {
  transition: all 0.2s ease-in-out;
  backdrop-filter: blur(4px);
}

.carousel-nav:hover {
  background: rgba(0, 0, 0, 0.7) !important;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Carousel dots */
.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid white;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: white;
  width: 14px;
  height: 14px;
}

/* Responsive adjustments for premium modal */
@media (max-width: 768px) {
  .badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
  }
  
  #carousel-container {
    height: 16rem !important;
  }
  
  .tour-details-grid {
    grid-template-columns: 1fr;
  }
  
  /* Smaller carousel nav on mobile */
  .carousel-nav {
    width: 2rem;
    height: 2rem;
  }
  
  .carousel-dot {
    width: 8px;
    height: 8px;
  }
  
  .carousel-dot.active {
    width: 10px;
    height: 10px;
  }
}
