/* ===== KTPA Modals ===== */

/* === FULL-SCREEN LOADING OVERLAY === */
.ktpa-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ktpa-loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ktpa-loading-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.ktpa-loading-card {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  border: 2px solid #e0e0e0;
}

.ktpa-loading-overlay.active .ktpa-loading-card {
  transform: scale(1) translateY(0);
}

/* Modern header with cybernetic design */
.ktpa-loading-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
  color: #f8fafc;
  padding: 3rem 2rem 2.5rem;
  position: relative;
  text-align: center;
  border-bottom: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* Animated background pattern */
.ktpa-loading-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(167, 243, 208, 0.15) 0%, transparent 50%),
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
  animation: backgroundShift 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes backgroundShift {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 0% 0%;
    opacity: 0.8;
  }
  50% {
    background-position: 100% 0%, 0% 100%, 100% 0%;
    opacity: 1;
  }
}

.ktpa-loading-header h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* Glowing text effect */
.ktpa-loading-header h3::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgba(59, 130, 246, 0.3);
  animation: textGlow 3s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes textGlow {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.02); }
}

/* Cancel button styles removed - no longer needed */

/* Body content */
.ktpa-loading-body {
  padding: 2rem;
  animation: slideInDown 0.5s ease-out 0.2s both;
}

/* Progress Section */
.ktpa-progress-section {
  margin-bottom: 2rem;
}

.ktpa-progress-stage {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 1rem;
  text-align: center;
  min-height: 1.5em;
  padding: 1rem 1.5rem;
  background: rgba(248, 249, 250, 0.7);
  border-radius: 8px;
  border-left: 4px solid var(--ktpa-brand, #0073aa);
  transition: all 0.3s ease;
}

.ktpa-progress-bar {
  width: 100%;
  height: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ktpa-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
  background-size: 200% 100%;
  border-radius: 4px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: shimmer 2s infinite;
}

/* Facts Section */
.ktpa-facts-section {
  margin-bottom: 2rem;
  text-align: center;
}

.ktpa-korea-fact {
  font-size: 1rem;
  color: #636e72;
  background: #f8f9fa;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid #4ecdc4;
  line-height: 1.5;
  min-height: 2.5em;
  text-align: center;
  transition: border-left-color 0.3s ease;
  animation: pulseBorder 3s infinite;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Preview Section */
.ktpa-preview-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2d3436;
  margin: 0 0 1rem 0;
  text-align: center;
}

.ktpa-preview-content {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
}

.preview-trip-overview {
  margin-bottom: 1.5rem;
}

.preview-trip-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
}

.preview-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

#preview-duration, #preview-party, #preview-budget {
  font-weight: 500;
  color: var(--ktpa-brand, #0073aa);
}

/* Selected experiences styles removed - section no longer used */

