/*
 * VeloValue — Core Component Styles
 * Verdict box · Specs table · TOC · Breadcrumbs · Rank table
 *
 * Pro-Tour 2010s aesthetic — Team Sky palette.
 * Inherits design tokens from style.css :root.
 */

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.vv-breadcrumb {
  font-size: .8125rem;
  margin-bottom: 1.25rem;
  color: var(--vv-gray-400);
  font-family: var(--vv-font-body);
}

.vv-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .3rem;
}

.vv-breadcrumb__item a {
  color: var(--vv-sky);
  text-decoration: none;
  font-weight: 500;
}
.vv-breadcrumb__item a:hover {
  text-decoration: underline;
  color: var(--vv-sky-dark);
}
.vv-breadcrumb__item--current {
  color: var(--vv-gray-600);
}

.vv-breadcrumb__sep-item {
  list-style: none;
  padding: 0;
  color: var(--vv-gray-400);
  opacity: .5;
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */
.vv-toc {
  background: var(--vv-gray-100);
  border: none;
  border-left: 4px solid var(--vv-sky);
  border-radius: var(--vv-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  max-width: 640px;
  box-shadow: var(--vv-shadow);
}

.vv-toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.vv-toc__title {
  font-family: var(--vv-font-heading);
  font-weight: 700;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--vv-black);
}

.vv-toc__toggle {
  background: none;
  border: 1px solid var(--vv-gray-200);
  border-radius: var(--vv-radius);
  cursor: pointer;
  font-size: .7rem;
  padding: .2rem .5rem;
  color: var(--vv-gray-600);
  font-family: var(--vv-font-body);
}
.vv-toc__toggle:hover {
  background: var(--vv-gray-200);
}

.vv-toc__list {
  margin: 0;
  padding-left: 1.25rem;
  list-style: decimal;
}
.vv-toc__list[hidden] {
  display: none;
}

.vv-toc__item {
  margin: .3rem 0;
  line-height: 1.45;
  font-size: .9rem;
}

.vv-toc__item--h3 {
  padding-left: 1rem;
  font-size: .85em;
  list-style-type: lower-alpha;
}

.vv-toc__link {
  color: var(--vv-sky);
  text-decoration: none;
}
.vv-toc__link:hover,
.vv-toc__link.active {
  text-decoration: underline;
  color: var(--vv-sky-dark);
  font-weight: 600;
}

/* ==========================================================================
   Specs Table
   ========================================================================== */
.vv-specs-wrap {
  overflow-x: auto;
  margin: 2rem 0;
}

.vv-specs {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  box-shadow: var(--vv-shadow);
  border-radius: var(--vv-radius);
  overflow: hidden;
}

.vv-specs caption {
  caption-side: top;
  text-align: left;
  font-family: var(--vv-font-heading);
  font-weight: 700;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .6rem 0;
  color: var(--vv-black);
}

.vv-specs thead tr {
  background: var(--vv-black);
  color: var(--vv-white);
}

.vv-specs thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-family: var(--vv-font-heading);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.vv-specs tbody tr:nth-child(even) {
  background: var(--vv-gray-100);
}

.vv-specs tbody th,
.vv-specs tbody td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--vv-gray-200);
  vertical-align: middle;
}

.vv-specs tbody th {
  font-weight: 600;
  color: var(--vv-black);
  width: 45%;
}

.vv-specs tbody td {
  font-family: var(--vv-font-mono);
  font-size: .8125rem;
  color: var(--vv-gray-600);
}

/* ==========================================================================
   Verdict Box — Sky-blue left accent
   ========================================================================== */
.vv-verdict {
  border: none;
  border-left: 5px solid var(--vv-sky);
  border-radius: var(--vv-radius);
  overflow: hidden;
  margin: 2.5rem 0;
  box-shadow: var(--vv-shadow-md);
  background: var(--vv-white);
}

.vv-verdict__header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--vv-gray-100);
  border-bottom: 1px solid var(--vv-gray-200);
}

