/*
 * Copyright (c) 2026 iCerya (icerya.com). All Rights Reserved.
 *
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Apple Public Source License
 * Version 2.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://www.opensource.apple.com/apsl/ and read it before using this file.
 *
 * The Original Code and all software distributed under the License are
 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 * EXPRESS OR IMPLIED, AND ICERYA HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
 * Please see the License for the specific language governing rights and
 * limitations under the License.
 */

iconify-icon {
  vertical-align: -0.125em;
}

.tb-page-wrapper {
  margin-top: calc(var(--nav-height, 0px) + 60px);
}

.tb-hero {
  margin-bottom: 60px;
  text-align: center;
}

.tb-title {
  font-size: 48px;
  font-weight: 900;
  margin: 0 0 50px 0;
  letter-spacing: -0.04em;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.tb-progress-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.tb-progress-label {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tb-progress-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
}

.tb-progress-bar-bg {
  flex: 1;
  height: 16px;
  background: rgba(128, 128, 128, 0.15);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tb-progress-bar-fill {
  height: 100%;
  background-color: rgba(var(--adt-colorBoard-Green));
  border-radius: 10px;
  transition: width 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.4);
}

.tb-progress-percent {
  font-family: "SF Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.tb-progress-desc {
  font-size: 14px;
  color: var(--text-secondary, rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50)));
  margin: 0;
}

.tb-dashboard-card {
  background: var(--card-bg, rgba(var(--adt-colorBoard-White) / var(--adt-colorAlpha-71)));
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 32px;
  display: flex;
  gap: 50px;
  padding: 50px;
  margin-bottom: 80px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

.tb-dash-left {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
  color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 700;
  width: fit-content;
  margin-bottom: 40px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.tb-pill .sub-text {
  opacity: 0.7;
  margin-left: 8px;
  font-weight: 500;
}

.tb-stats-group {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 40px;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.tb-stat-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.tb-num {
  font-size: 64px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -2px;
}

.tb-unit {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary, rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50)));
}

.tb-desc {
  font-size: 16px;
  color: var(--text-secondary, rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50)));
  margin-left: 10px;
}

.tb-distance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--adt-colorBoard-Blue) / var(--adt-colorAlpha-7));
  color: rgba(var(--adt-colorBoard-Blue) / var(--adt-colorAlpha-100));
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 15px;
}

.tb-unlocked-title {
  font-size: 13px;
  font-weight: 700;
  padding: 12px 0;
  color: var(--text-secondary, rgba(var(--adt-colorBoard-Label) / 1));
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 16px;
}

.tb-city-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.city-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(128, 128, 128, 0.08);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
  transition: transform 0.2s, background 0.2s;
}

.city-pill:hover {
  transform: scale(1.03);
  background: rgba(128, 128, 128, 0.15);
}

.tb-dash-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tb-next-cover {
  width: 100%;
  height: 260px;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tb-next-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.tb-next-cover:hover img {
  transform: scale(1.05);
}

.tb-next-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.tb-next-title {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.next-badge {
  background: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
  color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-100));
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tb-plans-grid {
  display: flex;
  gap: 16px;
}

.tb-plan-card {
  flex: 1;
  border: 1px solid rgba(128, 128, 128, 0.15);
  border-radius: 20px;
  padding: 24px;
  background: rgba(128, 128, 128, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-plan-card.active {
  border-color: transparent;
  background: rgba(var(--adt-colorBoard-Label) / 1);
  color: rgba(var(--adt-colorBoard-buttonLabel) / 1);
  box-shadow: 0 12px 24px rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-24));
  transform: translateY(-4px);
}

.tb-plan-card.active p {
  color: rgba(var(--adt-colorBoard-buttonLabel) / var(--adt-colorAlpha-80));
}

.tb-plan-card h4 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 800;
}

.tb-plan-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary, rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50)));
  line-height: 1.5;
}

.tb-section-title {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
  text-align: center;
}

.tb-tickets-section {
  margin-bottom: 80px;
}

a.tb-ticket,
.tb-ticket a {
  text-decoration: none !important;
}

.tb-tickets-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.tb-ticket {
  position: relative;
  display: flex;
  background: var(--card-bg, rgba(var(--adt-colorBoard-White) / var(--adt-colorAlpha-71)));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(128, 128, 128, 0.15);
  border-radius: 18px;
  overflow: visible;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  min-height: 240px;
}

.tb-ticket:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.tb-ticket:hover .tb-ticket-right::before {
  filter: saturate(1);
}

.tb-ticket-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  padding-left: 20px;
  border-radius: 18px 18px 0 0;
  z-index: 2;
}

