/**
 * Tour Compare Styles
 * ระบบเปรียบเทียบทัวร์
 * @package itimtravel
 */

/* ==================== Compare Button on Tour Cards ==================== */

.btn-compare-tour {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.875rem;
  color: #666;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: Prompt-Regular;
  white-space: nowrap;
}

.btn-compare-tour:hover {
  background: #e3f2fd;
  color: #1976d2;
  border-color: #90caf9;
}

.btn-compare-tour.active {
  background: #1976d2;
  color: #fff;
  border-color: #1976d2;
}

.btn-compare-tour.active:hover {
  background: #c62828;
  border-color: #c62828;
}

.btn-compare-tour i {
  font-size: 0.95rem;
}

.btn-compare-tour.btn-compare-disabled {
  background: #f0f0f0;
  color: #bbb;
  border-color: #e0e0e0;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-compare-tour.btn-compare-disabled:hover {
  background: #f0f0f0;
  color: #bbb;
  border-color: #e0e0e0;
  transform: none;
}

@media (max-width: 768px) {
  .btn-compare-tour {
    width: 100%;
    padding: 8px 14px;
    display: flex;
    justify-content: center;
  }
}

/* ==================== Floating Compare Bar ==================== */

#compare-floating-bar {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 580px;
  width: 95%;
  border: 1px solid #e0e0e0;
  border-bottom: none;
}

#compare-floating-bar.show {
  bottom: 0;
}

.compare-bar-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.compare-bar-count {
  background: #1976d2;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.compare-bar-items {
  display: flex;
  gap: 8px;
  flex: 1;
}

.compare-bar-item {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: visible;
  border: 2px solid #e0e0e0;
  flex-shrink: 0;
}

.compare-bar-item .compare-bar-thumb {
  border-radius: 6px;
  overflow: hidden;
}

.compare-bar-item.empty {
  border-style: dashed;
  border-color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.compare-bar-item.empty i {
  color: #ccc;
  font-size: 1rem;
}

.compare-bar-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.compare-bar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-bar-thumb i {
  color: #bbb;
  font-size: 1.2rem;
}

.compare-bar-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  z-index: 2;
  transition: transform 0.15s ease;
}

.compare-bar-remove:hover {
  transform: scale(1.2);
}

.compare-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-compare-now {
  padding: 8px 18px;
  background: linear-gradient(135deg, #ff7c2b, #ff5722);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: Prompt-Regular;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-compare-now:hover {
  background: linear-gradient(135deg, #ff5722, #e64a19);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(255, 87, 34, 0.3);
}

.btn-compare-now:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.compare-bar-clear {
  padding: 8px 12px;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  font-size: 0.9rem;
  color: #999;
  cursor: pointer;
  font-family: Prompt-Regular;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.compare-bar-clear:hover {
  border-color: #e53935;
  color: #e53935;
}

/* ==================== Toast Notification ==================== */

.compare-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10000;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 1rem;
  font-family: Prompt-Regular;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.compare-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.compare-toast-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.compare-toast-warning {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}

/* ==================== Compare Page ==================== */

/* Hero Section */
.compare-hero {
  background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* floating travel icons */
.compare-hero-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.compare-hero-icons i {
  position: absolute;
  color: rgba(255, 255, 255, 0.07);
  font-size: 2rem;
  animation: compareFloatIcon 6s ease-in-out infinite;
}

.compare-hero-icons i:nth-child(1) {
  top: 15%;
  left: 8%;
  font-size: 2.5rem;
  animation-delay: 0s;
}
.compare-hero-icons i:nth-child(2) {
  top: 25%;
  right: 12%;
  font-size: 1.8rem;
  animation-delay: 1s;
}
.compare-hero-icons i:nth-child(3) {
  bottom: 20%;
  left: 15%;
  font-size: 2.2rem;
  animation-delay: 2s;
}
.compare-hero-icons i:nth-child(4) {
  top: 10%;
  left: 35%;
  font-size: 1.6rem;
  animation-delay: 0.5s;
}
.compare-hero-icons i:nth-child(5) {
  bottom: 15%;
  right: 20%;
  font-size: 2rem;
  animation-delay: 1.5s;
}
.compare-hero-icons i:nth-child(6) {
  top: 40%;
  left: 5%;
  font-size: 1.5rem;
  animation-delay: 3s;
}
.compare-hero-icons i:nth-child(7) {
  top: 20%;
  right: 30%;
  font-size: 1.8rem;
  animation-delay: 2.5s;
}
.compare-hero-icons i:nth-child(8) {
  bottom: 30%;
  right: 8%;
  font-size: 2.4rem;
  animation-delay: 0.8s;
}

@keyframes compareFloatIcon {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}

/* flying plane */
.compare-hero-plane {
  position: absolute;
  top: 30px;
  right: 5%;
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.15);
  transform: rotate(-20deg);
  animation: comparePlaneFly 4s ease-in-out infinite;
  z-index: 1;
}

@keyframes comparePlaneFly {
  0%,
  100% {
    transform: rotate(-20deg) translateY(0);
  }
  50% {
    transform: rotate(-20deg) translateY(-12px);
  }
}

.compare-hero-content {
  position: relative;
  z-index: 2;
}

.compare-hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.compare-hero p {
  font-size: 16px;
  opacity: 0.85;
  margin: 0;
}

.compare-page-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: -30px;
  margin-bottom: 1.5rem;
  background: #fff;
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8e8;
  position: relative;
  z-index: 2;
}

.btn-back-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: #f5f5f5;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 1rem;
  font-family: Prompt-Regular;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-back-search:hover {
  background: #e0e0e0;
  color: #333;
}

.btn-clear-compare {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: none;
  color: #e53935;
  border: 1px solid #ef9a9a;
  border-radius: 25px;
  font-size: 1rem;
  font-family: Prompt-Regular;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-compare:hover {
  background: #ffebee;
}

/* Loading */
#compare-loading {
  text-align: center;
  padding: 4rem 0;
}

.compare-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: compareSpin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes compareSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
#compare-empty {
  text-align: center;
  padding: 6rem 0;
  display: none;
}

#compare-empty i {
  font-size: 2.5rem;
  margin-right: 0.25rem;
  color: #afafaf;
}

