/* ==============================================================================================================================
   [ PAYMENT PRICING LIST ]
   Description: Grid layout used to render payment plan cards.
   ============================================================================================================================== */

.payment-pricing-list {
  background: transparent;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

/* ==============================================================================================================================
   [ TEMPLATE CONTROL ]
   Description: Hide the DataList template card.
   ============================================================================================================================== */

.payment-plan-card[data-template="true"] {
  display: none;
}

/* ==============================================================================================================================
   [ PAYMENT PLAN CARD ]
   Description: Base visual structure of each payment plan card.
   ============================================================================================================================== */

.payment-plan-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-tiny);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.payment-plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ==============================================================================================================================
   [ ACTIVE PLAN CARD ]
   Description: Highlight the card when the plan is currently active.
   ============================================================================================================================== */

.payment-plan-card.active {
  border-color: var(--color-blue-primary);
  box-shadow: 0 4px 14px rgba(0, 123, 255, 0.16);
}

/* ==============================================================================================================================
   [ CARD HEADER ]
   Description: Top section with title, tier and price.
   ============================================================================================================================== */

.payment-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.payment-plan-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-plan-title h3 {
  margin: 0;
  font-size: var(--font-size-large);
  color: var(--color-dark);
}

.payment-plan-tier {
  font-size: var(--font-size-tiny);
  color: var(--color-blue-primary);
  background: rgba(0, 123, 255, 0.08);
  padding: 2px 6px;
  border-radius: var(--radius-tiny);
  width: fit-content;
}

.payment-plan-price {
  font-weight: 700;
  font-size: var(--font-size-xlarge);
  color: var(--color-blue-dark);
  white-space: nowrap;
}

/* ==============================================================================================================================
   [ CARD BODY ]
   Description: Main textual content of the payment plan.
   ============================================================================================================================== */

.payment-plan-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-plan-description {
  color: var(--color-gray-medium);
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
  margin: 0;
}

.payment-plan-description .datalist-html-cell {
  max-height: none;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}

.payment-plan-period {
  margin: 0;
  color: var(--color-gray-dark);
}

.payment-plan-period strong {
  color: var(--color-dark);
}

/* ==============================================================================================================================
   [ CARD FOOTER ]
   Description: Footer area used to hold the primary plan action.
   ============================================================================================================================== */

.payment-plan-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: stretch;
}

.payment-plan-action {
  width: 100%;
  display: flex;
}

/* ==============================================================================================================================
   [ PLAN ACTION BUTTON ]
   Description: Local adjustments for plan buttons while preserving the global button standard.
   ============================================================================================================================== */

.payment-plan-select {
  width: 100%;
  text-align: center;
  justify-content: center;
  font-weight: 600;
}

/* ==============================================================================================================================
   [ ACTIVE PLAN LABEL ]
   Description: Visual status badge shown when the plan is the current one.
   ============================================================================================================================== */

.payment-plan-active-label {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 8px 18px;
  border-radius: var(--radius-tiny);

  background-color: var(--color-green-save);
  color: var(--color-text-light);

  font-size: var(--font-size-small);
  font-weight: 600;
  text-align: center;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.payment-plan-active-label::before {
  content: "✔";
  font-size: 11px;
  line-height: 1;
}

/* ==============================================================================================================================
   [ RESPONSIVE ADJUSTMENTS ]
   Description: Refinements for smaller screens.
   ============================================================================================================================== */

@media (max-width: 768px) {
  .payment-plan-card {
    padding: 14px;
  }

  .payment-plan-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .payment-plan-price {
    font-size: var(--font-size-large);
  }

  .payment-plan-select,
  .payment-plan-active-label {
    width: 100%;
  }
}