.tb-ticket-banner-icon {
  height: 24px;
  width: auto;
  opacity: 0.9;
}

.tb-ticket::before,
.tb-ticket::after {
  content: '';
  position: absolute;
  right: calc(33.33% - 10px);
  width: 20px;
  height: 20px;
  background: var(--adt-colorBoard-Background, #f5f5f7);
  border-radius: 50%;
  z-index: 2;
}

[data-color-mode="dark"] .tb-ticket::before,
[data-color-mode="dark"] .tb-ticket::after {
  background: var(--adt-colorBoard-Background, #0d0d0e);
}

.tb-ticket::before {
  top: calc(50% - 10px);
}

.tb-ticket::after {
  display: none;
}

.tb-ticket-left {
  flex: 2;
  padding: 52px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 18px 0 0 18px;
}

.tb-ticket-route {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tb-ticket-station {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tb-ticket-station-name {
  font-size: 24px;
  font-weight: 800;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.tb-ticket-station-code {
  font-size: 13px;
  font-weight: 600;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
  text-transform: uppercase;
}

.tb-ticket-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 2px;
  background: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-24));
  position: relative;
}

.tb-ticket-arrow::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -4px;
  width: 0;
  height: 0;
  border-left: 6px solid rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-24));
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.tb-ticket-info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.tb-ticket-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tb-ticket-info-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tb-ticket-info-value {
  font-size: 15px;
  font-weight: 600;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
}

.tb-ticket-quote-section {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(128, 128, 128, 0.1);
}

.tb-ticket-quote-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.tb-ticket-quote-content {
  font-size: 13px;
  font-style: italic;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-71));
  line-height: 1.5;
}

.tb-ticket-divider {
  position: relative;
  right: -32px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 10%,
    rgba(128, 128, 128, 0.2) 10%,
    rgba(128, 128, 128, 0.2) 20%,
    transparent 20%,
    transparent 30%,
    rgba(128, 128, 128, 0.2) 30%,
    rgba(128, 128, 128, 0.2) 40%,
    transparent 40%,
    transparent 50%,
    rgba(128, 128, 128, 0.2) 50%,
    rgba(128, 128, 128, 0.2) 60%,
    transparent 60%,
    transparent 70%,
    rgba(128, 128, 128, 0.2) 70%,
    rgba(128, 128, 128, 0.2) 80%,
    transparent 80%,
    transparent 90%,
    rgba(128, 128, 128, 0.2) 90%,
    rgba(128, 128, 128, 0.2) 100%
  );
}

.tb-ticket-right {
  flex: 1;
  padding: 52px 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 0 18px 18px 0;
}

.tb-ticket-right > * {
  position: relative;
  z-index: 1;
}

.tb-ticket-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--ticket-bg-img, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 100%);
  filter: saturate(0.2);
  transition: filter 0.3s ease;
  z-index: -1;
}

.tb-ticket-quote {
  font-size: 14px;
  font-style: italic;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-71));
  line-height: 1.6;
}

.tb-ticket-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-50));
  align-items: center;
}

.tb-ticket-meta iconify-icon {
  font-size: 16px;
}

.tb-ticket-stamp {
  width: 48px;
  height: 48px;
  opacity: 0.6;
  margin-top: 8px;
}

@media (max-width: 850px) {
  .tb-ticket {
    flex-direction: column;
  }

  .tb-ticket::before {
    right: 50%;
    top: auto;
    bottom: calc(33.33% - 10px);
    transform: translateX(50%);
  }

  .tb-ticket-divider {
    display: none;
  }

  .tb-ticket-left {
    padding: 52px 20px 20px;
    border-radius: 18px 18px 0 0;
  }

  .tb-ticket-right {
    padding: 20px;
    border-top: 1px dashed rgba(128, 128, 128, 0.2);
    border-radius: 0 0 18px 18px;
  }

  .tb-ticket-route {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .tb-ticket-arrow {
    transform: rotate(90deg);
    width: 30px;
  }

  .tb-ticket-station-name {
    font-size: 20px;
  }

  .tb-ticket-info {
    gap: 16px;
  }

  .tb-ticket-banner-icon {
    height: 24px;
  }
}

@media (max-width: 850px) {
  .tb-title {
    font-size: 32px;
  }

  .tb-dashboard-card {
    flex-direction: column;
    color: rgba(var(--adt-colorBoard-Label) / var(--adt-colorAlpha-100));
    padding: 30px 20px;
    gap: 40px;
    border-radius: 24px;
  }

  .tb-plans-grid {
    flex-direction: column;
  }

  .tb-num {
    font-size: 48px;
  }
}