.preview-separator {
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.preview-skeleton-area {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* Footer */
.ktpa-loading-footer {
  background: #f8f9fa;
  padding: 1rem 2rem;
  text-align: center;
  border-top: 1px solid #e9ecef;
}

.ktpa-loading-tips {
  font-size: 0.875rem;
  color: #636e72;
  line-height: 1.4;
}

/* Animations */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseBorder {
  0%, 100% { border-left-color: #4ecdc4; }
  50% { border-left-color: #45b7d1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .ktpa-loading-card {
    margin: 0.5rem;
    width: calc(100% - 1rem);
    max-width: none;
    max-height: 95vh;
  }

  .ktpa-loading-header {
    padding: 1.25rem 1.5rem;
  }

  .ktpa-loading-header h3 {
    font-size: 1.125rem;
  }

  .ktpa-loading-body {
    padding: 1rem;
  }

  .ktpa-loading-footer {
    padding: 0.75rem 1rem;
  }

  .ktpa-loading-tips {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .ktpa-loading-body {
    padding: 1.5rem;
  }

  .ktpa-progress-stage {
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
  }

  .ktpa-korea-fact {
    font-size: 0.9rem;
    padding: 1rem 1.25rem;
  }

  .ktpa-preview-content {
    padding: 1rem;
  }

  .preview-trip-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  /* Selected experiences mobile styles removed - no longer needed */
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .ktpa-loading-overlay,
  .ktpa-loading-card,
  .ktpa-progress-fill {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* === ENHANCED LOADING EXPERIENCE === */
.ktpa-loading-progress {
  margin-top: 1rem;
  display: none;
  animation: slideInDown 0.3s ease-out;
}

.ktpa-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
}

.ktpa-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
  background-size: 200% 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.8s ease;
  animation: shimmer 2s infinite;
}

.ktpa-korea-fact {
  font-size: 0.875rem;
  color: #666;
  text-align: center;
  font-weight: 500;
  line-height: 1.4;
  min-height: 1.2em;
  opacity: 0.9;
  padding: 0 1rem;
}

/* Skeleton loader animation */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state enhancements */
.ktpa-cta-button.ktpa-loading {
  position: relative;
  overflow: hidden;
}

.ktpa-cta-button.ktpa-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: loadingSweep 2s infinite;
}

.ktpa-cta-button.ktpa-loading .ktpa-cta-icon {
  animation: pulse 1.5s infinite;
}

@keyframes loadingSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Itinerary skeleton loader (for when content loads) */
.ktpa-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.ktpa-skeleton-text {
  height: 1em;
  margin: 0.5em 0;
}

.ktpa-skeleton-title {
  height: 1.5em;
  width: 60%;
  margin: 1em 0;
}

.ktpa-skeleton-paragraph {
  height: 1em;
  margin: 0.3em 0;
}

.ktpa-skeleton-paragraph:nth-child(odd) {
  width: 95%;
}

.ktpa-skeleton-paragraph:nth-child(even) {
  width: 80%;
}

@keyframes skeleton-loading {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Mobile responsiveness for loading experience */
@media (max-width: 768px) {
  .ktpa-korea-fact {
    font-size: 0.8rem;
    padding: 0 0.5rem;
    line-height: 1.3;
  }

  .ktpa-progress-bar {
    height: 4px;
    margin-bottom: 0.5rem;
  }

  .ktpa-loading-progress {
    margin-top: 0.75rem;
  }

  .ktpa-skeleton-container {
    padding: 1rem 0.5rem;
  }

  .ktpa-skeleton-title {
    height: 1.2em;
  }

  .ktpa-skeleton-paragraph {
    height: 0.9em;
    margin: 0.4em 0;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .ktpa-progress-fill,
  .ktpa-skeleton,
  .ktpa-cta-button.ktpa-loading::before,
  .ktpa-cta-button.ktpa-loading .ktpa-cta-icon {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ktpa-loading-progress {
    animation: none;
  }
}

/* === EDIT EXPERIENCES MODAL === */
.ktpa-edit-modal .ktpa-modal-body {
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.ktpa-edit-filters {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--ktpa-border);
  background: #f8f9fa;
}

.ktpa-filter-group {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ktpa-filter-group:last-child {
  margin-bottom: 0;
}

.ktpa-filter-group label {
  display: inline-block;
  font-weight: 600;
  margin-right: 0.75rem;
  margin-bottom: 0;
  color: var(--ktpa-text-primary);
  align-self: center;
}

.ktpa-city-filters, .ktpa-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

/* Hide non-active filters by default */
.ktpa-filter-btn:not(.active) {
  display: none;
}

/* Show active filter inline with label */
.ktpa-filter-btn.active {
  display: inline-flex;
  position: relative;
}

/* Add dropdown arrow to active filter */
.ktpa-filter-btn.active::after {
  content: '▼';
  margin-left: 0.5rem;
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Show all filters when container is expanded */
.ktpa-filter-group.expanded .ktpa-filter-btn {
  display: inline-flex;
}

/* Style the expanded state */
.ktpa-filter-group.expanded .ktpa-city-filters,
.ktpa-filter-group.expanded .ktpa-category-filters {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 0.5rem;
  z-index: 1000;
  min-width: 200px;
  max-width: none;
}

/* Reset dropdown arrow for expanded state */
.ktpa-filter-group.expanded .ktpa-filter-btn.active::after {
  content: '▲';
}

.ktpa-filter-group {
  position: relative;
  width: 100%;
}

.ktpa-filter-btn {
  padding: 0.5rem 1rem;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.ktpa-filter-btn:hover {
  border-color: #fb5019;
  color: #fb5019;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ktpa-filter-btn.active {
  background: #fb5019;
  border-color: #fb5019;
  color: white;
  box-shadow: 0 3px 8px rgba(251, 80, 25, 0.3);
  transform: translateY(-1px);
}

.ktpa-filter-btn.active:hover {
  background: #e94d0e;
  border-color: #e94d0e;
  color: white;
}

.ktpa-edit-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.ktpa-edit-section {
  margin-bottom: 2rem;
}

.ktpa-edit-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--ktpa-text-primary);
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  border-left: 4px solid var(--ktpa-brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ktpa-section-count {
  background: var(--ktpa-brand);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.ktpa-experiences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  max-height: 350px;
  overflow-y: auto;
  padding: 0.5rem;
}

.ktpa-modal-exp-card {
  background: white;
  border: 2px solid var(--ktpa-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  min-height: 160px;
  display: flex;
  flex-direction: column;
}

.ktpa-modal-exp-card:hover {
  border-color: var(--ktpa-accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ktpa-modal-exp-card.selected-card {
  background: #f0f9ff;
  border-color: var(--ktpa-brand);
}

.ktpa-modal-exp-card.selected-card:hover {
  background: #e0f2fe;
}

.ktpa-modal-card-content {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  position: relative;
  text-align: center;
  flex: 1;
  justify-content: space-between;
}

.ktpa-modal-card-image {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 0.5rem auto;
  display: block;
}

.ktpa-modal-card-info {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.ktpa-modal-card-title {
  margin: 0 0 0.5rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ktpa-text-primary);
  line-height: 1.4;
  word-wrap: break-word;
  hyphens: auto;
  text-align: center;
  min-height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ktpa-modal-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
}

.ktpa-modal-city, .ktpa-modal-category {
  font-size: 0.75rem;
  color: var(--ktpa-muted);
  font-weight: 500;
}

.ktpa-modal-category {
  background: #f1f5f9;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ktpa-modal-city {
  font-weight: 600;
  color: var(--ktpa-brand);
}

.ktpa-modal-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ktpa-accent);
  background: white;
  color: var(--ktpa-accent);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ktpa-modal-toggle-btn:hover {
  background: var(--ktpa-accent);
  color: white;
}

.ktpa-modal-toggle-btn.remove {
  border-color: #dc3545;
  color: #dc3545;
}

.ktpa-modal-toggle-btn.remove:hover {
  background: #dc3545;
  color: white;
}

/* Checkbox styling for modal */
.ktpa-modal-checkbox-label {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 10;
}

.ktpa-modal-checkbox {
  display: none;
}

.ktpa-checkbox-custom {
  width: 28px;
  height: 28px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ktpa-modal-checkbox:checked + .ktpa-checkbox-custom {
  background: #fb5019;
  border-color: #fb5019;
}

.ktpa-modal-checkbox:checked + .ktpa-checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 18px;
  font-weight: bold;
}

.ktpa-modal-checkbox-label:hover .ktpa-checkbox-custom {
  border-color: #fb5019;
}

.ktpa-modal-footer {
  padding: 1rem;
  border-top: 1px solid var(--ktpa-border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.ktpa-secondary-button {
  padding: 0.75rem 1.5rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.ktpa-secondary-button:hover {
  background: #5a6268;
}

/* === EXPERIENCE DETAIL MODAL === */
.ktpa-experience-modal .ktpa-modal-body {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.experience-modal-content {
  padding: 1rem;
}

.experience-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.experience-image {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.experience-title-section h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  color: var(--ktpa-text-primary);
}

.experience-location {
  color: var(--ktpa-text-secondary);
  font-size: 0.9rem;
}

.experience-summary {
  margin-bottom: 1rem;
  line-height: 1.5;
  color: var(--ktpa-text-primary);
}

.experience-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  background: var(--ktpa-bg-card);
  border-radius: 6px;
  border: 1px solid var(--ktpa-border-light);
}

.detail-label {
  font-weight: 500;
  color: var(--ktpa-text-secondary);
}

.detail-value {
  color: var(--ktpa-text-primary);
  font-weight: 500;
}

.experience-context {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
  border-radius: 8px;
  border-left: 4px solid var(--ktpa-primary);
}

.experience-context h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: var(--ktpa-text-primary);
}

.context-advice-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.advice-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
}

.advice-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.advice-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ktpa-text-primary);
}

.experience-additional-info h3 {
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1rem;
  color: var(--ktpa-text-primary);
}

.detail-text {
  line-height: 1.5;
  color: var(--ktpa-text-primary);
  margin-bottom: 1rem;
}

.attractions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.attraction-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--ktpa-primary);
  color: white;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .experience-header {
    flex-direction: column;
  }
  
  .experience-image {
    width: 100%;
    height: 150px;
  }
  
  .experience-details-grid {
    grid-template-columns: 1fr;
  }
  
  .context-advice-grid {
    gap: 0.5rem;
  }
}
.ktpa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  z-index: 999;
}
.ktpa-overlay.active { display: block; }
.ktpa-overlay[hidden] { display: none !important; }

.ktpa-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 92%;
  max-width: 720px;
  max-height: 80vh;
  overflow: auto;
  display: none;
  z-index: 1000;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.ktpa-modal.active { display: block; }
.ktpa-modal[hidden] { display: none !important; }

.ktpa-modal-header,
.ktpa-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}
.ktpa-modal-footer {
  border-top: 1px solid #eee; border-bottom: 0; justify-content: flex-end;
}
.ktpa-modal-body { padding: 16px 20px; }

.ktpa-close { background: var(--ktpa-brand); border: 0; font-size: 24px; cursor: pointer; }

/* Button styles inherit from base.css unified system */

/* Select modal tab UI */
.ktpa-modal-exp-label { display: block; margin: 8px 0; }
#ktpa-select-close { background-color: var(--ktpa-accent); }

/* ===== MODERN MODAL TAB SYSTEM ===== */

/* Modal Navigation Container */
.ktpa-modal-nav {
  margin-bottom: 24px;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 20px;
}

/* City Tabs (Primary Level) */
.ktpa-city-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.ktpa-city-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  color: var(--ktpa-text);
  position: relative;
  min-width: 120px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ktpa-city-tab:hover {
  border-color: var(--ktpa-brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ktpa-city-tab.active {
  background: linear-gradient(135deg, var(--ktpa-brand) 0%, #005a8c 100%);
  border-color: var(--ktpa-brand);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 115, 170, 0.3);
}

.ktpa-city-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.ktpa-city-info {
  flex: 1;
  text-align: left;
}

.ktpa-city-name {
  display: block;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}

.ktpa-city-name-kr {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  font-weight: 400;
}

.ktpa-city-count {
  background: rgba(0,0,0,0.1);
  color: inherit;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.ktpa-city-tab.active .ktpa-city-count {
  background: rgba(255,255,255,0.2);
}

/* City Content Panels */
.ktpa-city-content {
  margin-top: 20px;
}

.ktpa-city-panel {
  display: none;
}

.ktpa-city-panel.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

/* Category Tabs (Secondary Level) */
.ktpa-category-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 12px;
}

.ktpa-category-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  font-weight: 500;
  color: var(--ktpa-muted);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ktpa-category-tab:hover {
  border-color: var(--ktpa-accent);
  color: var(--ktpa-text);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ktpa-category-tab.active {
  background: linear-gradient(135deg, var(--ktpa-accent) 0%, #e94d0e 100%);
  border-color: var(--ktpa-accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(251, 80, 25, 0.3);
}

.ktpa-category-count {
  background: rgba(0,0,0,0.1);
  color: inherit;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

.ktpa-category-tab.active .ktpa-category-count {
  background: rgba(255,255,255,0.2);
}

/* Category Content */
.ktpa-category-content {
  margin-top: 16px;
}

.ktpa-category-panel {
  display: none;
}

.ktpa-category-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Experience Cards */
.ktpa-experience-card {
  display: block;
  margin-bottom: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.ktpa-experience-card:hover {
  border-color: var(--ktpa-brand);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.ktpa-experience-card input[type="checkbox"] {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.ktpa-exp-content {
  padding-right: 40px;
}

.ktpa-exp-header {
  margin-bottom: 8px;
}

.ktpa-exp-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ktpa-text);
  line-height: 1.3;
}

.ktpa-exp-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.ktpa-exp-district {
  font-size: 13px;
  color: var(--ktpa-muted);
  background: #f8f9fa;
  padding: 2px 8px;
  border-radius: 6px;
}

.ktpa-exp-cost {
  font-size: 13px;
  color: var(--ktpa-accent);
  font-weight: 600;
}

.ktpa-exp-info {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--ktpa-muted);
}

.ktpa-no-experiences {
  text-align: center;
  color: var(--ktpa-muted);
  font-style: italic;
  padding: 32px;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 16px 0;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Legacy tab system removed - use unified .ktpa-tab components from components.css */

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
  .ktpa-modal { 
    width: 95%; 
    max-height: 90vh; 
  }
  
  /* City tabs - stack vertically on mobile */
  .ktpa-city-tabs {
    flex-direction: column;
    gap: 6px;
  }
  
  .ktpa-city-tab {
    padding: 12px 16px;
    min-width: auto;
  }
  
  .ktpa-city-name {
    font-size: 15px;
  }
  
  .ktpa-city-name-kr {
    font-size: 11px;
  }
  
  .ktpa-city-icon {
    font-size: 20px;
  }
  
  /* Category tabs - smaller on mobile */
  .ktpa-category-tabs {
    padding: 8px;
    gap: 4px;
  }
  
  .ktpa-category-tab {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .ktpa-category-count {
    font-size: 10px;
    padding: 1px 4px;
  }
  
  /* Experience cards - compact on mobile */
  .ktpa-experience-card {
    padding: 12px;
    margin-bottom: 8px;
  }

  .ktpa-exp-content {
    padding-right: 35px;
  }

  .ktpa-experience-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    top: 12px;
    right: 12px;
  }

  /* Modal cards - mobile adjustments */
  .ktpa-modal-exp-card {
    margin-bottom: 8px;
    min-height: 140px;
  }

  .ktpa-modal-card-content {
    padding: 0.5rem;
  }

  .ktpa-modal-card-image {
    width: 50px;
    height: 38px;
  }

  .ktpa-checkbox-custom {
    width: 26px;
    height: 26px;
  }

  .ktpa-modal-card-title {
    font-size: 0.8rem;
    min-height: 2.4rem;
  }

  .ktpa-experiences-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
  }

  /* Filter group mobile adjustments - keep inline layout */
  .ktpa-filter-group {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .ktpa-filter-group label {
    margin-right: 0.5rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  /* Ensure filters stay inline on mobile */
  .ktpa-city-filters, .ktpa-category-filters {
    flex: 0 0 auto;
  }

  /* Keep dropdown positioning relative on mobile */
  .ktpa-filter-group.expanded .ktpa-city-filters,
  .ktpa-filter-group.expanded .ktpa-category-filters {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    min-width: 200px;
    max-width: none;
  }

  /* Mobile filter button adjustments */
  .ktpa-filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  .ktpa-filter-btn.active::after {
    margin-left: 0.4rem;
    font-size: 0.6rem;
  }
  
  .ktpa-exp-title {
    font-size: 15px;
  }
  
  .ktpa-exp-meta {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .ktpa-exp-district,
  .ktpa-exp-cost {
    font-size: 12px;
  }
  
  .ktpa-exp-info {
    gap: 12px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .ktpa-modal {
    width: 98%;
    max-height: 95vh;
    margin: 1vh auto;
  }
  
  .ktpa-modal-nav {
    margin-bottom: 16px;
    padding-bottom: 16px;
  }
  
  .ktpa-city-tab {
    padding: 10px 12px;
    gap: 8px;
  }
  
  .ktpa-city-name {
    font-size: 14px;
  }
  
  .ktpa-city-icon {
    font-size: 18px;
  }
  
  .ktpa-category-tabs {
    padding: 6px;
  }
  
  .ktpa-category-tab {
    padding: 5px 10px;
    font-size: 11px;
    gap: 4px;
  }
  
  .ktpa-experience-card {
    padding: 10px;
  }
  
  .ktpa-exp-content {
    padding-right: 32px;
  }
  
  .ktpa-exp-title {
    font-size: 14px;
  }
  
  .ktpa-exp-info {
    flex-direction: column;
    gap: 4px;
  }
  
  .ktpa-no-experiences {
    padding: 24px 16px;
    font-size: 14px;
  }
}

/* --- Itinerary modal polish --- */
.ktpa-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
@media (max-width:640px){
  .ktpa-form-grid{ grid-template-columns:1fr; }
}
.ktpa-field label{
  display:block;
  font-weight:600;
  font-size:.95rem;
  margin-bottom:6px;
}
.ktpa-input{
  width:100%;
  border:1px solid #e4e4e7;
  border-radius:8px;
  padding:10px 12px;
  font-size:0.95rem;
  outline:none;
}
.ktpa-input:focus{
  border-color:#c7c7ff;
  box-shadow:0 0 0 3px rgba(87,97,255,.12);
}
.ktpa-form-error{
  color:#b00020;
  margin:8px 2px 0;
}

/* --- In-modal busy state --- */
#ktpa-itin-modal{
  position:relative;
}
#ktpa-itin-modal .ktpa-modal-busy{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  backdrop-filter:blur(2px);
  background:rgba(255,255,255,.6);
  border-radius:12px;
  z-index:2;
  text-align:center;
}
#ktpa-itin-modal.is-busy .ktpa-modal-busy{ display:flex; }

.ktpa-spinner{
  width:36px; height:36px; border-radius:50%;
  border:3px solid #e5e7eb; border-top-color:#6366f1;
  animation:ktpa-spin 0.9s linear infinite;
  margin-bottom:10px;
}
.ktpa-busy-text{ font-weight:600; color:#111; }
.ktpa-busy-text small{ display:block; color:#666; font-weight:500; }

@keyframes ktpa-spin{ to{ transform:rotate(360deg); } }

.ktpa-overlay.open { display: block; }
.ktpa-modal.open { display: block; }

/* ===== EXPERIENCE DETAIL MODAL ===== */
.ktpa-experience-detail-modal .ktpa-modal {
  max-width: 800px;
  max-height: 85vh;
}

.ktpa-exp-detail-header {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.ktpa-exp-detail-image {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.ktpa-exp-detail-info {
  flex: 1;
}

.ktpa-exp-detail-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--ktpa-text);
  line-height: 1.3;
}

.ktpa-exp-detail-location {
  color: var(--ktpa-muted);
  font-size: 16px;
  margin-bottom: 12px;
}

.ktpa-exp-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ktpa-exp-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.ktpa-exp-badge.cost {
  background: #dcfce7;
  color: #166534;
}

.ktpa-exp-badge.duration {
  background: #e0f2fe;
  color: #0369a1;
}

.ktpa-exp-badge.fit {
  background: #fef2f2;
  color: #dc2626;
}

.ktpa-exp-detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .ktpa-exp-detail-content {
    grid-template-columns: 2fr 1fr;
  }
}

.ktpa-exp-main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ktpa-exp-sidebar {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
}

.ktpa-exp-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ktpa-text);
  margin-bottom: 20px;
}

.ktpa-exp-section {
  margin-bottom: 20px;
}

.ktpa-exp-section h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ktpa-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Improve emoji visibility in section headings */
.ktpa-exp-section h4::first-letter {
  font-size: 1.2em;
  filter: contrast(1.3) brightness(0.8);
  display: inline-block;
  width: 20px;
  text-align: center;
}

.ktpa-exp-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ktpa-muted);
}

.ktpa-exp-cultural-note {
  background: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
}

.ktpa-exp-traveler-tip {
  background: #ecfdf5;
  border-left: 4px solid #10b981;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
}

@media (max-width: 767px) {
  .ktpa-exp-detail-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .ktpa-exp-detail-image {
    width: 100%;
    height: 200px;
  }
  
  .ktpa-experience-detail-modal .ktpa-modal {
    max-height: 95vh;
  }
}

/* ===== SOCIAL MEDIA SHARING MODAL ===== */
.ktpa-social-modal .ktpa-modal {
  max-width: 500px;
}

.ktpa-social-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.ktpa-social-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  background: white;
}

.ktpa-social-platform:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
}

.ktpa-social-platform.whatsapp {
  border-color: #25D366;
}

.ktpa-social-platform.whatsapp:hover {
  background: #25D366;
  color: white;
}

.ktpa-social-platform.facebook {
  border-color: #1877F2;
}

.ktpa-social-platform.facebook:hover {
  background: #1877F2;
  color: white;
}

.ktpa-social-platform.twitter {
  border-color: #1DA1F2;
}

.ktpa-social-platform.twitter:hover {
  background: #1DA1F2;
  color: white;
}

.ktpa-social-platform.kakaotalk {
  border-color: #FEE500;
}

.ktpa-social-platform.kakaotalk:hover {
  background: #FEE500;
  color: #3C1E1E;
}

.ktpa-social-platform.email {
  border-color: #6B7280;
}

.ktpa-social-platform.email:hover {
  background: #6B7280;
  color: white;
}

.ktpa-social-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.ktpa-social-name {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.ktpa-share-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}

.ktpa-share-preview h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ktpa-text);
}

.ktpa-share-content {
  font-size: 14px;
  color: var(--ktpa-muted);
  line-height: 1.4;
  white-space: pre-wrap;
}

.ktpa-share-url {
  background: #e2e8f0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: monospace;
  color: var(--ktpa-brand);
  margin-top: 8px;
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
}

@media (max-width: 480px) {
  .ktpa-social-platforms {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .ktpa-social-platform {
    padding: 16px 12px;
  }

  .ktpa-social-icon {
    font-size: 28px;
  }

  .ktpa-social-name {
    font-size: 13px;
  }
}

/* AI Processing Animation Styles */
.ai-processing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ktpa-space-2xl);
  margin: var(--ktpa-space-3xl) 0;
}

.ai-neural-network {
  position: relative;
  width: 200px;
  height: 150px;
  margin: 0 auto;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 12px;
}

.neural-node {
  position: absolute;
  width: 12px;
  height: 12px;
  background: linear-gradient(45deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  box-shadow:
    0 0 10px rgba(59, 130, 246, 0.5),
    0 0 20px rgba(139, 92, 246, 0.3),
    0 0 30px rgba(59, 130, 246, 0.1);
  animation: neuralPulse 2s ease-in-out infinite;
  animation-delay: var(--delay);
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
}

@keyframes neuralPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 1;
    box-shadow:
      0 0 15px rgba(59, 130, 246, 0.7),
      0 0 25px rgba(139, 92, 246, 0.5),
      0 0 35px rgba(59, 130, 246, 0.2);
  }
}

.neural-connection {
  position: absolute;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(59, 130, 246, 0.6) 20%,
    rgba(139, 92, 246, 0.8) 50%,
    rgba(59, 130, 246, 0.6) 80%,
    transparent 100%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
  animation: connectionFlow 1.5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes connectionFlow {
  0% {
    opacity: 0.3;
    transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) scaleX(0.5);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) scaleX(1);
  }
  100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) scaleX(0.5);
  }
}

.ai-processing-text {
  text-align: center;
}

.processing-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ktpa-space-md);
  color: var(--ktpa-text-secondary);
  font-size: var(--ktpa-text-sm);
}

