/**
 * Product test layout — full-width row: type tester | sticky info panel.
 */

.jt-product-test-layout {
  margin: 32px 0 56px;
}

.jt-product-test-layout__shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 var(--jt-product-shell-x, 30px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 24px;
  align-items: start;
}

.jt-product-test-layout--solo .jt-product-test-layout__shell {
  grid-template-columns: 1fr;
}

.jt-product-test-layout__content {
  grid-column: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.jt-product-test-layout__row {
  display: contents;
}

.jt-product-test-layout .jt-product-type-tester,
.jt-product-test-layout .jt-tp-product-tester {
  min-width: 0;
  margin: 0;
}

.jt-product-test-layout .jt-product-type-tester__controls {
  margin-bottom: 20px;
}

.jt-product-test-layout .jt-product-type-tester__stage-wrap {
  margin-top: 0;
}

.jt-product-info-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  position: sticky;
  top: var(--jt-sticky-top, calc(var(--jt-header-h, 72px) + 16px));
  align-self: start;
  z-index: 5;
  max-height: calc(100vh - var(--jt-sticky-top, calc(var(--jt-header-h, 72px) + 16px)) - 24px);
}

.jt-product-info-panel__frame {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - var(--jt-sticky-top, calc(var(--jt-header-h, 72px) + 16px)) - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px 22px;
  border: 1px solid var(--jt-border);
  border-radius: var(--jt-radius);
  background: var(--jt-surface);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.jt-product-info-panel__name {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.jt-product-info-panel__category {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--jt-muted, rgba(255, 255, 255, 0.55));
}

.jt-product-info-panel__license-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.jt-product-info-panel__license-head {
  margin-bottom: 16px;
}

.jt-product-info-panel__license-head-main {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vw, 10px);
  min-width: 0;
}

.jt-product-info-panel__section-title {
  margin: 0;
  font-family: "Roboto Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--jt-text);
  text-transform: none;
}

.jt-product-info-panel__section-lead {
  max-width: 46ch;
  margin: 0 0 clamp(4px, 0.8vw, 8px);
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--jt-muted, rgba(255, 255, 255, 0.55));
}

.jt-product-info-panel__section-lead [data-jt-font-family-name] {
  color: var(--jt-text);
  font-weight: 600;
}

