/* ═══════════════════════════════════════════
   Plan Card v4.1 — billigsteabonnement.dk
   6-column grid · brand colors · polished
   ═══════════════════════════════════════════ */

/* ── Card ── */
.pc {
  position: relative;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  overflow: visible;
  transition: box-shadow var(--transition-normal, 0.2s ease), border-color var(--transition-normal, 0.2s ease);
}

.pc:hover {
  box-shadow: var(--shadow-card-hover, 0 8px 25px -5px rgba(0,0,0,0.1));
  border-color: var(--color-primary, #05c89e);
}

/* First card — primary highlight */
.plan-list .pc:first-child {
  border: 2px solid var(--color-primary, #05c89e);
  box-shadow: var(--shadow-md);
}

.pc--sponsored {
  border: 2px solid var(--color-primary, #05c89e);
}

/* ── Badge bar — subtle inline inside card ── */
.pc__badge-bar {
  padding: 6px 24px;
  border-bottom: 1px solid var(--color-border-light, #f3f4f6);
}

.pc__badge-text {
  font-size: 12px;
  font-weight: var(--weight-semibold, 600);
  color: var(--color-primary-dark, #04af8a);
  letter-spacing: 0.02em;
}

/* ── Main row — 6 column grid with detail sub-row ── */
.pc__row {
  display: grid;
  grid-template-columns: 130px 1fr 1fr 1fr 1fr 160px;
  grid-template-rows: auto auto;
  align-items: start;
  padding: 16px 24px;
  gap: 0 16px;
}

/* Badge bar adjusts row padding */
.pc__badge-bar + .pc__row {
  padding-top: 12px;
}

/* Column base — all centered */
.pc__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

/* Detail row — spans all 4 data columns (col 2-5), aligned underneath */
.pc__details-row {
  grid-column: 2 / 6;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--color-border-light, #f3f4f6);
}

.pc__detail-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: var(--weight-medium, 500);
  color: var(--color-text-secondary, #4b5563);
  white-space: nowrap;
}

.pc__detail-item svg {
  flex-shrink: 0;
  color: var(--color-primary, #05c89e);
}

.pc__detail-offer {
  color: var(--color-primary-dark, #04af8a);
  font-weight: var(--weight-semibold, 600);
}

.pc__detail-offer svg {
  color: var(--color-primary-dark, #04af8a);
}

/* Logo spans both rows */
.pc__col-logo {
  grid-row: 1 / 3;
  align-self: center;
}

/* Price is now a data col, no row spanning */

/* CTA spans both rows */
.pc__col-cta {
  grid-row: 1 / 3;
  align-self: center;
}

/* Labels */
.pc__label {
  font-size: 15px;
  color: var(--color-text-muted, #9ca3af);
  font-weight: var(--weight-medium, 500);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

/* Values */
.pc__val {
  font-size: 24px;
  font-weight: var(--weight-bold, 700);
  color: var(--color-text, #1a1a2e);
  line-height: 1.3;
}

/* Legacy — hidden */
.pc__detail, .pc__meta {
  display: none;
}

/* ── Logo column ── */
.pc__col-logo {
  align-items: center;
  align-self: center;
  justify-content: center;
  padding-right: 16px;
  border-right: 1px solid var(--color-border-light, #f3f4f6);
}

.pc__logo {
  max-width: 110px;
  max-height: 48px;
  object-fit: contain;
  margin-bottom: 8px;
}

/* Rating */
.pc__rating {
  text-align: center;
}

.pc__stars {
  display: flex;
  justify-content: center;
  gap: 0;
}

.pc__stars svg, .pc__stars .bb-stars svg, .pc__stars .bb-star {
  width: 15px !important;
  height: 15px !important;
}

.pc__rating-text {
  font-size: 11px;
  color: var(--color-text-muted, #9ca3af);
  margin-top: 2px;
}

/* ── Data columns (Type, Speed, Total) ── */
.pc__col-data .pc__val {
  font-size: 21px;
}

/* ── Price column — inherits from .pc__col-data ── */

.pc__savings,
.pc__savings-spacer {
  display: none;
}

.pc__price-main {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text, #1a1a2e);
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.pc__price-unit {
  font-size: 15px;
  font-weight: var(--weight-normal, 400);
  color: var(--color-text-secondary, #4b5563);
}

.pc__price-period {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary, #05c89e);
  margin-bottom: 4px;
  line-height: 1.3;
}

.pc__price-period--default {
  color: var(--color-text-muted, #9ca3af);
}

.pc__price-normal {
  font-size: 15px;
  color: var(--color-text-muted, #9ca3af);
  margin-top: 2px;
}

/* When offer is active, main price gets accent color */
.pc--offer .pc__price-main {
  color: var(--color-text, #1a1a2e);
}

/* ── CTA column ── */
.pc__col-cta {
  align-items: center;
  align-self: center;
  justify-content: center;
  gap: 8px;
}

a.pc__cta, .pc__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary, #05c89e);
  color: #fff !important;
  font-size: 15px;
  font-weight: var(--weight-bold, 700);
  padding: 12px 20px;
  border-radius: var(--radius-md, 8px);
  text-decoration: none !important;
  cursor: pointer;
  transition: background var(--transition-fast, 0.15s ease), box-shadow var(--transition-fast, 0.15s ease);
  white-space: nowrap;
  min-width: 140px;
  text-align: center;
  line-height: 1.2;
  border: none;
  box-shadow: 0 2px 8px rgba(5, 200, 158, 0.3);
}

a.pc__cta:hover, .pc__cta:hover {
  background: var(--color-primary-dark, #04af8a);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(5, 200, 158, 0.4);
}

.pc__more {
  font-size: 13px;
  color: var(--color-text-secondary, #4b5563) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.pc__more:hover {
  color: var(--color-primary, #05c89e) !important;
  text-decoration: none !important;
}

/* ── USP row — hidden ── */
.pc__usps {
  display: none !important;
}

/* ── Skeleton ── */
.pc--skeleton {
  pointer-events: none;
}

.pc--skeleton .pc__row {
  min-height: 80px;
}

.bb-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: bb-shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm, 4px);
}

@keyframes bb-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Plan list container ── */
.plan-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  max-width: var(--max-width, 1200px) !important;
  margin: 0 auto !important;
  padding: 24px 20px 40px !important;
}

/* Fallback spacing if gap doesn't work */
#planCards .pc {
  margin-bottom: 16px !important;
}

#planCards .pc:last-child {
  margin-bottom: 0 !important;
}

/* Skeleton spacing */
#planSkeletons .pc {
  margin-bottom: 16px !important;
}

#planSkeletons .pc:last-child {
  margin-bottom: 0 !important;
}

.plan-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-list__title {
  font-size: var(--text-2xl, 1.5rem);
  font-weight: var(--weight-bold, 700);
  color: var(--color-text, #1a1a2e);
}

.plan-list__show-more {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  height: 40px !important;
  font-family: var(--font-family) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  background: #fff !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.plan-list__show-more:hover {
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  background: rgba(5, 200, 158, 0.04) !important;
  box-shadow: 0 1px 3px rgba(5, 200, 158, 0.12) !important;
}

.plan-list__empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-text-muted, #9ca3af);
}

.plan-list__empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--color-border, #e5e7eb);
}

.plan-list__empty-title {
  font-size: var(--text-lg, 1.125rem);
  font-weight: var(--weight-semibold, 600);
  color: var(--color-text, #1a1a2e);
  margin-bottom: 8px;
}


/* ═══════════════════════════════════════════
   Responsive: Tablet (max 1100px)
   ═══════════════════════════════════════════ */

@media screen and (max-width: 1100px) {
  .pc__row {
    grid-template-columns: 110px 1fr 1fr 1fr 1fr 140px;
    gap: 0 10px;
    padding: 16px 18px;
  }

  .pc__col-data .pc__val {
    font-size: 17px;
  }

  .pc__price-main {
    font-size: 24px;
  }

  a.pc__cta, .pc__cta {
    font-size: 14px;
    padding: 10px 16px;
    min-width: 120px;
  }
}


/* ═══════════════════════════════════════════
   Responsive: Mobile (max 768px)
   ═══════════════════════════════════════════ */

@media screen and (max-width: 768px) {
  .pc {
    border-radius: var(--radius-md, 8px);
  }

  .pc__badge-bar {
    padding: 6px 12px;
  }

  .plan-list .pc:first-child .pc__badge-bar {
    padding: 5px 12px;
  }

  .pc--has-badge:not(:first-child) .pc__badge-bar {
    padding: 5px 10px;
  }

  .pc__badge-text {
    font-size: 12px;
  }

  .pc__row {
    display: flex;
    flex-wrap: wrap;
    padding: 12px 12px;
    gap: 0;
  }

  .pc__badge-bar + .pc__row {
    padding-top: 8px;
  }

  /* Logo — full width row, spread across */
  .pc__col-logo {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-right: none;
    border-bottom: 1px solid var(--color-border-light, #f3f4f6);
    padding: 0 0 10px 0;
    margin-bottom: 10px;
    grid-row: auto;
  }

  .pc__col-logo {
    padding: 0 0 12px 0;
    margin-bottom: 12px;
  }

  .pc__logo {
    width: 120px;
    max-width: none;
    max-height: 52px;
    margin-bottom: 0;
    object-fit: contain;
  }

  .pc__stars svg, .pc__stars .bb-stars svg, .pc__stars .bb-star {
    width: 20px !important;
    height: 20px !important;
  }

  .pc__tp {
    font-size: 14px;
  }

  /* 3 data columns in a row */
  .pc__col-data {
    flex: 1 1 33%;
    padding: 4px 0;
  }

  .pc__val {
    font-size: 18px;
  }

  .pc__label {
    font-size: 12px;
  }

  /* Details row — full width */
  .pc__details-row {
    width: 100%;
    grid-column: auto;
    grid-row: auto;
    justify-content: center;
    padding-top: 8px;
    margin-top: 4px;
  }

  .pc__detail-item {
    font-size: 11px;
  }

  /* Price — full width, stacked vertically, centered */
  .pc__col-price {
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 0 6px;
    border-top: 1px solid var(--color-border-light, #f3f4f6);
    margin-top: 8px;
    grid-row: auto;
  }

  .pc__col-price .pc__label {
    display: none;
  }

  .pc__price-main {
    font-size: 36px;
  }

  .pc__offer-text {
    font-size: 12px;
  }

  /* CTA — full width, no "Læs mere" */
  .pc__col-cta {
    width: 100%;
    padding-top: 8px;
    grid-row: auto;
  }

  a.pc__cta, .pc__cta {
    width: 100% !important;
    font-size: 15px;
    padding: 12px 16px;
  }

  .pc__more {
    display: none !important;
  }

  /* USP row */
  .pc__usps {
    padding: 8px 14px 10px;
    gap: 8px;
  }

  .plan-list {
    padding: 20px 6px 28px !important;
    gap: 10px !important;
  }
}


/* ═══════════════════════════════════════════
   Small mobile (max 399px)
   ═══════════════════════════════════════════ */

@media screen and (max-width: 399px) {
  .pc__row {
    padding: 10px 10px;
  }

  .pc__price-main {
    font-size: 22px;
  }

  a.pc__cta, .pc__cta {
    font-size: 14px;
    padding: 10px 12px;
  }
}
