/* Package cards, interval switch and module rows of the pricing pages
   (preise.html, en/pricing.html, fr/tarifs.html).

   The look follows the package picker of the customer dashboard (contract
   booking, PR 5271: PackageCard, IntervalSwitch, ModuleTile): white cards with
   a soft tint at the top by tier, Pro as the dark ink card, Standard with the
   "Empfohlen" badge, minutes in a pill, features with green checks, and a quiet
   button that turns dark on hover. Keep both in step when one of them changes.
   Website only: the add-on modules with their prices sit behind a toggle in
   each card (as before the redesign), tinted in the card's colour when open.

   The tint is the card's own background, never a blurred child: Safari does
   not clip a filtered layer at rounded corners. Only transform, opacity and
   shadows move, and nothing is transformed at rest, so Safari keeps the text
   and the edges crisp. */

/* ===== Interval switch: "Quartalsweise ( ) Jährlich +20 % Minuten" ===== */
.pk-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin: 0 auto 0.9rem;
}

.pk-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.15rem;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.pk-switch-label:hover {
  color: #1e293b;
}

.pk-switch-label[aria-pressed="true"] {
  color: #0f172a;
}

.pk-switch-bonus {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  font-size: 0.75rem;
  font-weight: 700;
  color: #047857;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.is-annual .pk-switch-bonus {
  background: #047857;
  color: #fff;
}

.pk-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.is-annual .pk-switch-track {
  background: #ea580c;
}

.pk-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(2, 6, 23, 0.3);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.is-annual .pk-switch-knob {
  transform: translateX(20px);
}

.pk-switch-label:focus-visible,
.pk-switch-track:focus-visible {
  outline: 2px solid rgba(251, 146, 60, 0.6);
  outline-offset: 2px;
}

/* The line under the switch says what the chosen schedule means. Room for two
   lines below 1100px, so nothing below jumps when it changes. */
.billing-note {
  max-width: 640px;
  min-height: calc(2 * 0.85rem * 1.5);
  margin: 0 auto 2rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #64748b;
  text-align: center;
}

@media (min-width: 1100px) {
  .billing-note {
    min-height: calc(0.85rem * 1.5);
  }
}

/* ===== Package grid ===== */
.pk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 420px;
  margin: 0 auto;
  text-align: left;
}

@media (min-width: 640px) {
  .pk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 820px;
  }
}

/* ===== Card ===== */
.pk-card {
  --pk-strong: #0f172a;
  --pk-body: #334155;
  --pk-muted: #64748b;
  --pk-label: #94a3b8;
  --pk-pill: rgba(15, 23, 42, 0.05);
  --pk-bonus: #047857;
  --pk-rule: rgba(15, 23, 42, 0.07);
  --pk-check: #059669;
  --pk-cta: rgba(15, 23, 42, 0.06);
  --pk-cta-text: #0f172a;
  --pk-cta-hover: #0f172a;
  --pk-cta-hover-text: #f8fafc;

  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background-color: #fff;
  background-repeat: no-repeat;
  box-shadow:
    0 1px 2px rgba(2, 6, 23, 0.05),
    0 18px 40px -28px rgba(2, 6, 23, 0.35);
  color: var(--pk-body);
  transition:
    transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

@media (min-width: 640px) {
  .pk-card {
    padding: 1.5rem 22px 1.25rem;
  }
}

/* The soft tint at the top, by tier: cool, teal, warm; Pro is ink. The
   --pk-tint* colours carry the same hue into the opened add-on list. */
.pk-card[data-tier="1"] {
  --pk-tint: rgb(238, 242, 255);
  --pk-tint-ring: rgba(99, 102, 241, 0.28);
  --pk-tint-text: #4338ca;

  background-image: radial-gradient(90% 55% at 20% 0%, rgb(224, 231, 255), transparent 70%);
}

.pk-card[data-tier="2"] {
  --pk-tint: rgb(240, 253, 250);
  --pk-tint-ring: rgba(20, 184, 166, 0.32);
  --pk-tint-text: #0f766e;

  background-image: radial-gradient(90% 55% at 20% 0%, rgb(204, 251, 241), transparent 70%);
}

.pk-card[data-tier="3"] {
  --pk-tint: rgb(255, 247, 237);
  --pk-tint-ring: rgba(249, 115, 22, 0.3);
  --pk-tint-text: #c2410c;

  background-image: radial-gradient(90% 55% at 20% 0%, rgba(251, 146, 60, 0.22), transparent 70%);
}

.pk-card.pk-ink {
  --pk-strong: #fff;
  --pk-body: #cbd5e1;
  --pk-muted: #94a3b8;
  --pk-label: #64748b;
  --pk-pill: rgba(255, 255, 255, 0.08);
  --pk-bonus: #6ee7b7;
  --pk-rule: rgba(255, 255, 255, 0.1);
  --pk-check: #4ade80;
  --pk-cta: rgba(255, 255, 255, 0.1);
  --pk-cta-text: #fff;
  --pk-cta-hover: #fff;
  --pk-cta-hover-text: #0f172a;
  --pk-tint: rgba(251, 146, 60, 0.12);
  --pk-tint-ring: rgba(251, 146, 60, 0.32);
  --pk-tint-text: #fdba74;

  border-color: rgba(255, 255, 255, 0.08);
  background-color: #0b1120;
  background-image:
    radial-gradient(90% 55% at 20% 0%, rgba(251, 146, 60, 0.28), transparent 70%),
    linear-gradient(180deg, #151d2e, #0b1120);
}

/* Hover: the card grows a little, lifts above its neighbours, and its own
   colour glows once (a stronger copy of the tint, opacity only). */
.pk-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.pk-card[data-tier="1"] .pk-glow {
  background-image: radial-gradient(110% 70% at 20% 0%, rgb(199, 210, 254), transparent 72%);
}

.pk-card[data-tier="2"] .pk-glow {
  background-image: radial-gradient(110% 70% at 20% 0%, rgb(153, 246, 228), transparent 72%);
}

.pk-card[data-tier="3"] .pk-glow {
  background-image: radial-gradient(110% 70% at 20% 0%, rgba(251, 146, 60, 0.45), transparent 72%);
}

.pk-card.pk-ink .pk-glow {
  background-image: radial-gradient(110% 70% at 20% 0%, rgba(251, 146, 60, 0.5), transparent 72%);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pk-card:hover {
    z-index: 10;
    transform: scale(1.02);
    box-shadow:
      0 1px 2px rgba(2, 6, 23, 0.05),
      0 28px 56px -26px rgba(2, 6, 23, 0.45);
  }

  .pk-card:hover .pk-glow {
    animation: pk-glow 1.1s ease-out 1 forwards;
  }
}

@keyframes pk-glow {
  0% {
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

/* Row 1: name and the recommended badge */
.pk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 26px;
}

.pk-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pk-strong);
}

.pk-badge {
  padding: 0.125rem 0.625rem;
  border: 1px solid rgba(234, 88, 12, 0.25);
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.9);
  font-size: 11.5px;
  font-weight: 700;
  color: #ea580c;
  white-space: nowrap;
}