.processing-dots {
  display: inline-block;
  width: 20px;
  text-align: left;
  position: relative;
}

.processing-dots::after {
  content: '';
  position: absolute;
  left: 0;
  animation: processingDotsAnimation 1.5s ease-in-out infinite;
}

@keyframes processingDotsAnimation {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

.processing-label {
  font-weight: 500;
  color: var(--ktpa-text-primary);
  background: linear-gradient(45deg, var(--ktpa-text-primary), var(--ktpa-brand));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% {
    filter: brightness(1);
  }
  100% {
    filter: brightness(1.2);
  }
}

/* Cybernetic grid overlay effect */
.ai-neural-network::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: 12px;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .neural-node,
  .neural-connection,
  .processing-dots::after,
  .processing-label,
  .ai-neural-network::before {
    animation: none;
  }

  .neural-node {
    opacity: 0.8;
  }

  .neural-connection {
    opacity: 0.6;
  }
}

/* ========================================
   Hotel Change Modal Styles
   ======================================== */

.ktpa-hotel-change-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ktpa-hotel-change-modal.visible {
  opacity: 1;
  visibility: visible;
}

.ktpa-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ktpa-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.ktpa-hotel-change-modal.visible .ktpa-modal-content {
  transform: scale(1) translateY(0);
}