.vv-verdict__score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-width: 72px;
  padding: .6rem .85rem;
  border-radius: var(--vv-radius);
  font-weight: 800;
  line-height: 1;
  color: var(--vv-white);
  font-family: var(--vv-font-heading);
}

.vv-verdict__score--good { background: var(--vv-color-good); }
.vv-verdict__score--mid  { background: var(--vv-color-mid);  }
.vv-verdict__score--low  { background: var(--vv-color-low);  }

.vv-verdict__score-num {
  font-size: 2.25rem;
}
.vv-verdict__score-max {
  font-size: .875rem;
  opacity: .7;
  margin-left: 2px;
}

.vv-verdict__label {
  font-family: var(--vv-font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--vv-black);
}

.vv-verdict__body {
  padding: 1.25rem 1.5rem;
  color: var(--vv-color-text);
  line-height: 1.75;
}

.vv-verdict__body p:last-child {
  margin-bottom: 0;
}

.vv-verdict__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--vv-gray-100);
  border-top: 1px solid var(--vv-gray-200);
}

.vv-verdict__price {
  font-family: var(--vv-font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--vv-black);
}

/* .vv-verdict__btn inherits carbon fiber pattern from style.css */

/* ==========================================================================
   Rank Table
   ========================================================================== */
.vv-rank {
  margin: 2.5rem 0;
}

.vv-rank__title {
  font-family: var(--vv-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 3px solid var(--vv-sky);
  color: var(--vv-black);
}

.vv-rank__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.vv-rank__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 1.25rem;
  background: var(--vv-white);
  border: none;
  border-radius: var(--vv-radius);
  box-shadow: var(--vv-shadow);
  transition: box-shadow .15s ease, transform .1s ease;
}

.vv-rank__item:hover {
  box-shadow: var(--vv-shadow-md);
  transform: translateY(-1px);
}

/* Rank badge */
.vv-rank__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--vv-radius);
  background: var(--vv-black);
  color: var(--vv-white);
  font-family: var(--vv-font-heading);
  font-size: .875rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Gold/silver/bronze for top 3 */
.vv-rank__item[data-rank="1"] .vv-rank__badge { background: #f59e0b; }
.vv-rank__item[data-rank="2"] .vv-rank__badge { background: #9ca3af; }
.vv-rank__item[data-rank="3"] .vv-rank__badge { background: #b45309; }

/* Thumbnail */
.vv-rank__thumb-link {
  flex-shrink: 0;
}
.vv-rank__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--vv-radius);
  display: block;
}

/* Product info */
.vv-rank__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.vv-rank__name {
  font-family: var(--vv-font-heading);
  font-weight: 700;
  font-size: .9375rem;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--vv-black);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vv-rank__name:hover {
  color: var(--vv-sky);
}

.vv-rank__price {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--vv-gray-600);
}

/* Score */
.vv-rank__score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding: .4rem .7rem;
  border-radius: var(--vv-radius);
  color: var(--vv-white);
  font-weight: 800;
  font-family: var(--vv-font-heading);
  flex-shrink: 0;
  line-height: 1;
}
.vv-rank__score--good { background: var(--vv-color-good); }
.vv-rank__score--mid  { background: var(--vv-color-mid);  }
.vv-rank__score--low  { background: var(--vv-color-low);  }

.vv-rank__score-num   { font-size: 1.25rem; }
.vv-rank__score-denom { font-size: .65rem; opacity: .7; margin-left: 1px; }

/* .vv-rank__btn inherits carbon fiber pattern from style.css */

.vv-rank__empty {
  color: var(--vv-gray-600);
  font-style: italic;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 600px) {
  .vv-verdict__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .vv-verdict__cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .vv-verdict__btn {
    width: 100%;
    text-align: center;
  }

  .vv-rank__item {
    flex-wrap: wrap;
    gap: .5rem;
  }

  .vv-rank__thumb {
    width: 48px;
    height: 48px;
  }

  .vv-rank__btn {
    width: 100%;
    text-align: center;
    order: 5;
  }

  .vv-rank__score {
    margin-left: auto;
  }
}
