/**
 * Manual Tour Reviews – Cleaned CSS file
 * Đảm bảo đặt sau slick.css và slick-theme.css khi enqueue.
 */

/* Container chính */
.mtr-container {
    max-width: 100%;
    margin: 20px 0;
}

/* Tabs */
.mtr-tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
    display: flex;
    border-bottom: 2px solid #ddd;
}
.mtr-tab-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
    padding: 5px 5px;
    cursor: pointer;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: all .2s ease-in-out;
    position: relative;
}
.mtr-tabs li.mtr-tab-item{
	margin-bottom: 1.3em;
}

.mtr-tab-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 6px;
}
.mtr-tab-label {
    font-size: 15px;
    color: inherit;
}
.mtr-tab-item.active .mtr-tab-label,
.mtr-tab-item:hover .mtr-tab-label,
.mtr-tab-item.active {
    color: #000;
    border-bottom-color: #000;
}

/* Tab content */
.mtr-tab-content {
    display: none;
}
.mtr-tab-content.active {
    display: block;
}

/* Slick Slider */
.mtr-slider .mtr-slide {
    padding: 0 10px;
}
.mtr-slider .slick-slide {
    outline: none;
}

/* Review Item */
.mtr-review-item,
.mtr-review-card {
    background-color: #fff;
    border: 1px solid #ececec;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.mtr-review-item {
    display: flex;
    padding: 10px;
    margin: 5px 0;
}
.mtr-review-card {
    display: flex;
    flex-direction: column;
    padding: 12px;
    height: 100%;
    margin: 5px 0;
}

/* Author photo */
.mtr-author-photo,
.mtr-author-photo-placeholder {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}


/* Review main/container */
.mtr-review-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Review header (logo + tên + ngày) */
.mtr-review-header,
.mtr-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.mtr-card-header {
    margin-bottom: 8px;
}
.mtr-card-author {
    display: flex;
    align-items: center;
}
.mtr-card-author-info,
.mtr-author-and-date {
    display: flex;
    flex-direction: column;
}
.mtr-author-name,
.mtr-card-author-info .mtr-author-name {
    font-size: 15px;
    font-weight: bold;
    color: #222;
    margin-bottom: 2px;
}
.mtr-review-date,
.mtr-card-author-info .mtr-review-date {
    font-size: 12px;
    color: #666;
}
.mtr-platform-logo,
.mtr-platform-badge,
.mtr-platform-badge-summary {
    object-fit: contain;
}
.mtr-platform-logo {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}
.mtr-platform-badge {
    width: 20px;
    height: 20px;
    margin-left: 8px;
}
.mtr-platform-badge-summary {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}
@media (max-width: 768px) {
    .mtr-card-header,
    .mtr-review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .mtr-card-author {
        margin-bottom: 6px;
    }
    .mtr-platform-badge,
    .mtr-platform-badge-summary {
        align-self: flex-end;
        margin-left: 0;
        margin-bottom: 6px;
    }
    .mtr-card-author-info,
    .mtr-author-and-date {
        align-items: left;
    }
}

/* Text wrapper and Read more */
.mtr-text-wrapper {
    position: relative;
    flex: 1;
}
.mtr-review-content {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    margin: 0;
    line-height: 21.75px;
    font-size: 15px;
    color: #333;
}
.mtr-review-content.expanded {
    -webkit-line-clamp: unset;
}
.mtr-read-more {
    display: inline-block;
    margin-top: 5px;
    font-size: 13px;
    font-weight: bold;
    color: #0073aa;
    cursor: pointer;
}
.mtr-read-more:hover {
    text-decoration: underline;
}

/* No reviews placeholder */
.mtr-no-reviews {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 20px 0;
}

/* Summary Row (All reviews + từng nền tảng) */
.mtr-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #ececec;
    border-radius: 4px;
    background-color: #fff;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.mtr-summary-left {
    display: flex;
    align-items: center;
	font-weight: bold;
}
.mtr-summary-label {
    font-weight: bold;
    font-size: 15px;
    color: #222;
    margin-right: 8px;
}

.mtr-summary-average {
    font-size: 15px;
    color: #333;
    margin-right: 8px;
}
.mtr-summary-sep {
    margin: 0 8px;
    color: #888;
}
.mtr-summary-count {
    font-size: 15px;
    color: #555;
}
.mtr-summary-right .mtr-write-review-btn {
    display: inline-block;
    padding: 6px 16px;
    background-color: #0073aa;
    color: #fff !important;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.mtr-summary-right .mtr-write-review-btn:hover {
    background-color: #005f8d;
}

/* Review cards under slider */
.mtr-review-card {
    display: flex;
    flex-direction: column;
}
.mtr-card-rating, .mtr-summary-stars {
    margin-bottom: 3px;
	margin-right: 8px;
}
.mtr-review-card .mtr-review-date,
.mtr-review-card .mtr-author-name {
    /* inherited from above */
}
.mtr-slider-all .mtr-slide,
.mtr-slider-google .mtr-slide,
.mtr-slider-tripadvisor .mtr-slide,
.mtr-slider-airbnb .mtr-slide,
.mtr-slider-viator .mtr-slide {
    padding: 0 8px;
}

