/* Extracted styles for vd-rail tier markup */

/* ---- VARIABILI COMPONENTE ---- */
.vdrt-rail {
  --ink: #0a0a0a;
  --muted: #555;
  --glass1: rgba(255, 255, 255, 0.12);
  --glass-stroke: #e0ded9;
}

/* ---- WRAPPER VETROSO UNICO (DESKTOP) ---- */
.vdrt-rail-bg {
  width: 100%;
  background: var(--glass1);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid var(--glass-stroke);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* ---- RAIL MOBILE (CAROSELLO) ---- */
.vdrt-rail {
  --pad-x: 0px;
  --gap: 16px;
}

.vdrt-track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  padding: 0 var(--pad-x);
  width: 100%;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

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

.vdrt-slot {
  flex: 0 0 calc(100% - var(--pad-x) * 2);
  max-width: calc(100% - var(--pad-x) * 2);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

/* ---- PAGER MOBILE ---- */
.vdrt-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
}

.vdrt-dot {
  all: unset;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: 0.2s;
}

.vdrt-dot[aria-current="true"] {
  background: rgba(0, 0, 0, 0.85);
  border-color: rgba(0, 0, 0, 0.85);
  transform: scale(1.15);
}

/* ---- CARD ---- */
.vdrt-tier {
  background: none;
  border: none;
  box-shadow: none;
  margin: 32px auto;
  max-width: 920px;
  padding: 24px 18px;
  line-height: 1.55;
}

.vdrt-tier-wrap {
  display: grid;
  gap: 20px;
}

/* ---- HEADER TESTI ---- */
.vdrt-head {
  text-align: center;
}

.vdrt-title {
  font-size: clamp(1.25rem, 3.2vw, 1.9rem);
  font-weight: 700;
  margin: 0;
}

.vdrt-sub {
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  color: var(--muted);
  margin: 0.35rem 0 0.6rem;
}

.vdrt-price {
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 700;
  margin: 0;
  text-align: center;
}

/* ---- CTA ---- */
.vdrt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 22px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.vdrt-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.vdrt-btn:hover::before {
  transform: translateX(120%);
}

.vdrt-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* CTA centrali */
.vdrt-cta-top,
.vdrt-cta-btm {
  display: flex;
  justify-content: center;
}

/* ---- LISTE ---- */
.vdrt-includes,
.vdrt-tech {
  background: var(--glass1);
  border: 1px solid var(--glass-stroke);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.vdrt-includes h3,
.vdrt-extra-wrap h4,
.vdrt-tech-content h4 {
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.vdrt-tech-content li,
.vdrt-extra-wrap li,
.vdrt-includes p {
  font-size: 0.9em;
  line-height: 1.47;
}

.vdrt-tech-content ul,
.vdrt-extra-wrap ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.vdrt-tech-content li::before,
.vdrt-extra-wrap li::before {
  content: "•";
  margin-right: 6px;
  opacity: 0.85;
}

/* ---- TOGGLE ---- */
.vdrt-toggle-wrap {
  text-align: center;
}

.vdrt-extra {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height 0.6s ease, opacity 0.5s ease;
}

.vdrt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: #4a4a4a;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.vdrt-toggle:hover {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.vdrt-toggle:hover,
.vdrt-toggle:focus,
.vdrt-toggle:active {
  background: transparent !important;
  box-shadow: none !important;
  color: #1c1c1c;
}

.vdrt-arrow {
  transition: transform 0.3s ease;
}

.vdrt-toggle.open .vdrt-arrow {
  transform: rotate(180deg);
}

/* ---- DESKTOP ---- */
@media (min-width: 1024px) {
  .vdrt-pager {
    display: none;
  }

  .vdrt-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    overflow: visible;
    padding: 0;
    background: none;
    border: none;
  }

  .vdrt-tier-wrap {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: #ededed;
    text-align: left;
  }

  .vdrt-slot {
    position: relative;
  }

  .vdrt-slot:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
      to bottom,
      rgba(224, 222, 217, 0) 0%,
      rgba(224, 222, 217, 0.65) 40%,
      rgba(224, 222, 217, 0.65) 60%,
      rgba(224, 222, 217, 0) 100%
    );
    pointer-events: none;
  }

  .vdrt-more-anchor {
    display: none;
  }

  .vdrt-toggle-wrap {
    display: block;
  }

  .vdrt-toggle.open ~ .vdrt-extra {
    height: auto;
    opacity: 1;
    overflow: visible;
  }
}
