/* Korean Travel Itinerary - Enhanced Design */
/*
 * REFACTORING NOTE: Basic .ktpa-activity-card components now available
 * in components.css. This file focuses on itinerary-specific enhancements.
 *
 * For new implementations, use:
 * - .ktpa-activity-card (components.css) for basic cards
 * - .ktpa-enhanced styles below for advanced itinerary features
 */

/* ===============================
   STICKY DAY NAVIGATION SYSTEM
   =============================== */

/* Sticky positioning for day navigation */
.ktpa-day-nav-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  padding: 0.75rem 1rem;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  margin-bottom: 1rem;
  text-align: center; /* Center align contents */
}

.ktpa-day-nav-sticky.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

/* Enhanced day chips container */
.ktpa-day-chips {
  display: flex;
  justify-content: center; /* Center align chips on desktop */
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  scroll-behavior: smooth;
  padding: 0.25rem 0;
  margin-bottom: 0.75rem; /* More space before context */
  width: 100%; /* Take full width */
}

.ktpa-day-chips::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Desktop: CSS Grid for perfect equal distribution and 100% width utilization */
@media (min-width: 768px) {
  .ktpa-day-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    justify-items: center;
    overflow-x: visible; /* No horizontal scroll on desktop */
    flex-wrap: nowrap; /* Override mobile settings */
  }

  .ktpa-day-chip {
    width: 100%; /* Fill grid cell completely */
    min-width: 80px; /* Readable minimum */
    max-width: none; /* Remove constraint for full distribution */
    flex: none; /* Reset mobile flex settings */
  }
}

/* Enhanced day chip styling */
.ktpa-day-chip {
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  background: var(--surface-secondary, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  transition: all 0.2s ease;
  cursor: pointer;
  min-width: 44px; /* Touch target accessibility */
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
  position: relative;
  overflow: hidden;
}

.ktpa-day-chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.3s ease;
}

.ktpa-day-chip:hover::before {
  left: 100%;
}