.jt-product-info-panel__license-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.jt-product-info-panel__license-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jt-license-card {
  border: 1px solid var(--jt-border);
  border-radius: 10px;
  background: var(--jt-surface-2, #1a1a1a);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.jt-license-card.is-selected {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.03);
}

.jt-product-info-panel .jt-license-card.is-selected,
.jt-product-info-panel .jt-license-card.is-expanded,
html.jt-light .jt-license-card.is-selected,
html.jt-light .jt-license-card.is-expanded,
body.jt-light .jt-license-card.is-selected,
body.jt-light .jt-license-card.is-expanded {
  border-color: #111111;
  background: #111111;
}

.jt-product-info-panel .jt-license-card.is-selected .jt-license-card__name,
.jt-product-info-panel .jt-license-card.is-selected .jt-license-card__price,
.jt-product-info-panel .jt-license-card.is-expanded .jt-license-card__name,
.jt-product-info-panel .jt-license-card.is-expanded .jt-license-card__price,
html.jt-light .jt-license-card.is-selected .jt-license-card__name,
html.jt-light .jt-license-card.is-selected .jt-license-card__price,
html.jt-light .jt-license-card.is-expanded .jt-license-card__name,
html.jt-light .jt-license-card.is-expanded .jt-license-card__price,
body.jt-light .jt-license-card.is-selected .jt-license-card__name,
body.jt-light .jt-license-card.is-selected .jt-license-card__price,
body.jt-light .jt-license-card.is-expanded .jt-license-card__name,
body.jt-light .jt-license-card.is-expanded .jt-license-card__price {
  color: #ffffff;
}

html.jt-light .jt-license-card.is-selected .jt-license-card__radio,
body.jt-light .jt-license-card.is-selected .jt-license-card__radio {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
}

html.jt-light .jt-license-card.is-selected .jt-license-card__summary,
html.jt-light .jt-license-card.is-expanded .jt-license-card__summary,
html.jt-light .jt-license-card.is-selected .jt-license-card__section-title,
html.jt-light .jt-license-card.is-expanded .jt-license-card__section-title,
html.jt-light .jt-license-card.is-selected .jt-license-card__list li,
html.jt-light .jt-license-card.is-expanded .jt-license-card__list li,
body.jt-light .jt-license-card.is-selected .jt-license-card__summary,
body.jt-light .jt-license-card.is-expanded .jt-license-card__summary,
body.jt-light .jt-license-card.is-selected .jt-license-card__section-title,
body.jt-light .jt-license-card.is-expanded .jt-license-card__section-title,
body.jt-light .jt-license-card.is-selected .jt-license-card__list li,
body.jt-light .jt-license-card.is-expanded .jt-license-card__list li {
  color: rgba(255, 255, 255, 0.88);
}

html.jt-light .jt-license-card.is-selected .jt-product-price__regular,
html.jt-light .jt-license-card.is-expanded .jt-product-price__regular,
body.jt-light .jt-license-card.is-selected .jt-product-price__regular,
body.jt-light .jt-license-card.is-expanded .jt-product-price__regular {
  color: rgba(255, 255, 255, 0.55);
}

html.jt-light .jt-license-card.is-selected .jt-product-price__sale,
html.jt-light .jt-license-card.is-selected .jt-product-price__current,
html.jt-light .jt-license-card.is-expanded .jt-product-price__sale,
html.jt-light .jt-license-card.is-expanded .jt-product-price__current,
body.jt-light .jt-license-card.is-selected .jt-product-price__sale,
body.jt-light .jt-license-card.is-selected .jt-product-price__current,
body.jt-light .jt-license-card.is-expanded .jt-product-price__sale,
body.jt-light .jt-license-card.is-expanded .jt-product-price__current {
  color: #ffffff;
}

.jt-license-card.is-expanded {
  border-color: rgba(255, 255, 255, 0.45);
}

.jt-license-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

.jt-license-card__head:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: -2px;
}

.jt-license-card__radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.jt-license-card.is-selected .jt-license-card__radio {
  border-color: #fff;
  background: #fff;
}

.jt-license-card.is-selected .jt-license-card__radio::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #0a0a0a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.jt-license-card__meta {
  flex: 1;
  min-width: 0;
}

.jt-license-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jt-license-card__name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  transition: color 0.15s ease;
}

.jt-license-card__price {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s ease;
}

.jt-license-card__summary {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--jt-muted, rgba(255, 255, 255, 0.55));
}

.jt-license-card__body {
  padding: 0 16px 16px 48px;
}

.jt-license-card__body[hidden] {
  display: none;
}

.jt-license-card__section {
  margin-bottom: 16px;
}

.jt-license-card__section:last-child {
  margin-bottom: 0;
}

.jt-license-card__section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.jt-license-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jt-license-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--jt-muted, rgba(255, 255, 255, 0.55));
}

.jt-license-card__list li:last-child {
  margin-bottom: 0;
}

.jt-license-card__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.jt-license-card__list--allowed .jt-license-card__icon {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.jt-license-card__list--denied .jt-license-card__icon {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.45);
}

html.jt-light .jt-license-card:not(.is-selected):not(.is-expanded) .jt-license-card__list--allowed .jt-license-card__icon,
body.jt-light .jt-license-card:not(.is-selected):not(.is-expanded) .jt-license-card__list--allowed .jt-license-card__icon {
  border-color: #111111;
  color: #111111;
  background: transparent;
}

html.jt-light .jt-license-card:not(.is-selected):not(.is-expanded) .jt-license-card__list--denied .jt-license-card__icon,
body.jt-light .jt-license-card:not(.is-selected):not(.is-expanded) .jt-license-card__list--denied .jt-license-card__icon {
  border-color: rgba(0, 0, 0, 0.28);
  color: rgba(0, 0, 0, 0.45);
  background: transparent;
}

