/* trending-widget.css — Resort Trending Sections */

/* ── Section wrapper ────────────────────────────────────────────────────────── */

.tw-section {
  padding: 2.5rem 1.5rem;
  background: #fff;
  border-top: 1px solid #e8e8f0;
}

.tw-section--alt {
  background: #f8f8fd;
}

.tw-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.tw-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tw-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #e25822;
  margin-bottom: 0.25rem;
}

.tw-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.2;
}

.tw-view-all {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e25822;
  white-space: nowrap;
  text-decoration: none;
}

.tw-view-all:hover {
  text-decoration: underline;
}

/* ── Tab bar ─────────────────────────────────────────────────────────────────── */

.tw-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8e8f0;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tw-tabs::-webkit-scrollbar {
  display: none;
}

.tw-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s, border-color 0.12s;
}

.tw-tab:hover {
  color: #1a1a2e;
}

.tw-tab.active {
  color: #1a1a2e;
  border-bottom-color: #e25822;
}

/* ── Scroll track ────────────────────────────────────────────────────────────── */

.tw-track-wrap {
  position: relative;
  overflow: hidden;
}

.tw-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;  /* prevent clip of box-shadow */
}

.tw-track::-webkit-scrollbar {
  display: none;
}

/* ── Cards ───────────────────────────────────────────────────────────────────── */

.tw-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #e8e8f0;
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
  position: relative;
}

.tw-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.tw-card__badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
}

.tw-card__rank {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e25822;
  background: #fff3ef;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

.tw-card__signal {
  font-size: 0.7rem;
  font-weight: 700;
  color: #888;
}

.tw-card__signal--hot    { color: #e25822; }
.tw-card__signal--up     { color: #16a34a; }
.tw-card__signal--compare{ color: #1a6b8a; }
.tw-card__signal--saved  { color: #b8892e; }

.tw-card__name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.3;
}

.tw-card__region {
  font-size: 0.72rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tw-card__rating {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tw-card__score {
  background: #1a1a2e;
  color: #fff;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
}

.tw-card__stars {
  font-size: 0.65rem;
  color: #d4a843;
  letter-spacing: 0.04em;
}

/* Score bar for trending */
.tw-card__bar-wrap {
  background: #f0f0f8;
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.tw-card__bar {
  height: 100%;
  background: linear-gradient(90deg, #e25822, #d4a843);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Growth pill */
.tw-card__growth {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border-radius: 10px;
  padding: 0.1rem 0.5rem;
  margin-top: auto;
}

.tw-card__growth--new {
  color: #e25822;
  background: #fff3ef;
}

/* ── Compact strip (hotel detail pages) ─────────────────────────────────────── */

.tw-strip {
  padding: 1.5rem;
  background: #f8f8fd;
  border-top: 1px solid #e8e8f0;
  border-bottom: 1px solid #e8e8f0;
}

.tw-strip .tw-title {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.tw-strip .tw-card {
  flex: 0 0 180px;
}

.tw-strip .tw-card__name {
  font-size: 0.82rem;
}

/* ── Loading / empty states ─────────────────────────────────────────────────── */

.tw-loading,
.tw-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: #aaa;
  font-size: 0.85rem;
}

.tw-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid #e8e8f0;
  border-top-color: #e25822;
  border-radius: 50%;
  animation: tw-spin 0.7s linear infinite;
  margin-right: 0.75rem;
}

@keyframes tw-spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .tw-section {
    padding: 2rem 1rem;
  }

  .tw-card {
    flex: 0 0 180px;
  }

  .tw-title {
    font-size: 1.1rem;
  }

  .tw-tabs {
    gap: 0;
  }

  .tw-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
  }
}

/* ── Dark mode ───────────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  .tw-section {
    background: #0f0f1a;
    border-color: #1e1e30;
  }

  .tw-section--alt {
    background: #0a0a12;
  }

  .tw-title {
    color: #e8e8f4;
  }

  .tw-tabs {
    border-color: #2a2a3e;
  }

  .tw-tab.active {
    color: #e8e8f4;
  }

  .tw-card {
    background: #0f0f1a;
    border-color: #1e1e30;
  }

  .tw-card__name {
    color: #e8e8f4;
  }

  .tw-card__region {
    color: #666;
  }

  .tw-card__bar-wrap {
    background: #1a1a2e;
  }

  .tw-strip {
    background: #0a0a12;
    border-color: #1e1e30;
  }
}