/* Row 2: what the package does */
.pk-headline {
  margin: 1rem 0 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.025em;
  color: var(--pk-strong);
}

.pk-line {
  margin: 0.25rem 0 0;
  font-size: 13px;
  line-height: 1.375;
  color: var(--pk-body);
}

/* Row 3: price */
.pk-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0.875rem 0 0;
  white-space: nowrap;
}

.pk-price .amount {
  font-size: 40px;
  font-weight: 700;
  line-height: 44px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--pk-strong);
}

.pk-price .pk-old {
  margin-right: 0.4rem;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--pk-muted);
  text-decoration-thickness: 1.5px;
}

.pk-per {
  font-size: 13px;
  color: var(--pk-muted);
}

/* Row 4: minutes pill, rate after the contingent, setup */
.pk-minutes {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0.875rem;
}

.pk-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
  margin: 0;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: var(--pk-pill);
  font-size: 13px;
  color: var(--pk-body);
  white-space: nowrap;
}

.pk-pill .min-value {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pk-strong);
}

.pk-bonus {
  padding: 0 0.375rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  font-size: 11px;
  font-weight: 700;
  color: var(--pk-bonus);
}

.pk-bonus[hidden] {
  display: none;
}

.pk-rate {
  margin: 0.5rem 0 0;
  font-size: 12.5px;
  color: var(--pk-muted);
}

.pk-setup {
  margin: 0;
  font-size: 12px;
  color: var(--pk-muted);
}

/* Row 5: features */
.pk-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0.875rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--pk-rule);
  list-style: none;
}

.pk-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 13px;
  line-height: 1.375;
  color: var(--pk-body);
}

.pk-features svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--pk-check);
}

.pk-features li > span {
  display: flex;
  flex-direction: column;
}

.pk-note {
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--pk-muted);
}

/* Row 6: the modules that can be added, with their prices, behind a
   "Zubuchbare Module" toggle so the cards stay short. Open, the box takes the
   card's own colour (--pk-tint*, set with the tier tints above): blue for
   Starter, green for Basis, warm for Standard, orange on ink for Pro. */
.pk-addons {
  margin: 0.875rem 0 0;
  border-radius: 14px;
  background: var(--pk-pill);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.pk-addons:hover,
.pk-addons[open] {
  background: var(--pk-tint);
  box-shadow: inset 0 0 0 1px var(--pk-tint-ring);
}

.pk-addons summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pk-strong);
  list-style: none;
  cursor: pointer;
}