html.jt-light .jt-license-card.is-selected .jt-license-card__list--allowed .jt-license-card__icon,
html.jt-light .jt-license-card.is-expanded .jt-license-card__list--allowed .jt-license-card__icon,
html.jt-light .jt-license-card.is-selected .jt-license-card__list--denied .jt-license-card__icon,
html.jt-light .jt-license-card.is-expanded .jt-license-card__list--denied .jt-license-card__icon,
body.jt-light .jt-license-card.is-selected .jt-license-card__list--allowed .jt-license-card__icon,
body.jt-light .jt-license-card.is-expanded .jt-license-card__list--allowed .jt-license-card__icon,
body.jt-light .jt-license-card.is-selected .jt-license-card__list--denied .jt-license-card__icon,
body.jt-light .jt-license-card.is-expanded .jt-license-card__list--denied .jt-license-card__icon {
  border-color: rgba(255, 255, 255, 0.75);
  color: #ffffff;
  background: transparent;
}

.jt-product-info-panel__qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.jt-product-info-panel__qty-label {
  font-size: 14px;
  font-weight: 500;
}

.jt-product-info-panel__qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--jt-border);
  border-radius: 999px;
  overflow: hidden;
}

.jt-product-info-panel__qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--jt-text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.jt-product-info-panel__qty-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.jt-product-info-panel__qty-value {
  min-width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.jt-product-info-panel__cart {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #fff;
  border-radius: 8px;
  background: #fff;
  color: #0a0a0a;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.jt-product-info-panel__cart:hover,
.jt-product-info-panel__cart:focus-visible {
  background: #0a0a0a;
  color: #fff;
  outline: none;
}

.jt-product-info-panel__cart:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.jt-product-info-panel__cart:disabled:hover {
  background: #fff;
  color: #0a0a0a;
}

html.jt-light .jt-product-info-panel__cart,
body.jt-light .jt-product-info-panel__cart {
  border-color: #0a0a0a;
  background: #0a0a0a;
  color: #fff;
}

html.jt-light .jt-product-info-panel__cart:hover,
body.jt-light .jt-product-info-panel__cart:hover {
  background: #fff;
  color: #0a0a0a;
}

/* Hidden WooCommerce cart — custom license panel owns purchase UI */
.jt-wc-cart-sync,
.jt-single-product__purchase--wc-sync {
  display: none !important;
}

body.jt-single-product--license-panel .jt-single-product__purchase,
body.jt-single-product--license-panel .jt-single-product--theme > .jt-single-product__purchase,
body.jt-single-product--license-panel .woocommerce-variation.single_variation,
body.jt-single-product--license-panel table.variations,
body.jt-single-product--license-panel .variations,
body.jt-single-product--license-panel .reset_variations,
body.jt-single-product--license-panel .woocommerce-variation-add-to-cart,
body.jt-single-product--license-panel .variations_button,
body.jt-single-product--license-panel .single_variation_wrap,
body.jt-single-product--license-panel select[name^="attribute_"],
body.jt-single-product--license-panel .single_add_to_cart_button:not([data-jt-add-to-cart]),
body.jt-single-product--license-panel form.cart .quantity,
body.jt-single-product--license-panel .product .cart .quantity {
  display: none !important;
}

@media (max-width: 1100px) {
  .jt-product-test-layout__shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
    grid-template-columns: none;
  }

  .jt-product-test-layout__content {
    display: contents;
  }

  .jt-product-test-layout__content > .jt-product-type-tester,
  .jt-product-test-layout__content > .jt-tp-product-tester,
  .jt-product-test-layout__content > .jt-product-bundle-tester {
    order: 1;
    width: 100%;
  }

  .jt-product-info-panel {
    order: 2;
    grid-column: auto;
    grid-row: auto;
    position: static;
    max-height: none;
    width: 100%;
  }

  .jt-product-test-layout__content > .jt-product-font-details {
    order: 3;
    width: 100%;
  }

  .jt-product-test-layout__content > .jt-product-glyphs {
    order: 4;
    width: 100%;
  }

  .jt-product-info-panel__frame {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 767px) {
  .jt-product-test-layout {
    margin: 24px 0 40px;
  }

  .jt-product-test-layout__shell,
  .jt-product-type-tester__shell,
  .jt-product-bundle-tester__shell {
    padding-left: var(--jt-product-shell-x);
    padding-right: var(--jt-product-shell-x);
  }

  .jt-license-card__row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .jt-license-card__price {
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-start;
  }

  .jt-license-card__body {
    padding-left: 16px;
  }

  .jt-license-discount-countdown__clock {
    padding-right: clamp(2.25rem, 8vw, 3.5rem);
  }
}

/* ── Discount countdown (parent product sale schedule) ── */

.jt-license-discount-countdown {
  display: none;
  margin: 0;
  padding: 0 0 2px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.jt-license-discount-countdown.is-visible {
  display: block;
}

.jt-license-discount-countdown.is-expired {
  opacity: 0.72;
}

.jt-license-discount-countdown__head {
  display: flex;
  justify-content: center;
  text-align: center;
}

.jt-license-discount-countdown__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 7px 16px;
  border: 1px solid rgba(255, 92, 92, 0.32);
  border-radius: 999px;
  background: var(--jt-sale-bg, rgba(255, 92, 92, 0.14));
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jt-sale, #ff5c5c);
  white-space: nowrap;
}

.jt-license-discount-countdown__timer {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.jt-license-discount-countdown__clock {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  padding-right: clamp(2.75rem, 9vw, 4.25rem);
}

.jt-license-discount-countdown__icon-wrap {
  position: absolute;
  right: 0;
  bottom: 14px;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.jt-license-discount-countdown__icon-wrap::after {
  content: "";
  position: absolute;
  inset: -6px -4px -2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 130, 45, 0.42) 0%, transparent 72%);
  opacity: 0.35;
  animation: jt-fire-glow 2.2s ease-in-out infinite;
  pointer-events: none;
}

.jt-license-discount-countdown__icon {
  position: relative;
  z-index: 1;
  width: clamp(1.85rem, 5.5vw, 2.85rem);
  height: auto;
  display: block;
  object-fit: contain;
  transform-origin: center bottom;
  animation: jt-fire-flicker 1.6s ease-in-out infinite;
}

.jt-license-discount-countdown.is-expired .jt-license-discount-countdown__icon {
  animation: none;
  filter: grayscale(0.55) brightness(0.72);
  opacity: 0.65;
}

.jt-license-discount-countdown.is-expired .jt-license-discount-countdown__icon-wrap::after {
  animation: none;
  opacity: 0;
}

@keyframes jt-fire-flicker {
  0%,
  100% {
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }

  20% {
    transform: scale(1.07) translateY(-1px);
    filter: brightness(1.1);
  }

  45% {
    transform: scale(0.97) translateY(1px);
    filter: brightness(0.94);
  }

  70% {
    transform: scale(1.04) translateY(-0.5px);
    filter: brightness(1.06);
  }
}

@keyframes jt-fire-glow {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.92);
  }

  50% {
    opacity: 0.55;
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jt-license-discount-countdown__icon,
  .jt-license-discount-countdown__icon-wrap::after {
    animation: none;
  }
}

.jt-license-discount-countdown__units {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 4px;
}

.jt-count-flip-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.jt-count-flip {
  --jt-flip-size: clamp(1.65rem, 4.5vw, 2.5rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--jt-flip-size);
  font-size: var(--jt-flip-size);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  text-align: center;
}

.jt-count-flip__digit {
  position: relative;
  min-width: 1ch;
  height: 1em;
  color: #ffffff;
}

.jt-count-flip__digit.is-static span {
  display: block;
  height: 1em;
  line-height: 1;
  text-align: center;
  color: #ffffff;
}

.jt-count-flip__viewport {
  height: 1em;
  overflow: hidden;
  line-height: 1;
}

.jt-count-flip__strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.jt-count-flip__strip span {
  display: block;
  height: 1em;
  line-height: 1;
  text-align: center;
  color: #ffffff;
}

.jt-count-flip__strip.is-animating {
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.jt-count-flip__label {
  margin-top: 8px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jt-muted, rgba(255, 255, 255, 0.55));
}

.jt-count-flip__colon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-self: center;
  height: clamp(1.65rem, 4.5vw, 2.5rem);
  padding: 0 4px 18px;
}

.jt-count-flip__colon::before,
.jt-count-flip__colon::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.jt-license-discount-countdown__note {
  margin: 10px 0 0;
  font-size: 11px;
  text-align: center;
  color: var(--jt-muted, rgba(255, 255, 255, 0.55));
}