/* Responsive for cards */
@media (max-width: 768px) {
    .mtr-review-card {
        width: 100% !important;
    }
}

/* ========== SVG Stars ========== */
.mtr-star {
    width: 14px;
    height: 14px;
    margin-right: 2px;
    vertical-align: middle;
    display: inline-block !important;
}

.mtr-summary-stars .mtr-star {
    width: 14px;
    height: 14px;
}


/* Nếu dùng SVG đã tô sẵn màu, không cần filter. 
   Nếu chỉ dùng chung một SVG rồi ép CSS, có thể dùng filter để đổi màu:
.mtr-stars--google .mtr-star--solid { filter: hue-rotate(45deg) saturate(3); }
*/


/* -------------------------
   Responsive cho màn hình nhỏ
   ------------------------- */
@media (max-width: 600px) {
  /* === 1. Tabs: cho phép cuộn ngang === */
  .mtr-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    border-bottom: 2px solid #ddd;
    margin-bottom: 10px;
  }
  .mtr-tabs::-webkit-scrollbar {
    height: 4px;
  }
  .mtr-tabs::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
  }
  .mtr-tab-item {
    flex: none;              /* không co dãn, giữ chiều rộng tự nhiên */
    margin-right: 16px;      /* khoảng cách giữa các tab */
    padding: 8px 12px;
    font-size: 14px;
  }
  .mtr-tab-item:last-child {
    margin-right: 8px;       /* giảm margin cuối để vừa khung */
  }
  .mtr-tab-item.active {
    border-bottom-color: #000;
  }

  /* Hiển thị mũi tên điều hướng (“>”) bằng CSS, nếu cần */
 /* .mtr-tabs::after {
    content: "\276F";        
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 24px;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
    text-align: center;
    pointer-events: none;
    font-size: 18px;
    color: #888;
  }*/


  /* === 2. Summary Row (All reviews hoặc mỗi nền tảng) stacked === */
  .mtr-summary-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 12px !important;
  }
  .mtr-summary-left {
    /*flex-direction: column;
    align-items: flex-start;*/
    margin-bottom: 8px;
  }
  .mtr-summary-label {
    font-size: 16px;
  }
  .mtr-summary-average,
  .mtr-summary-sep,
  .mtr-summary-count {
    font-size: 14px;
  }
  .mtr-summary-star,
  .mtr-summary-* {
    /* không cần chỉnh thêm, chỉ làm gọn lại hiển thị */
  }

  /* Nút “Write a review” full width */
  .mtr-summary-right {
    width: 100%;
  }
  .mtr-summary-right .mtr-write-review-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 15px;
  }

  /* === 3. Slider cards: chỉ show 1 card/lần === */
  .mtr-slider .slick-slide {
    display: block !important;
    margin: 0 auto;
  }
  .mtr-slider .slick-list,
  .mtr-slider .slick-track {
    display: flex !important;
    justify-content: center;
  }

  /* === 4. Review Card: full width, stack nội dung === */
  .mtr-review-card {
    width: 100% !important;
    box-sizing: border-box;
    padding: 12px;
  }
  .mtr-card-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
  }
  .mtr-card-author {
    margin-bottom: 8px;
  }
  .mtr-card-author-info {
    margin-top: 4px;
  }
  .mtr-author-name {
    font-size: 15px;
  }
  .mtr-review-date {
    font-size: 13px;
  }
  .mtr-platform-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
  }
  .mtr-card-rating {
    margin-bottom: 10px;
  }

  /* Ẩn nếu không cần hiển thị chỗ nào dài hơn 4 dòng */
  .mtr-review-content {
    -webkit-line-clamp: 4;
  }

  /* Căn chỉnh lại khoảng cách nội dung */
  .mtr-text-wrapper {
    margin-bottom: 12px;
  }

  /* Chỉnh lại phần hình ảnh tác giả (nếu quá lớn) */
  .mtr-author-photo,
  .mtr-author-photo-placeholder {
    width: 44px;
    height: 44px;
  }
}

/* ======================================================
   FIX SLIDER/CARD BỊ CẮT NỘI DUNG TRÊN MOBILE (≤600px)
   ====================================================== */
@media (max-width: 600px) {
  /* 1. Bỏ mọi fixed‐height do Slick đặt lên list/track/slide */
  .mtr-slider .slick-list,
  .mtr-slider .slick-track,
  .mtr-slider .slick-slide {
    height: auto !important;
  }

  /* 2. Cho phép overflow hiển thị (đừng để Slick ẩn nội dung) */
  .mtr-slider .slick-list,
  .mtr-slider .slick-track {
    overflow: visible !important;
  }

  /* 3. Ép card và text-wrapper luôn auto‐height */
  .mtr-review-card,
  .mtr-text-wrapper {
    height: auto !important;
  }

  /* 4. Cho phép nội dung review bung ra toàn phần */
  .mtr-review-content.expanded {
    display: block !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    height: auto !important;
  }

  /* 5. Nếu cần, bạn cũng có thể reset lại padding/margin cho card */
  .mtr-review-card {
    padding-bottom: 16px !important;
    margin-bottom: 16px !important;
  }
}
