/**
 * TourSure Package Tour List - Compact Styles
 * File: /css/toursure-pg-all.css
 * Version: 2.0.0 - Compact Design
 */

/* ========================================
   Container & Layout
   ======================================== */

.ts-tour-container-xr7 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.ts-tour-list-xr7 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 31px;
  margin-bottom: 32px;
  min-height: 400px;
}

/* ========================================
   Tour Card - Compact Layout
   ======================================== */

.ts-tour-card-xr7 {
  display: grid;
  grid-template-columns: 280px 1fr auto;
  grid-template-rows: auto auto;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  min-height: 220px;
}

.ts-tour-card-xr7.ts-fade-in-xr7 {
  opacity: 1;
  transform: translateY(0);
}

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

/* ========================================
   Card Image Section (Left Side)
   ======================================== */

.ts-card-image-wrapper-xr7 {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
  grid-row: 1 / -1; /* Span all rows */
}

.ts-card-image-xr7 {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 170px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px 0 0 8px;
}

.ts-card-image-xr7 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.ts-tour-card-xr7:hover .ts-card-image-xr7 img {
  transform: scale(1.05);
}

.ts-no-image-xr7 {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.5);
}

.ts-no-image-xr7 svg {
  width: 40px;
  height: 40px;
}

/* Wishlist Button */
.ts-wishlist-btn-xr7 {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ts-wishlist-btn-xr7 svg {
  width: 18px;
  height: 18px;
  stroke: #666;
  stroke-width: 2;
  fill: none;
  transition: all 0.3s ease;
}

.ts-wishlist-btn-xr7:hover {
  background: #fff;
  transform: scale(1.1);
}

.ts-wishlist-btn-xr7:hover svg {
  stroke: #e74c3c;
}

.ts-wishlist-btn-xr7.ts-active-xr7 {
  background: #e74c3c;
}

.ts-wishlist-btn-xr7.ts-active-xr7 svg {
  fill: #fff;
  stroke: #fff;
}

/* Map Section - Google Map */
.ts-card-map-xr7 {
  width: 100%;
  height: 113px;
  /* 2/3 of image height (170px * 2/3) */
  background: #f8f9fa;
  overflow: hidden;
  position: relative;
  margin-top: 10px;
  /* Space between image and map */
  border-radius: 8px;
  /* Rounded corners on all sides */
}

.ts-card-map-xr7 iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* ========================================
   Card Content (Middle Section)
   ======================================== */

.ts-card-content-xr7 {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-card-header-xr7 {
  min-height: 22px;
  margin-bottom: 4px;
}

.ts-badge-xr7 {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ts-badge-bestseller {
  background: #ffeaa7;
  color: #d63031;
}

.ts-badge-recommended {
  background: #74b9ff;
  color: #0984e3;
}

.ts-badge-new {
  background: #55efc4;
  color: #00b894;
}

.ts-badge-hot {
  background: #ff7675;
  color: #d63031;
}

.ts-badge-lastminute {
  background: #fdcb6e;
  color: #e17055;
}

.ts-badge-exclusive {
  background: #a29bfe;
  color: #6c5ce7;
}

/* Title */
.ts-card-title-xr7 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #2d3436;
}

.ts-card-title-xr7 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ts-card-title-xr7 a:hover {
  color: #0984e3;
}

/* Meta Information - Compact */
.ts-card-meta-xr7 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.ts-meta-row-xr7 {
  display: flex;
  font-size: 13px;
  line-height: 1.4;
}

.ts-meta-label-xr7 {
  font-weight: 600;
  color: #495057;
  min-width: 110px;
  flex-shrink: 0;
}

.ts-meta-value-xr7 {
  color: #6c757d;
  flex: 1;
}

.ts-more-destinations-xr7 {
  color: #0984e3;
  font-weight: 600;
}

/* ========================================
   Card Sidebar (Right Section - Price & Actions)
   ======================================== */

.ts-card-sidebar-xr7 {
  width: 200px;
  padding: 16px;
  background: #f8f9fa;
  border-left: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  position: relative;
}

/* Discount Badge */
.ts-discount-badge-xr7 {
  background: #e74c3c;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* Price Section */
.ts-price-section-xr7 {
  text-align: right;
  width: 100%;
}

.ts-price-from-xr7 {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 4px;
}

.ts-price-from-xr7 del {
  color: #adb5bd;
  text-decoration: line-through;
}

.ts-price-current-xr7 {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ts-price-amount-xr7 {
  font-size: 28px;
  font-weight: 800;
  color: #0984e3;
  line-height: 1;
  margin-bottom: 2px;
}

.ts-price-label-xr7 {
  font-size: 11px;
  color: #6c757d;
}

.ts-price-contact-xr7 {
  font-size: 16px;
  font-weight: 700;
  color: #0984e3;
}

/* Action Buttons */
.ts-card-actions-xr7 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.ts-btn-view-tour-xr7 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: linear-gradient(135deg, #0984e3 0%, #0770c4 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(9, 132, 227, 0.3);
}

.ts-btn-view-tour-xr7:hover {
  background: linear-gradient(135deg, #0770c4 0%, #0660ab 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(9, 132, 227, 0.4);
}

.ts-btn-download-xr7 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: transparent;
  color: #0984e3;
  text-decoration: none;
  border: 2px solid #0984e3;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.3s ease;
}

.ts-btn-download-xr7:hover {
  background: #0984e3;
  color: #ffffff;
}

/* ========================================
   Pagination
   ======================================== */

.ts-pagination-xr7 {
  display: flex;
  justify-content: center;
  margin: 32px 0 20px;
}

.ts-pagination-wrapper-xr7 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.ts-page-btn-xr7 {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #ffffff;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  color: #495057;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ts-page-btn-xr7:hover:not(.ts-active-xr7) {
  background: #f8f9fa;
  border-color: #0984e3;
  color: #0984e3;
}

.ts-page-btn-xr7.ts-active-xr7 {
  background: #0984e3;
  border-color: #0984e3;
  color: #ffffff;
  cursor: default;
}

.ts-page-btn-xr7 svg {
  width: 18px;
  height: 18px;
}

.ts-page-dots-xr7 {
  padding: 0 6px;
  color: #adb5bd;
}

.ts-page-numbers-xr7 {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========================================
   Loading Skeleton
   ======================================== */

.ts-skeleton-card-xr7 {
  pointer-events: none;
  opacity: 1 !important;
  transform: none !important;
}

.ts-skeleton-image-xr7,
.ts-skeleton-map-xr7,
.ts-skeleton-badge-xr7,
.ts-skeleton-title-xr7,
.ts-skeleton-line-xr7,
.ts-skeleton-price-xr7,
.ts-skeleton-button-xr7 {
  background: linear-gradient(90deg,
      #f0f0f0 0%,
      #e0e0e0 20%,
      #f0f0f0 40%,
      #f0f0f0 100%);
  background-size: 200% 100%;
  animation: tsSkeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

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

  100% {
    background-position: 200% 0;
  }
}

.ts-skeleton-card-xr7 .ts-card-image-xr7 {
  background: transparent;
}

.ts-skeleton-image-xr7 {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.ts-skeleton-map-xr7 {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.ts-skeleton-badge-xr7 {
  width: 70px;
  height: 20px;
  margin-bottom: 8px;
}

.ts-skeleton-title-xr7 {
  width: 90%;
  height: 22px;
  margin-bottom: 12px;
}

.ts-skeleton-line-xr7 {
  width: 100%;
  height: 14px;
  margin-bottom: 6px;
}

.ts-skeleton-line-xr7:last-child {
  width: 75%;
}

.ts-skeleton-price-xr7 {
  width: 140px;
  height: 32px;
  margin-bottom: 12px;
}

.ts-skeleton-button-xr7 {
  width: 100%;
  height: 40px;
  margin-bottom: 8px;
}

/* ========================================
   Messages
   ======================================== */

.ts-no-results-xr7,
.ts-error-message-xr7 {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.ts-error-message-xr7 svg {
  margin-bottom: 16px;
}

.ts-no-results-xr7 p,
.ts-error-message-xr7 p {
  font-size: 16px;
  margin: 0 0 16px;
  font-weight: 600;
}

.ts-retry-btn-xr7 {
  padding: 10px 20px;
  background: #0984e3;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ts-retry-btn-xr7:hover {
  background: #0770c4;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 1023px) {
  .ts-tour-card-xr7 {
    grid-template-columns: 240px 1fr auto;
  }

  .ts-card-image-xr7 {
    height: 150px;
  }

  .ts-card-map-xr7 {
    height: 100px;
    /* 2/3 of 150px */
  }

  .ts-card-sidebar-xr7 {
    width: 180px;
    padding: 12px;
  }

  .ts-price-amount-xr7 {
    font-size: 24px;
  }

  .ts-card-content-xr7 {
    padding: 12px 16px;
  }

  .ts-card-title-xr7 {
    font-size: 16px;
  }

  .ts-meta-row-xr7 {
    font-size: 12px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .ts-tour-container-xr7 {
    padding: 12px;
  }

  .ts-tour-list-xr7 {
    gap: 31px;
  }

  .ts-tour-card-xr7 {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .ts-card-image-wrapper-xr7 {
    width: 100%;
    border-radius: 8px 8px 0 0;
    /* Rounded on top only for mobile */
  }

  .ts-card-image-xr7 {
    height: 200px;
    border-radius: 8px;
    /* Rounded corners on all sides */
  }

  .ts-card-map-xr7 {
    height: 133px;
    /* 2/3 of mobile image height */
    margin-top: 10px;
    /* Space between image and map */
    border-radius: 8px;
    /* Rounded corners on all sides */
  }

  .ts-card-content-xr7 {
    padding: 16px;
  }

  .ts-card-sidebar-xr7 {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e9ecef;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .ts-price-section-xr7 {
    text-align: left;
  }

  .ts-price-current-xr7 {
    align-items: flex-start;
  }

  .ts-card-actions-xr7 {
    flex-direction: row;
    width: auto;
    margin-top: 0;
  }

  .ts-btn-view-tour-xr7,
  .ts-btn-download-xr7 {
    flex: 1;
    font-size: 12px;
    padding: 10px 16px;
  }

  .ts-discount-badge-xr7 {
    position: absolute;
    top: 12px;
    right: 12px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .ts-card-sidebar-xr7 {
    flex-direction: column;
    align-items: stretch;
  }

  .ts-price-section-xr7 {
    text-align: center;
  }

  .ts-price-current-xr7 {
    align-items: center;
  }

  .ts-card-actions-xr7 {
    width: 100%;
  }
}

/* ========================================
   Accessibility
   ======================================== */

.ts-tour-card-xr7:focus-within {
  outline: 2px solid #0984e3;
  outline-offset: 2px;
}

.ts-btn-view-tour-xr7:focus,
.ts-btn-download-xr7:focus,
.ts-page-btn-xr7:focus,
.ts-wishlist-btn-xr7:focus {
  outline: 2px solid #0984e3;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {

  .ts-pagination-xr7,
  .ts-wishlist-btn-xr7,
  .ts-discount-badge-xr7,
  .ts-btn-download-xr7 {
    display: none !important;
  }

  .ts-tour-card-xr7 {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ========================================
   Badge + Star Row
   ======================================== */

.ts-badge-star-row-xr7 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ts-badge-star-row-xr7 .ts-badge-xr7 {
  flex-shrink: 0;
  font-size: 10px;
  padding: 3px 8px;
}

/* ========================================
   Star Rating Styles
   ======================================== */

.ts-star-rating-xr7 {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin: 0;
  line-height: 1;
}

.ts-star-rating-xr7 .ts-star {
  cursor: default;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ts-star-rating-xr7 .ts-star svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* Empty star - gray color */
.ts-star-rating-xr7 .ts-star svg {
  fill: #D1D5DB;
}

/* Filled star - gold color */
.ts-star-rating-xr7 .ts-star.ts-star-filled svg {
  fill: #F59E0B;
}

/* Editable stars for admin - clickable */
.ts-star-rating-xr7.ts-star-editable .ts-star {
  cursor: pointer;
}

.ts-star-rating-xr7.ts-star-editable .ts-star:hover {
  transform: scale(1.15);
}

/* Hover effect - show gold preview */
.ts-star-rating-xr7.ts-star-editable .ts-star.ts-star-hover svg {
  fill: #FBBF24 !important;
}

/* Loading state */
.ts-star-rating-xr7.ts-star-loading {
  opacity: 0.5;
  pointer-events: none;
}

.ts-star-rating-xr7.ts-star-loading .ts-star {
  animation: starPulse 0.8s infinite ease-in-out;
}

@keyframes starPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Success animation after update */
.ts-star-rating-xr7.ts-star-success .ts-star.ts-star-filled svg {
  animation: starBounce 0.3s ease;
}

@keyframes starBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}