#compare-empty p {
  color: #999;
  font-size: 1.2rem;
}

/* ==================== Compare Table ==================== */

#compare-table-wrapper {
  display: none;
}

.compare-section {
  margin-bottom: 0;
}

.compare-header-section {
  margin-bottom: 1.5rem;
}

.compare-tour-header {
  text-align: center;
  padding: 15px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eee;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.compare-tour-image {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.compare-tour-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-tour-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compare-tour-name a {
  color: #0d47a1;
  text-decoration: none;
}

.compare-tour-name a:hover {
  color: #ff7c2b;
}

.compare-tour-code {
  font-size: 15px;
  color: #999;
  margin-bottom: 8px;
}

.btn-view-compare {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  color: #1976d2;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid #e3f2fd;
  border-radius: 15px;
  transition: all 0.2s ease;
}

.btn-view-compare:hover {
  background: #e3f2fd;
  color: #0d47a1;
}

/* ==================== Vertical Divider Between Tours ==================== */

.compare-header-section .row > div + div .compare-tour-header {
  border-radius: 12px;
}

.compare-header-section .row > div:first-child .compare-tour-header {
  border-radius: 12px;
}

.compare-header-section .row > div:only-child .compare-tour-header {
  border-radius: 12px;
}

.compare-body .compare-row .row > div {
  position: relative;
}

.compare-body .compare-row .row > div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.compare-cta-section .row > div {
  position: relative;
}

.compare-cta-section .row > div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

/* Compare Body */
.compare-body {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.compare-group-title {
  padding: 12px 20px;
  margin: 0;
  background: #f8f9fa;
  font-size: 1.05rem;
  color: #0d47a1;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-group-title:first-child {
  border-top: none;
}

.compare-row {
  padding: 12px 20px;
  border-bottom: 1px solid #f5f5f5;
}

.compare-row:last-child {
  border-bottom: none;
}

.compare-row.highlight-row-compare-tours {
  background: #fffde7;
}

.compare-row-label {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.compare-row-label i {
  width: 16px;
  text-align: center;
  color: #aaa;
}

.compare-row-value {
  font-size: 1rem;
  color: #333;
  min-height: 1.5em;
  word-break: break-word;
}

.compare-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-orange);
}

/* Flash Sale Price in Compare */
.compare-price-flash {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.flash-badge-compare {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ff6b35, #ff4444);
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
  animation: flashPulseCompare 2s ease-in-out infinite;
}

@keyframes flashPulseCompare {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

.flash-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.compare-price.flash-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e53935;
}

.compare-price-original {
  font-size: 0.9rem;
  color: #aaa;
  text-decoration: line-through;
  font-weight: 400;
}

/* Flash price in departures */
.dep-flash-price {
  color: #e53935 !important;
  font-weight: 700;
}

.dep-flash-price i {
  color: #ff6b35;
  font-size: 0.75rem;
  margin-right: 2px;
}

.compare-airline-logo {
  height: 26px;
  width: auto;
}

.no-data {
  color: #ccc;
}

/* Compare Tags */
.compare-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.compare-tag {
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Compare Departures */
.compare-departures {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.compare-departure-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-right: 6px;
}

.compare-departure-item.dep-available {
  background: #e8f5e9;
  color: #2e7d32;
}

.compare-departure-item.dep-almost {
  background: #fff3e0;
  color: #e65100;
}

.compare-departure-item.dep-full {
  background: #fce4ec;
  color: #c62828;
  text-decoration: line-through;
}

.dep-date {
  font-weight: 500;
}

.dep-price {
  font-weight: 600;
}

/* Compare CTA */
.compare-cta-section {
  margin-bottom: 3rem;
}

.compare-cta {
  text-align: center;
  padding: 10px;
}

.btn-book-compare {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #ff7c2b, #ff5722);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  font-family: Prompt-Regular;
  text-decoration: none;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.btn-book-compare:hover {
  background: linear-gradient(135deg, #ff5722, #e64a19);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.btn-pdf-compare {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: #fff;
  color: #e53935;
  border: 1px solid #ef9a9a;
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-pdf-compare:hover {
  background: #ffebee;
  color: #c62828;
}

/* ==================== Responsive ==================== */

@media (max-width: 991px) {
  .compare-hero-plane {
    display: none;
  }
}

@media (max-width: 768px) {
  .compare-hero {
    padding: 50px 0;
  }

  .compare-hero h1 {
    font-size: 22px;
  }

  #compare-floating-bar {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 14px;
    max-width: 100%;
    width: 100%;
    border-radius: 12px 12px 0 0;
  }

  .compare-bar-label {
    font-size: 0.82rem;
    min-width: auto;
  }

  .compare-bar-items {
    flex: 1;
    justify-content: center;
  }

  .compare-bar-item {
    width: 38px;
    height: 38px;
  }

  .compare-bar-actions {
    flex-shrink: 0;
    gap: 6px;
  }

  .btn-compare-now {
    padding: 7px 14px;
    font-size: 0.85rem;
  }

  .compare-bar-clear {
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .compare-tour-image {
    height: 160px;
  }

  .compare-tour-name {
    font-size: 0.95rem;
  }

  .compare-row {
    padding: 10px 14px;
  }

  .compare-row-value {
    font-size: 0.9rem;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .compare-group-title {
    font-size: 0.95rem;
    padding: 10px 14px;
  }

  /* Scroll horizontally on mobile */
  .compare-body .row {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .compare-body .row > div {
    min-width: 140px;
    flex: 0 0 auto;
  }

  .compare-header-section .row {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .compare-header-section .row > div {
    min-width: 160px;
    flex: 0 0 auto;
  }

  .compare-cta-section .row {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .compare-cta-section .row > div {
    min-width: 160px;
    flex: 0 0 auto;
  }

  .compare-tour-header {
    margin-bottom: 10px;
  }

  .compare-departure-item {
    align-items: flex-end;
    flex-direction: column;
  }

  .dep-date {
    font-size: 15px;
  }

  .btn-book-compare {
    flex-direction: column;
  }

  .compare-toast {
    bottom: 75px;
  }
}

@media (max-width: 480px) {
  .compare-bar-label {
    font-size: 0.78rem;
  }

  .compare-bar-label i {
    display: none;
  }

  .compare-bar-item {
    width: 34px;
    height: 34px;
  }

  .btn-compare-now {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .compare-bar-clear {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
}

/* ==================== AI Highlights Analysis ==================== */
/* Color System (Professional Neutral + Indigo/Slate)
 * -------------------------------------------------------
 * Primary:      #1E293B (Dark Slate)     - Headers, titles
 * Secondary:    #475569 (Slate Gray)      - Body text
 * Accent:       #3B82F6 (Muted Blue)     - Highlights, links
 * Accent Alt:   #0D9488 (Soft Teal)      - Success/common
 * Warning:      #B45309 (Muted Amber)    - Unique/not-match
 * Muted Text:   #94A3B8 (Cool Gray)      - Placeholders
 * Card BG:      #F8FAFC (Off-white)      - Card backgrounds
 * Border:       #E2E8F0 (Light Slate)    - Borders
 * -------------------------------------------------------
 * All text/background combos pass WCAG AA contrast (≥4.5:1)
 */

.ai-highlights-section {
  padding: 20px 15px;
}

.ai-highlights-trigger {
  text-align: center;
  padding: 28px 24px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  border-radius: 16px;
  border: 2px dashed #94a3b8;
  transition: border-color 0.3s ease;
}

.ai-highlights-trigger:hover {
  border-color: #64748b;
}

.btn-ai-analyze {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #f8fafc;
  border: none;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(30, 41, 59, 0.25);
  font-family: inherit;
}

.btn-ai-analyze:hover {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 41, 59, 0.35);
}

.btn-ai-analyze:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ai-analyze.analyzing {
  background: linear-gradient(135deg, #475569, #64748b);
}

.btn-ai-analyze.done {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.25);
}

.ai-badge {
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  letter-spacing: 1px;
  font-weight: 700;
}

.ai-analyze-desc {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

/* AI Loading */
.ai-loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  color: #334155;
  font-size: 1rem;
}

.ai-loading-spinner i {
  font-size: 1.5rem;
  color: #3b82f6;
}

/* AI Result */
.ai-highlights-result {
  margin-top: 20px;
}

.ai-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f1f5f9;
  border-radius: 14px 14px 0 0;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-result-header h5 {
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f1f5f9;
}

.ai-result-header h5 i {
  color: #fbbf24;
}

.ai-source-badge {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-source-badge.ai {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.ai-source-badge.local {
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Result Blocks */
.ai-result-block {
  padding: 20px;
  border-left: 3px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.ai-result-block:last-child {
  border-radius: 0 0 14px 14px;
}

.ai-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 1rem;
  color: #1e293b;
  flex-wrap: wrap;
}

.ai-block-header i {
  font-size: 1.1rem;
  color: #475569;
}

.ai-block-header strong {
  color: #1e293b;
}

.ai-count-badge {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ai-count-badge.common {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.ai-count-badge.unique {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Place Tags */
.ai-places-list {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 8px;
}

.ai-place-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.ai-place-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-place-tag.common {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.ai-place-tag.common i {
  color: #0d9488;
}

.ai-place-tag.unique {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.ai-place-tag.unique i {
  color: #b45309;
}

/* Common block */
.ai-result-block.ai-common {
  border-left-color: #0d9488;
  background: #f0fdf4;
}

.ai-result-block.ai-common .ai-block-header i {
  color: #0d9488;
}

/* Shared block (บางทัวร์ไปเหมือนกัน) */
.ai-result-block.ai-shared {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

.ai-result-block.ai-shared .ai-block-header i {
  color: #3b82f6;
}

.ai-place-tag.shared {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.ai-place-tag.shared i {
  color: #3b82f6;
}

.ai-place-tag .shared-tour-count {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-left: 2px;
}

.ai-count-badge.shared {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.ai-tour-code {
  display: inline-block;
  background: #e2e8f0;
  color: #1e293b;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: monospace;
  margin-right: 4px;
  letter-spacing: 0.5px;
}

/* Unique block */
.ai-result-block.ai-unique {
  border-left-color: #d97706;
  background: #fffbeb;
}

.ai-result-block.ai-unique .ai-block-header i {
  color: #b45309;
}

.ai-unique-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.ai-unique-tour {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.3s ease;
}

.ai-unique-tour:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.ai-unique-tour-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.ai-unique-tour-name i {
  color: #64748b;
}

.ai-no-unique {
  color: #94a3b8;
  font-size: 0.85rem;
  font-style: italic;
}

.ai-total-places {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.84rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-total-places i {
  color: #0d9488;
}

.ai-total-places strong {
  color: #0d9488;
  font-size: 1rem;
}

.ai-total-places small {
  color: #94a3b8;
  font-size: 0.75rem;
}

.ai-no-data {
  color: #94a3b8;
  font-style: italic;
  margin: 0;
}

/* Strengths block */
.ai-result-block.ai-strengths {
  border-left-color: #6366f1;
  background: #f5f3ff;
}

.ai-result-block.ai-strengths .ai-block-header i {
  color: #6366f1;
}

.ai-strengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.ai-strength-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.ai-strength-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.ai-strength-tour-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.ai-strength-text {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.7;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ai-strength-text i {
  color: #d97706;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Recommendation block */
.ai-result-block.ai-recommendation {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

.ai-result-block.ai-recommendation .ai-block-header i {
  color: #3b82f6;
}

.ai-recommendation-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #334155;
  padding: 14px 18px;
  background: #ffffff;
  border-radius: 10px;
  border-left: 4px solid #3b82f6;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Disclaimer */
.ai-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.7;
}

.ai-disclaimer i {
  color: #94a3b8;
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.ai-disclaimer strong {
  color: #475569;
}

/* AI Responsive */
@media (max-width: 768px) {
  .ai-highlights-trigger {
    padding: 20px 15px;
  }

  .btn-ai-analyze {
    font-size: 0.92rem;
    padding: 12px 24px;
  }

  .ai-result-header {
    flex-direction: column;
    text-align: center;
  }

  .ai-unique-grid,
  .ai-strengths-grid {
    grid-template-columns: 1fr;
  }

  .ai-result-block {
    padding: 15px;
  }

  .ai-place-tag {
    font-size: 0.82rem;
    padding: 5px 10px;
  }
}