.ktpa-day-chip:hover:not(.active) {
  background: var(--surface-tertiary, #f1f5f9);
  border-color: var(--border-medium, #cbd5e1);
  transform: translateY(-1px);
}

.ktpa-day-chip.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.ktpa-day-chip:focus {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

/* Remove any browser default focus styles that might appear red */
.ktpa-day-chip:focus-visible {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

/* Ensure no red browser default focus styles */
.ktpa-day-chip:focus:not(:focus-visible) {
  outline: none;
}

/* Context label styling with enhanced responsive positioning */
.ktpa-day-context {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  margin-top: 0.75rem; /* Consistent spacing below chips */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
  line-height: 1.2;
  transition: all 0.2s ease;
  text-align: center; /* Center align context */
  width: 100%; /* Take full width for centering */
  padding: 0 1rem; /* Prevent edge overflow */
}

.ktpa-day-context.ktpa-context-updated {
  background: rgba(102, 126, 234, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transform: scale(1.02);
}

/* Day panel styling with slide transitions */
.ktpa-day-panel {
  transition: opacity 0.6s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Slide animation for swipe navigation */
.ktpa-day-panel.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}

.ktpa-day-panel.slide-out-right {
  transform: translateX(100%);
  opacity: 0;
}

.ktpa-day-panel.slide-in-left {
  transform: translateX(-100%);
  opacity: 0;
}

.ktpa-day-panel.slide-in-right {
  transform: translateX(100%);
  opacity: 0;
}

.ktpa-day-panel.slide-in-active {
  transform: translateX(0);
  opacity: 1;
}

/* Ensure active panels are ALWAYS visible */
.ktpa-day-panel.ktpa-day-active {
  display: block !important;
}

/* Make hidden panels authoritative (but not for active ones) */
.ktpa-day-panel.hidden:not(.ktpa-day-active) {
  display: none !important;
}

.ktpa-day-panel.ktpa-day-entering {
  opacity: 0;
  transform: translateY(10px);
}

.ktpa-day-panel:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

/* Day panel active state */
.ktpa-day-panel.ktpa-day-active {
  border-left: 4px solid #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.02), rgba(255, 255, 255, 0.05));
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===============================
   RESPONSIVE DESIGN
   =============================== */

/* Mobile optimizations with enhanced horizontal scrolling */
@media (max-width: 767px) {
  .ktpa-day-nav-sticky {
    padding: 0.5rem;
  }

  .ktpa-day-chips {
    display: flex; /* Explicit flex for mobile */
    justify-content: flex-start; /* Left align for scrolling */
    overflow-x: auto; /* Enable horizontal scrolling */
    flex-wrap: nowrap; /* No wrapping on mobile */
    scroll-snap-type: x mandatory; /* Smooth scrolling experience */
    scroll-behavior: smooth;
    gap: 0.75rem; /* Increased gap for better touch targets */
    padding: 0.25rem 0.5rem 0.75rem 0.5rem; /* Side padding for edge chips */
  }

  .ktpa-day-chip {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    min-width: 85px; /* Slightly larger for better touch experience */
    width: auto;
    flex: 0 0 auto; /* Don't shrink, don't grow */
    scroll-snap-align: center; /* Snap to center when scrolling */
    scroll-margin: 0.5rem; /* Smooth snap positioning */
  }

  .ktpa-day-context {
    font-size: 0.8125rem; /* Slightly larger for better readability */
    margin-top: 0.5rem;
  }

  /* Enhanced mobile scrollbar styling for beautiful UX */
  .ktpa-day-chips::-webkit-scrollbar {
    height: 4px;
    display: block;
  }

  .ktpa-day-chips::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    margin: 0 0.5rem; /* Track doesn't extend to edges */
  }

  .ktpa-day-chips::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
  }

  .ktpa-day-chips::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #5a6fd8, #6a42a0);
  }
}

/* Long trip optimizations (7+ days) */
.ktpa-day-nav-sticky.long-trip .ktpa-day-chips {
  padding-right: 3rem; /* Space for dropdown */
}

.ktpa-day-nav-sticky.long-trip .ktpa-day-context {
  font-size: 0.8125rem;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .ktpa-day-chip {
    border-width: 2px;
  }

  .ktpa-day-chip.active {
    border-color: #000;
    color: #000;
    background: #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .ktpa-day-chip,
  .ktpa-day-nav-sticky {
    transition: none;
  }

  .ktpa-day-chips {
    scroll-behavior: auto;
  }

  .ktpa-day-chip::before {
    display: none;
  }

  .ktpa-day-chip:hover {
    transform: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .ktpa-day-nav-sticky {
    background: rgba(26, 32, 44, 0.95);
    border-bottom-color: #2d3748;
  }

  .ktpa-day-chip {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }

  .ktpa-day-chip:hover:not(.active) {
    background: #4a5568;
    border-color: #718096;
  }

  .ktpa-day-context {
    color: #a0aec0;
  }
}

/* Horizontal scrolling layout for airport transfer guides and products */
.ktpa-horizontal-content {
  margin: 20px 0;
}

.ktpa-horizontal-scroll-container {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 16px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.ktpa-horizontal-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.ktpa-horizontal-scroll-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.ktpa-horizontal-scroll-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.ktpa-horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.ktpa-horizontal-section {
  flex-shrink: 0;
  min-width: 300px;
}

.ktpa-horizontal-cards {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0;
  scroll-behavior: smooth;
}

.ktpa-horizontal-card {
  flex-shrink: 0;
  width: 200px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #e2e8f0;
}

.ktpa-horizontal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ktpa-horizontal-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ktpa-horizontal-card .ktpa-card-image {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: #f8fafc;
}

.ktpa-horizontal-card .ktpa-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ktpa-horizontal-card:hover .ktpa-card-image img {
  transform: scale(1.05);
}

.ktpa-horizontal-card .ktpa-card-content {
  padding: 12px 16px;
}

.ktpa-horizontal-card .ktpa-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ktpa-horizontal-card .ktpa-card-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* Base container and typography */
.ktpa-enhanced {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  color: #1a202c;
  line-height: 1.6;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Trip header with Korean aesthetic - Enhanced */
.ktpa-trip-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 28px;
  padding: 40px 32px;
  margin-bottom: 40px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.25);
  position: relative;
  overflow: hidden;
}

.ktpa-trip-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  height: 240px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,20 Q50,10 80,20 Q90,50 80,80 Q50,90 20,80 Q10,50 20,20" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat;
  background-size: contain;
  opacity: 0.6;
}

.ktpa-trip-header h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  letter-spacing: -0.5px;
}

.korean-subtitle {
  font-size: clamp(15px, 2.8vw, 20px);
  opacity: 0.9;
  margin-bottom: 20px;
  font-weight: 300;
}

.ktpa-trip-header p {
  font-size: clamp(17px, 3.2vw, 22px);
  margin: 0 0 24px;
  opacity: 0.95;
  font-weight: 400;
}

/* Trip stats with improved layout */
.ktpa-trip-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 16px;
  margin-top: 24px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.ktpa-trip-stat {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.ktpa-trip-stat:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ktpa-trip-stat .stat-value {
  display: block;
  font-weight: 800;
  font-size: clamp(20px, 3.5vw, 28px);
  margin-bottom: 6px;
  color: #ffc700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ktpa-trip-stat .stat-label {
  font-size: 13px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
  font-weight: 600;
}

.ktpa-trip-stat .korean-label {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 400;
}

/* Day navigation with enhanced Korean colors */
.ktpa-day-nav {
  display: flex;  
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ktpa-day-btn {
  border: 2px solid #cbd5e0;
  background: #ffffff;
  border-radius: 20px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  text-align: center;
  flex: 1;
  min-width: 120px;
  color: #4a5568;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.ktpa-day-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s;
}

.ktpa-day-btn:hover::before {
  left: 100%;
}

.ktpa-day-btn:hover {
  border-color: #667eea;
  background: #f0f4ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.ktpa-day-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.ktpa-day-btn .day-number {
  font-weight: 700;
  margin-right: 8px;
  font-size: 16px;
}

/* Day sections with improved spacing and hierarchy */
.ktpa-day {
  margin-bottom: 48px;
  border-radius: 28px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  background: white;
  transition: all 0.3s ease;
}

.ktpa-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

.ktpa-day.hidden {
  display: none;
}

.ktpa-day-header {
  padding: 32px 32px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ktpa-day-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  opacity: 0.8;
}

.ktpa-day-title {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: #1a202c;
  letter-spacing: -0.5px;
  display: block;
  width: 100%;
}

.ktpa-day-area {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  align-self: center;
}

.ktpa-day-route {
  color: #6366f1;
  font-size: clamp(14px, 2.5vw, 16px);
  margin: 0;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  padding: 8px 12px;
  border-radius: 12px;
  border-left: 3px solid #6366f1;
  display: block;
  width: 100%;
}

.ktpa-day-date {
  color: #64748b;
  font-size: clamp(14px, 2.5vw, 16px);
  margin: 0;
  font-weight: 500;
  display: block;
  width: 100%;
}

/* Activity cards with responsive grid - Enhanced */
.ktpa-activity-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px;
}

@media (min-width: 768px) {
  .ktpa-activity-cards {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 28px;
    padding: 40px;
  }
}

@media (min-width: 1200px) {
  .ktpa-activity-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 48px;
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Enhanced activity cards with better contrast */
.ktpa-activity-card {
  background: #2d3748;
  border: 1px solid #4a5568;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Allow overflow when hotel card inside is expanded (class-based for better compatibility) */
.ktpa-activity-card.ktpa-hotel-expanded {
  overflow: visible !important;
}

.ktpa-activity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
  .ktpa-activity-card {
    padding: 32px;
  }
}

@media (min-width: 1200px) {
  .ktpa-activity-card {
    padding: 36px;
    min-height: 300px;
  }
}

.ktpa-activity-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  border-color: #667eea;
}

.ktpa-activity-card:hover::before {
  opacity: 1;
}

.ktpa-activity-header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  align-items: flex-start;
}

.ktpa-activity-image {
  width: 140px;
  height: 105px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  order: 1; /* Between time and content */
}

/* Desktop: Stack image and time box vertically with gap */
.ktpa-activity-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 140px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .ktpa-activity-header {
    gap: 28px;
    margin-bottom: 28px;
  }
}

.ktpa-activity-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  min-width: 140px;
  padding: 12px;
  line-height: 16px;
  background: #4a5568;
  border-radius: 10px;
  border: 1px solid #2d3748;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ktpa-time {
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  margin-bottom: 4px;
}

.ktpa-duration {
  font-size: 11px;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.ktpa-activity-content {
  flex: 1;
}

.ktpa-activity-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .ktpa-activity-title {
    font-size: 24px;
    margin-bottom: 18px;
  }
}

@media (min-width: 1200px) {
  .ktpa-activity-title {
    font-size: 26px;
    margin-bottom: 20px;
  }
}

/* Booking badge - Base styles */
.ktpa-booking-badge {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  pointer-events: auto;
}

.ktpa-booking-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ktpa-booking-required {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.ktpa-booking-required:hover {
  background: linear-gradient(135deg, #ff5252 0%, #e04858 100%);
}

.ktpa-booking-recommended {
  background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.ktpa-booking-recommended:hover {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

/* Desktop badge position - right-aligned */
.ktpa-badge-desktop-position {
  display: inline-block;
  margin-left: auto;
  pointer-events: none;
}

/* Mobile badge position - hide by default */
.ktpa-badge-mobile-position {
  display: none;
}

/* Mobile layout: Show mobile badge, hide desktop badge */
@media (max-width: 768px) {
  /* Hide desktop badge */
  .ktpa-badge-desktop-position {
    display: none;
  }

  /* Show and position mobile badge */
  .ktpa-badge-mobile-position {
    display: block;
    position: absolute;
    top: 0;
    left: 182px;
    z-index: 10;
    pointer-events: none;
  }

  /* Make header relative for absolute positioning */
  .ktpa-activity-header {
    position: relative;
  }

  /* Mobile badge sizing */
  .ktpa-badge-mobile-position .ktpa-booking-badge {
    font-size: 11px;
    padding: 6px 8px;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
    max-width: 80px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
  .ktpa-badge-mobile-position .ktpa-booking-badge {
    font-size: 10px;
    padding: 5px 7px;
    max-width: 72px;
  }
}

/* Very small devices */
@media (max-width: 360px) {
  .ktpa-badge-mobile-position .ktpa-booking-badge {
    font-size: 9px;
    padding: 4px 6px;
    max-width: 68px;
  }
}

/* Activity details with improved styling */
.ktpa-activity-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.ktpa-activity-cost {
  background: #48bb78;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.ktpa-activity-cost.expensive {
  background: #f56565;
  box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

/* Activity information styling */
.ktpa-activity-location,
.ktpa-activity-contact {
  color: #a0aec0;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ktpa-metro-info {
  color: #667eea;
  font-weight: 500;
  font-size: 13px;
}

.ktpa-activity-hours {
  color: #a0aec0;
  font-size: 13px;
  margin-top: 6px;
  margin-bottom: 0;
  display: block;
}

.ktpa-traveler-tip {
  background: #2b6cb0;
  color: white;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 12px;
  border-left: 4px solid #3182ce;
  box-shadow: 0 4px 12px rgba(43, 108, 176, 0.2);
}

.ktpa-activity-description {
  margin-top: 8px;
  margin-bottom: 0;
  color: #cbd5e0;
  font-size: 14px;
  line-height: 1.6;
}

/* Expandable content functionality */
.ktpa-expand-chevron {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  margin-top: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.ktpa-expand-chevron:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Chevron icon - ONLY for activity cards in itinerary */
.ktpa-activity-card .ktpa-chevron-icon {
  font-size: 14px;
  color: #F87B1B;
  transition: all 0.3s ease;
  user-select: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ktpa-activity-card.expanded .ktpa-chevron-icon {
  color: #4f46e5;
}

.ktpa-activity-card.expanded .ktpa-chevron-icon::before {
  content: "Less Info ▲";
}

.ktpa-chevron-icon::before {
  content: "More Info ▼";
}

.ktpa-expanded-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 28px;
}

.ktpa-activity-card.expanded .ktpa-expanded-content {
  max-height: none;
  padding: 20px 28px;
}

.ktpa-detail-item {
  color: #cbd5e0;
  font-size: 14px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #667eea;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  /* Fix text truncation */
  width: 100%;
  max-width: 100%;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
}

.ktpa-detail-item strong {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Specific styling for tips and insider items */
.ktpa-tip-item {
  border-left-color: #48bb78; /* green for tips */
  background: rgba(72, 187, 120, 0.08);
}

.ktpa-insider-item {
  border-left-color: #f6ad55; /* orange for insider info */
  background: rgba(246, 173, 85, 0.08);
}

.ktpa-related-content {
  margin-top: 8px;
  padding-top: 0;
  margin-bottom: 8px; /* Add space before expand chevron */
}

/* Related content styling for dark itinerary cards using experience card structure */
.ktpa-activity-card .ktpa-related-content-row {
  margin-top: 8px;
  padding-top: 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
}

.ktpa-activity-card .ktpa-related-guides-wrap {
  flex: none;
  width: auto;
  display: inline-block;
}

.ktpa-activity-card .ktpa-related-products-wrap {
  flex: none;
  width: auto;
  display: inline-block;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.2); /* Adapted for dark theme */
  position: relative;
}

/* Dark theme overrides for guide and product content */
.ktpa-activity-card .ktpa-related-guides-wrap .ktpa-guide-item,
.ktpa-activity-card .ktpa-related-products-wrap .ktpa-product-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

.ktpa-activity-card .ktpa-related-guides-wrap a,
.ktpa-activity-card .ktpa-related-products-wrap a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.85em;
  transition: color 0.2s ease;
}

.ktpa-activity-card .ktpa-related-guides-wrap a:hover,
.ktpa-activity-card .ktpa-related-products-wrap a:hover {
  color: #667eea;
}

.ktpa-activity-card .no-guides,
.ktpa-activity-card .no-products {
  color: #a0aec0;
  font-size: 0.8em;
  font-style: italic;
}

.ktpa-activity-card .ktpa-skel {
  color: #a0aec0;
  font-size: 0.8em;
}

/* Reduce gap between product title and price in related content */
.ktpa-activity-card .ktpa-card-price {
  margin-top: 8px !important;
  padding: 8px 0 12px 0 !important;
}

/* Reduce overall card height but allow space for proper price padding */
.ktpa-activity-card .ktpa-card {
  height: 215px !important;
}

.ktpa-insider-guides,
.ktpa-book-activities {
  margin-bottom: 12px;
}

/* Transfers with enhanced styling */
.ktpa-transfer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 32px;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ktpa-transfer-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ktpa-transfer-info {
  flex: 1;
  font-weight: 600;
  color: #2d3748;
  font-size: 15px;
}

/* Trip totals with enhanced styling */
.ktpa-trip-totals {
  border-top: 2px dashed #e2e8f0;
  margin-top: 40px;
  padding: 32px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 0 0 28px 28px;
}

.ktpa-trip-totals h3 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
  text-align: center;
}

.ktpa-totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.ktpa-total-stat {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 24px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.ktpa-total-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ktpa-total-stat-value {
  font-weight: 800;
  font-size: 28px;
  color: #2d3748;
  display: block;
  margin-bottom: 6px;
}

.ktpa-total-stat-label {
  font-size: 13px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

/* Responsive design improvements */
@media (max-width: 767px) {
  .ktpa-enhanced {
    padding: 0 12px;
  }
  
  .ktpa-trip-header {
    padding: 32px 24px;
    margin-bottom: 32px;
    border-radius: 24px;
  }
  
  .ktpa-day-nav {
    padding: 16px;
    gap: 8px;
  }
  
  .ktpa-day-btn {
    padding: 12px 16px;
    min-width: 100px;
  }
  
  .ktpa-day-header {
    padding: 24px 20px 16px;
  }
  
  .ktpa-activity-cards {
    padding: 20px;
    gap: 20px;
  }
  
  .ktpa-activity-card {
    padding: 20px;
  }
  
  .ktpa-activity-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  /* Make visual container horizontal - image and time in a row */
  .ktpa-activity-card .ktpa-activity-visual {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px;
    align-items: center;
    width: 100%;
  }
  
  .ktpa-activity-image {
    width: 60%;
    height: 90px;
    flex-shrink: 0;
    border-radius: 12px;
    object-fit: cover;
  }
  
  .ktpa-activity-time {
    flex: 1;
    min-height: 90px;
    flex-shrink: 0;
    flex-direction: column;
    padding: 12px 16px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  }
  
  .ktpa-time {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    margin-right: 0;
  }

  .ktpa-duration {
    font-size: 11px;
    font-weight: 500;
  }
  
  /* Content takes full width below the visual row */
  .ktpa-activity-content {
    width: 100%;
  }
  
  .ktpa-transfer {
    margin: 16px 20px;
    padding: 16px;
  }
  
  .ktpa-trip-totals {
    padding: 24px 20px;
  }
  
  .ktpa-totals-grid {
    gap: 16px;
  }
  
  /* Mobile expandable content adjustments */
  .ktpa-expanded-content {
    padding: 0 20px;
  }
  
  .ktpa-activity-card.expanded .ktpa-expanded-content {
    padding: 16px 0;
  }
  
  .ktpa-expand-chevron {
    padding: 10px;
    margin-top: 12px;
  }
  
  /* Mobile unified horizontal scroll for itinerary related content */
  .ktpa-activity-card .ktpa-related-content-row {
    display: block !important; /* Reset flex layout */
    position: relative;
  }
  
  .ktpa-related-guides-wrap .ktpa-related-guides {
    width: min-content;
    margin-right: 18px;
  }

  /* Remove default spacing and borders for mobile */
  .ktpa-activity-card .ktpa-related-guides-wrap,
  .ktpa-activity-card .ktpa-related-products-wrap {
    padding-left: 0;
    margin-left: 0;
    margin-top: 0;
    border-left: none;
    width: auto;
  }
  
  /* Create headings row - side by side at the top */
  .ktpa-activity-card .ktpa-related-guides strong,
  .ktpa-activity-card .ktpa-related-products strong {
    display: inline-block !important;
    float: left;
    width: auto;
    margin-bottom: 8px;
    margin-right: 16px;
    white-space: nowrap;
    font-weight: 600;
    color: #cbd5e0; /* Match itinerary dark theme */
  }
  
  .ktpa-activity-card .ktpa-related-products strong {
    margin-right: 0; /* No right margin for last heading */
  }
  
  /* Clear float after headings and create unified scroll container */
  .ktpa-activity-card .ktpa-related-content-row::after {
    content: "";
    display: block;
    clear: both;
  }
  
  /* Unified card container - all cards flow together */
  .ktpa-activity-card .ktpa-card-grid {
    display: inline-flex !important;
    flex-direction: row;
    gap: 12px;
    vertical-align: top;
    white-space: nowrap;
  }
  
  /* Create the scrollable container by making the whole row scrollable */
  .ktpa-activity-card .ktpa-related-content-row {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    white-space: nowrap; /* Prevent wrapping of inline elements */
  }
  
  /* Individual cards */
  .ktpa-activity-card .ktpa-card {
    flex: 0 0 160px !important;
    scroll-snap-align: start;
    display: flex !important;
    width: 160px;
    min-width: 160px;
    white-space: normal; /* Allow text wrapping inside cards */
  }
  
  /* Ensure the wrappers don't break the horizontal flow */
  .ktpa-activity-card .ktpa-related-guides-wrap,
  .ktpa-activity-card .ktpa-related-products-wrap {
    display: inline-block !important;
    vertical-align: top;
    white-space: nowrap;
  }
  
  /* Reset white-space for the inner content containers */
  .ktpa-activity-card .ktpa-related-guides,
  .ktpa-activity-card .ktpa-related-products {
    white-space: normal;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .ktpa-enhanced {
    color: #e2e8f0;
  }
  
  .ktpa-day {
    background: #1a202c;
    border-color: #2d3748;
  }
  
  .ktpa-activity-card {
    background: #2d3748;
    border-color: #4a5568;
  }
  
  .ktpa-activity-time {
    background: #4a5568;
    border-color: #2d3748;
  }
}

/* Loading states and animations */
.ktpa-enhanced .loading {
  opacity: 0.6;
  pointer-events: none;
}

.ktpa-activity-card.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* Print styles */
@media print {
  .ktpa-enhanced {
    color: black;
    background: white;
  }
  
  .ktpa-trip-header {
    background: white;
    color: black;
    border: 2px solid black;
  }
  
  .ktpa-day {
    break-inside: avoid;
    margin-bottom: 30px;
  }
  
  .ktpa-activity-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid black;
    background: white;
    color: black;
  }
}

/* Accessibility improvements */
.ktpa-day-btn:focus,
.ktpa-activity-card:focus {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ktpa-activity-card,
  .ktpa-day-btn,
  .ktpa-trip-stat,
  .ktpa-transfer {
    transition: none;
  }
  
  .ktpa-activity-card:hover,
  .ktpa-day:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .ktpa-trip-header {
    border: 3px solid white;
  }
  
  .ktpa-activity-card {
    border: 2px solid #667eea;
  }
  
  .ktpa-day-btn.active {
    border: 3px solid white;
  }
}
/* Lazy load related content placeholder */
.ktpa-related-placeholder {
  color: #a0aec0;
  font-size: 0.8em;
  font-style: italic;
  padding: 12px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px dashed rgba(160, 174, 192, 0.3);
}

/* ===============================
   CHEVRON DAY NAVIGATION
   =============================== */

/* Desktop chevron navigation buttons */
.ktpa-nav-chevron {
  /* Positioning */
  position: fixed;
  top: 50vh;
  transform: translateY(-50%);
  z-index: 99;

  /* Sizing - touch-friendly */
  width: 48px;
  height: 48px;
  min-width: 48px;

  /* Appearance */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;

  /* Transitions */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
}

/* Show chevrons when scrolled to itinerary */
.ktpa-nav-chevron.visible {
  opacity: 1;
  visibility: visible;
}

/* Smart positioning based on container width */
.ktpa-nav-prev {
  left: max(20px, calc((100vw - 1200px) / 2 - 70px));
}

.ktpa-nav-next {
  right: max(20px, calc((100vw - 1200px) / 2 - 70px));
}

/* Chevron icon styling - ONLY for navigation SVG chevrons */
.ktpa-nav-chevron .ktpa-chevron-icon {
  width: 24px;
  height: 24px;
  stroke: #667eea;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s ease;
}

/* Hover state */
.ktpa-nav-chevron:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
  transform: translateY(-50%) scale(1.08);
}

.ktpa-nav-chevron:hover .ktpa-chevron-icon {
  stroke: #5568d3;
}

/* Active state */
.ktpa-nav-chevron:active {
  transform: translateY(-50%) scale(0.95);
}

/* Focus state (accessibility) */
.ktpa-nav-chevron:focus {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 3px;
}

.ktpa-nav-chevron:focus:not(:focus-visible) {
  outline: none;
}

.ktpa-nav-chevron:focus-visible {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 3px;
}

/* Disabled state (at boundaries) */
.ktpa-nav-chevron[aria-disabled="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .ktpa-nav-chevron {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(102, 126, 234, 0.3);
  }

  .ktpa-chevron-icon {
    stroke: #a5b4fc;
  }

  .ktpa-nav-chevron:hover {
    background: rgba(45, 55, 72, 1);
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .ktpa-nav-chevron {
    border-width: 2px;
    border-color: #667eea;
  }

  .ktpa-chevron-icon {
    stroke-width: 3;
  }
}

/* Hide on tablet and mobile */
@media (max-width: 1023px) {
  .ktpa-nav-chevron {
    display: none;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .ktpa-nav-chevron {
    transition: none;
  }

  .ktpa-nav-chevron:hover {
    transform: translateY(-50%);
  }
}

/* ===============================
   EDITABLE ITINERARY CONTROLS
   =============================== */

/* Action Menu Trigger (⋮ button) */
.ktpa-action-menu-trigger {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid #fff;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  transition: all 0.2s ease;
  z-index: 20;
  padding: 0;
}

.ktpa-action-menu-trigger:hover {
  background: rgba(102, 126, 234, 0.15);
  border-color: #5a67d8;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
  color: #5a67d8;
}

.ktpa-action-menu-trigger:active {
  transform: scale(0.95);
}

/* Action Menu Dropdown */
.ktpa-action-menu-dropdown {
  position: absolute;
  top: 48px;
  right: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 20;
  overflow: hidden;
}

.ktpa-action-menu-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Menu Options */
.ktpa-menu-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: white;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
  text-align: left;
  transition: background 0.15s ease;
}

.ktpa-menu-option:last-child {
  border-bottom: none;
}

.ktpa-menu-option:hover {
  background: #f8fafc;
  color: #1e293b;
}

.ktpa-menu-option:active {
  background: #f1f5f9;
  color: #1e293b;
}

.ktpa-menu-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* Remove option - red on hover */
.ktpa-menu-remove:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* Inline Time Editing */
.ktpa-time-editable {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.ktpa-time-editable:hover {
  background: rgba(255, 255, 255, 0.1);
  outline: 1px dashed rgba(255, 255, 255, 0.3);
}

.ktpa-time-editable.editing {
  background: white;
  padding: 0;
}

.ktpa-time-input-inline {
  width: 100%;
  max-width: 120px;
  padding: 4px 8px;
  border: 2px solid #667eea;
  border-radius: 4px;
  font-size: inherit;
  font-weight: inherit;
  color: #1e293b;
  background: white;
  outline: none;
  font-family: inherit;
}

.ktpa-time-input-inline:focus {
  border-color: #5a67d8;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive adjustments for action menu */
@media (max-width: 768px) {

  .ktpa-action-menu-dropdown {
    right: 8px;
    top: 40px;
  }

  .ktpa-menu-option {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Mobile layout - image larger, time box smaller to avoid edit button overlap */
  .ktpa-activity-card .ktpa-activity-visual {
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 8px !important;
  }

  .ktpa-activity-card .ktpa-activity-image {
    width: 160px !important;
    height: 90px !important;
    flex-shrink: 0;
    object-fit: cover !important;
  }

  .ktpa-activity-card .ktpa-activity-time {
    width: 110px !important;
    min-width: 110px !important;
    min-height: 75px !important;
    flex-shrink: 0;
    padding: 8px !important;
  }

  /* Adjust font sizes for smaller time box */
  .ktpa-activity-card .ktpa-time {
    font-size: 14px !important;
    margin-bottom: 2px !important;
  }

  .ktpa-activity-card .ktpa-duration {
    font-size: 10px !important;
  }

  /* Mobile edit menu - match sample design */
  .ktpa-action-menu-trigger {
    top: 0;
    right: 0;
    width: 28px;
    height: 24px;
    font-size: 18px;
    background: rgba(102, 126, 234, 0.12) !important;
    border: 1.5px solid rgba(102, 126, 234, 0.4) !important;
  }

  .ktpa-action-menu-dropdown {
    min-width: 180px;
  }
}

/* ===============================
   INLINE EDITING & CUSTOM CARDS
   =============================== */

/* Editable field indicator */
.ktpa-editable-field {
  cursor: text;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
  min-height: 1.5em;
  width: 95%;
  /* Brighter placeholder color for better visibility */
  color: #cbd5e0;
  /* Add subtle border to indicate editability */
  border: 1px dashed rgba(203, 213, 224, 0.3);
}

/* Keep title field fixed height during editing */
.ktpa-activity-title.ktpa-editable-field {
  display: block;
  overflow: hidden;
}

.ktpa-activity-title.ktpa-editable-field.editing {
  background-color: rgba(102, 126, 234, 0.05);
  border-radius: 6px;
}

.ktpa-activity-title .ktpa-inline-input {
  font-size: 1.1em;
  font-weight: 600;
  padding: 4px 8px;
  min-height: 28px;
  border: 1px solid rgba(102, 126, 234, 0.4);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.08);
}

.ktpa-editable-field:hover:not(.editing) {
  background-color: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.5);
  outline: 1px solid rgba(102, 126, 234, 0.4);
  /* Brighter text on hover to show it's interactive */
  color: #e2e8f0;
}

.ktpa-editable-field:hover::after {
  opacity: 1;
}

.ktpa-editable-field.editing::after {
  display: none;
}

/* Inline input styling */
.ktpa-inline-input {
  width: 100%;
  padding: 6px 10px;
  font-size: inherit;
  font-family: inherit;
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
  resize: vertical;
  line-height: 1.5;
  transition: all 0.2s ease;
}

.ktpa-inline-input:focus {
  border-color: var(--primary-hover, #5568d3);
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}

.ktpa-inline-input::placeholder {
  color: #94a3b8;
  font-style: italic;
}

/* Custom activity card styling */
.ktpa-custom-activity {
  border-left: 4px solid var(--accent-color, #10b981);
  /* Match default activity card background for consistency */
  background: #2d3748;
  /* Add subtle green accent overlay to distinguish custom cards */
  box-shadow: inset 4px 0 0 0 var(--accent-color, #10b981),
              0 4px 16px rgba(0, 0, 0, 0.12);
}

.ktpa-custom-activity::before {
  content: 'CUSTOM';
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  background: var(--accent-color, #10b981);
  color: white;
  border-radius: 3px;
  z-index: 1;
}

/* Time editable indicator (existing pattern) */
.ktpa-time-editable {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  font-size: 1.1em;
  font-weight: 600;
}

.ktpa-time-editable:hover:not(.editing) {
  background-color: rgba(102, 126, 234, 0.1);
  transform: scale(1.05);
}

.ktpa-time-editable.editing {
  background-color: white;
  border: 2px solid var(--primary-color, #667eea);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
  font-size: 0.9em;
}

.ktpa-time-input-inline {
  width: 100%;
  padding: 4px 8px;
  font-size: 0.9em;
  font-family: inherit;
  font-weight: inherit;
  border: none;
  background: transparent;
  outline: none;
  text-align: center;
}

/* Duration text styling */
.ktpa-duration {
  font-size: 0.75em;
  opacity: 0.9;
  cursor: text;
  color: #cbd5e0;
}

.ktpa-duration.ktpa-editable-field {
  min-height: auto;
  padding: 2px 4px;
  width: auto;
  display: inline-block;
  /* Make duration placeholder more visible */
  font-style: italic;
  border: 1px dashed rgba(102, 126, 234, 0.4);
}

.ktpa-duration.ktpa-editable-field:hover:not(.editing) {
  color: #e2e8f0;
  border-color: rgba(102, 126, 234, 0.6);
  background-color: rgba(102, 126, 234, 0.1);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {

  .ktpa-inline-input {
    padding: 8px;
    font-size: 14px;
  }

  .ktpa-custom-activity::before {
    font-size: 9px;
    padding: 2px 5px;
  }
}

/* ====================================================================
   ACTIVITY NOTE FEATURE
   Inline note editing styles
   ==================================================================== */

/* Note editor container */
.ktpa-note-editor-container {
  margin: 12px 0;
  animation: ktpa-note-slide-in 0.2s ease-out;
}

@keyframes ktpa-note-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Note editor card */
.ktpa-note-editor {
  background: #f8fafc;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  padding: 12px;
}

/* Textarea */
.ktpa-note-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ktpa-note-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ktpa-note-textarea::placeholder {
  color: #9ca3af;
}

/* Editor footer */
.ktpa-note-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* Character counter */
.ktpa-note-counter {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
}

/* Action buttons */
.ktpa-note-actions {
  display: flex;
  gap: 8px;
}

.ktpa-note-cancel,
.ktpa-note-save {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.ktpa-note-cancel {
  background: #e5e7eb;
  color: #374151;
}

.ktpa-note-cancel:hover {
  background: #d1d5db;
}

.ktpa-note-save {
  background: #3b82f6;
  color: white;
}

.ktpa-note-save:hover {
  background: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.ktpa-note-save:active {
  transform: translateY(1px);
}

/* Existing note (traveler tip) - slight enhancement */
.ktpa-traveler-tip {
  position: relative;
  cursor: default;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .ktpa-note-editor-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .ktpa-note-counter {
    text-align: center;
  }

  .ktpa-note-actions {
    width: 100%;
  }

  .ktpa-note-cancel,
  .ktpa-note-save {
    flex: 1;
  }
}
