/**
 * Shared Tariff Card Component
 * Used on: Zielgruppen-LPs, Anbieter-Detail pages
 * Mobile-first, responsive grid
 */

/* ===== LAYOUT VARIABLES ===== */
.tariff-cards {
  --tariff-card-radius: 12px;
  --tariff-card-padding: 20px;
}

/* ===== GRID ===== */
.tariff-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ===== CARD BASE ===== */
.tariff-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: var(--tariff-card-radius);
  padding: var(--tariff-card-padding);
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tariff-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* ===== FEATURED STATE ===== */
.tariff-card--featured {
  border: 2px solid #23cfb2;
  box-shadow: 0 4px 14px rgba(35, 207, 178, 0.15);
}

.tariff-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #23cfb2, #1db89d);
  border-radius: var(--tariff-card-radius) var(--tariff-card-radius) 0 0;
}

/* ===== BADGE ===== */
.tariff-card__badge {
  display: block;
  margin: calc(var(--tariff-card-padding) * -1);
  margin-bottom: 12px;
  padding: 8px var(--tariff-card-padding);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #23cfb2;
  color: #ffffff;
  border-radius: calc(var(--tariff-card-radius) - 2px) calc(var(--tariff-card-radius) - 2px) 0 0;
  text-align: center;
}

/* ===== HEADER ===== */
.tariff-card__logo-wrapper {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 8px;
}

.tariff-card__logo {
  width: auto;
  max-width: 280px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
}

.tariff-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 15px;
  text-align: center;
}

/* ===== FEATURES ===== */
.tariff-card__features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}

.tariff-card__feature {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
}

/* Check Icon — teal circle with prominent check (Startseiten-Stil) */
.tariff-card__check-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 207, 178, 0.15);
  border-radius: 50%;
}

.tariff-card__check-icon svg {
  width: 14px;
  height: 14px;
}


.tariff-card__feature-label {
  font-size: 14px;
  color: #2d3748;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.tariff-card__feature-value {
  font-size: 16px;
  font-weight: 700;
  color: #2d3748;
  text-align: right;
}

/* ===== NO-PILLS STATE ===== */
.tariff-card--no-pills .tariff-card__features {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

/* ===== SEPARATOR ===== */
.tariff-card__separator {
  border-top: 1px solid #e2e8f0;
  margin: 12px 0 10px;
}

/* ===== PILLS (Bonus Features) ===== */
.tariff-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tariff-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #ecfdf5;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #065f46;
  cursor: default;
  position: relative;
}

.tariff-card__pill--negative {
  background: #fef2f2;
  color: #991b1b;
}

.tariff-card__pill--has-tooltip {
  cursor: pointer;
}

.tariff-card__pill-info {
  display: inline-flex;
  color: #a0aec0;
  margin-left: 2px;
}

.tariff-card__pill-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  background: #ffffff;
  color: #2d3748;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  z-index: 100;
  pointer-events: auto;
}

/* Bridge: covers gap between pill and tooltip so hover doesn't break */
.tariff-card__pill-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

.tariff-card__pill-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .tariff-card__pill--has-tooltip:hover .tariff-card__pill-tooltip {
    display: block;
  }
}

/* ===== TOOLTIP LINK STYLING (shared across all card tooltips) ===== */
.tariff-card__pill-tooltip a,
.tariff-card__info-tooltip a {
  color: #1a5276;
  text-decoration: underline;
  font-weight: 500;
}

.tariff-card__pill-tooltip a:hover,
.tariff-card__info-tooltip a:hover {
  color: #0d3b5e;
}

/* ===== INFO TOOLTIP (Feature Labels) ===== */
.tariff-card__info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0;
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.15s ease;
  font-family: inherit;
  -webkit-appearance: none;
}

.tariff-card__info:hover {
  color: #23cfb2;
}

.tariff-card__info-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  background: #ffffff;
  color: #2d3748;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  z-index: 100;
  pointer-events: auto;
}

/* Bridge: covers gap between info icon and tooltip so hover doesn't break */
.tariff-card__info-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

.tariff-card__info-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #ffffff;
}

/* Feature labels with info icons are fully clickable */
.tariff-card__feature-label:has(.tariff-card__info) {
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .tariff-card__info:hover .tariff-card__info-tooltip {
    display: block;
  }
}

/* ===== PRICE ===== */
.tariff-card__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: auto;
  margin-bottom: 16px;
}

.tariff-card__price-amount {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
}

.tariff-card__price-period {
  font-size: 14px;
  color: #718096;
}

.tariff-card__price-after {
  font-size: 14px;
  color: #718096;
  margin-top: 2px;
  position: relative;
}

.tariff-card__price-after--has-tooltip {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tariff-card__price-after-info {
  display: inline-flex;
  color: #a0aec0;
  transition: color 0.15s ease;
}

.tariff-card__price-after--has-tooltip:hover .tariff-card__price-after-info {
  color: #23cfb2;
}

.tariff-card__price-after-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: 260px;
  background: #ffffff;
  color: #2d3748;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  z-index: 100;
  pointer-events: auto;
}

.tariff-card__price-after-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 24px;
  border: 6px solid transparent;
  border-top-color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
  .tariff-card__price-after--has-tooltip:hover .tariff-card__price-after-tooltip {
    display: block;
  }
}

/* ===== CTA BUTTON ===== */
.tariff-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  box-sizing: border-box;
  background: #23cfb2;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tariff-card__cta:hover {
  background: #1db89d;
}

/* ===== GUT WEIL ===== */
.tariff-card__gut-weil {
  font-size: 13px;
  line-height: 1.5;
  color: #718096;
  margin: 0 0 12px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .tariff-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tariff-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .tariff-cards {
    --tariff-card-padding: 28px;
  }

  .tariff-card__title {
    font-size: 18px;
    text-align: center;
  }

  .tariff-card__price-amount {
    font-size: 32px;
  }

  /* Pill zone: no fixed min-height. Cards align via flexbox margin-top:auto on price. */
}