.pk-addons summary::-webkit-details-marker {
  display: none;
}

.pk-addons summary:focus-visible {
  outline: 2px solid rgba(251, 146, 60, 0.6);
  outline-offset: 2px;
}

.pk-addons summary svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--pk-muted);
  transition: transform 0.2s ease;
}

.pk-addons[open] summary svg {
  transform: rotate(180deg);
  color: var(--pk-tint-text);
}

.pk-addons ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0.125rem 0.75rem 0.75rem;
  list-style: none;
}

.pk-addons[open] ul {
  animation: pk-addons-in 0.25s ease-out;
}

@keyframes pk-addons-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.pk-addons li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 0.5rem;
  font-size: 13px;
  line-height: 1.4;
  color: var(--pk-body);
}

.pk-addons li a {
  color: inherit;
  text-decoration: none;
}

/* A unit that is not "per month" (E-Mail-Postfach: "je Postfach") stands
   under the name, so every price on the right reads "x € / Monat". */
.pk-addon-name {
  display: flex;
  flex-direction: column;
}

.pk-addon-name small {
  font-size: 11.5px;
  color: var(--pk-muted);
}

.pk-addons li a:hover {
  color: var(--pk-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pk-addon-price {
  margin-left: auto;
  font-weight: 700;
  color: var(--pk-tint-text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pk-addon-price small {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--pk-muted);
}

/* Row 7: button, at the bottom of every card */
.pk-action {
  margin-top: auto;
  padding-top: 1.25rem;
}

.pk-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  border-radius: 12px;
  background: var(--pk-cta);
  font-size: 14px;
  font-weight: 600;
  color: var(--pk-cta-text);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.pk-card:hover .pk-cta,
.pk-cta:focus-visible {
  background: var(--pk-cta-hover);
  color: var(--pk-cta-hover-text);
}

.pk-cta:focus-visible {
  outline: 2px solid rgba(251, 146, 60, 0.6);
  outline-offset: 2px;
}

.pk-cta svg {
  width: 16px;
  height: 16px;
}

/* Four side by side; each card's seven rows (name, words, price, minutes,
   features, add-ons, button) line up with its neighbours' (subgrid). */
@media (min-width: 1200px) {
  .pk-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 0;
    max-width: 1240px;
  }

  .pk-card {
    display: grid;
    grid-row: span 7;
    grid-template-rows: subgrid;
    row-gap: 0;
  }

  /* The add-on row is as tall as the longest open list; the shorter boxes
     keep their own height instead of stretching. */
  .pk-addons {
    align-self: start;
  }
}

/* ===== Module rows ===== */
.pk-mods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 980px;
  margin: 3rem auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.pk-mod {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(2, 6, 23, 0.04),
    0 12px 28px -22px rgba(2, 6, 23, 0.3);
}

.pk-mod-main {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.pk-mod-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f1f5f9);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
  color: #334155;
}

.pk-mod-icon svg {
  width: 20px;
  height: 20px;
}

.pk-mod-body {
  flex: 1 1 auto;
  min-width: 0;
}

.pk-mod-body h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.pk-mod-body p {
  margin: 0.25rem 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.pk-mod-body .module-lead {
  font-weight: 600;
  color: #334155;
}

.pk-mod-body .pk-mod-fine {
  font-size: 12px;
  color: #94a3b8;
}

.pk-mod-body a {
  font-weight: 600;
  color: #c2410c;
  text-decoration: underline;
  text-decoration-color: rgba(194, 65, 12, 0.35);
  text-underline-offset: 3px;
}

/* Price and state: on a phone stacked under the text, from 720px in a fixed
   right-hand column, so every row lines up. */
.pk-mod-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 0 0 calc(44px + 1rem);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.pk-mod-price {
  margin: 0;
  color: #0f172a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pk-mod-price b {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pk-mod-price small {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.pk-mod-states {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pk-mod-states li {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  white-space: nowrap;
}

.pk-mod-states li.is-included {
  font-weight: 600;
  color: #047857;
}

.pk-mod-states svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

@media (min-width: 720px) {
  .pk-mod {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.25rem;
  }

  .pk-mod-side {
    flex: 0 0 auto;
    align-items: flex-end;
    justify-content: center;
    width: 220px;
    padding: 0;
    border-top: 0;
    text-align: right;
  }

  .pk-mod-states {
    align-items: flex-end;
  }
}

@media (max-width: 420px) {
  .pk-mod-side {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pk-card,
  .pk-switch-knob,
  .pk-switch-track,
  .pk-switch-bonus,
  .pk-cta,
  .pk-addons,
  .pk-addons summary svg {
    transition: none;
  }

  .pk-addons[open] ul {
    animation: none;
  }
}