.ktpa-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, var(--ktpa-korean-cream, #fefdf7) 0%, var(--ktpa-korean-white, #f8f9fa) 100%);
  border-radius: 16px 16px 0 0;
}

.ktpa-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--ktpa-korean-black, #2c3e50);
}

.ktpa-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.ktpa-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.ktpa-modal-body {
  padding: 24px;
}

.ktpa-current-selection h4,
.ktpa-alternative-options h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ktpa-korean-black, #2c3e50);
}

.ktpa-current-selection {
  margin-bottom: 32px;
}

.ktpa-hotel-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 2px solid #eee;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.ktpa-hotel-option.current {
  border-color: var(--ktpa-korean-gold, #d4a574);
  background: linear-gradient(135deg, var(--ktpa-korean-cream, #fefdf7) 0%, var(--ktpa-korean-white, #f8f9fa) 100%);
}

.ktpa-hotel-option.alternative:hover {
  border-color: var(--ktpa-korean-gold, #d4a574);
  background: rgba(212, 165, 116, 0.05);
}

.ktpa-hotel-option-image {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.ktpa-hotel-option-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ktpa-hotel-placeholder {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #999;
}

.ktpa-hotel-option-details {
  flex: 1;
  min-width: 0;
}

.ktpa-hotel-option-details h5 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ktpa-korean-black, #2c3e50);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ktpa-hotel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #666;
}

.ktpa-hotel-meta .stars {
  color: #ffa500;
}

.ktpa-hotel-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.ktpa-hotel-price .price {
  font-size: 16px;
  font-weight: 600;
  color: var(--ktpa-korean-blue, #003d82);
}

.ktpa-hotel-price .period {
  font-size: 13px;
  color: #666;
}

.ktpa-hotel-price .price-diff {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.ktpa-hotel-price .price-diff.higher {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.ktpa-hotel-price .price-diff.lower {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.ktpa-hotel-option-status {
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.current {
  background: var(--ktpa-korean-gold, #d4a574);
  color: white;
}

.ktpa-hotel-option-actions {
  flex-shrink: 0;
}

.ktpa-select-alternative-btn {
  background: linear-gradient(135deg, var(--ktpa-korean-blue, #003d82) 0%, #1e3a8a 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ktpa-select-alternative-btn:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.ktpa-modal-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
}

.ktpa-see-more-hotels-btn {
  background: transparent;
  color: var(--ktpa-korean-blue, #003d82);
  border: 2px solid var(--ktpa-korean-blue, #003d82);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ktpa-see-more-hotels-btn:hover {
  background: var(--ktpa-korean-blue, #003d82);
  color: white;
  transform: translateY(-1px);
}

/* Success notification */
.ktpa-hotel-change-success {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.ktpa-hotel-change-success.visible {
  opacity: 1;
  transform: translateX(0);
}

.success-content {
  background: var(--ktpa-korean-gold, #d4a574);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 600;
  font-size: 14px;
}

.success-icon {
  font-size: 16px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .ktpa-modal-content {
    width: 98%;
    margin: 10px;
    max-height: 95vh;
  }

  .ktpa-modal-header {
    padding: 16px 20px;
  }

  .ktpa-modal-body {
    padding: 20px;
  }

  .ktpa-hotel-option {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .ktpa-hotel-option-image {
    width: 100%;
    height: 120px;
  }

  .ktpa-hotel-option-actions,
  .ktpa-hotel-option-status {
    align-self: center;
  }

  .ktpa-select-alternative-btn {
    padding: 12px 24px;
    width: 100%;
  }

  .ktpa-hotel-change-success {
    top: 10px;
    right: 10px;
    left: 10px;
  }
}

