/* assets/css/subscription-core.css */

/* --- Overall layout: Stripe-style card --- */
.subscription-overview {
  max-width: 960px;
  margin: 40px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2933;
}

/* Optional subtle page background – only if you wrap the page */
body.subscription-core-page {
  background: #f6f9fc;
}

/* Active promotions section */
.subscription-active-promotions {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 20px;
  border: 1px solid #e3e8ee;
  margin-bottom: 20px;
}

.subscription-active-promotions h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.subscription-active-promotions ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
}

/* Deal banner – more in line with Stripe’s subtle notices */
.stripe-deal-banner {
  background: #fff8e6;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid #ffe0a3;
  font-size: 14px;
}

/* --- Comparison table (Stripe-style) --- */
.key3-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 15px rgba(15, 35, 52, 0.06);
  border: 1px solid #e3e8ee;
}

.key3-comparison-table thead {
  background: #f6f9fc;
}

.key3-comparison-table th,
.key3-comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e3e8ee;
  font-size: 14px;
}

.key3-comparison-table th:first-child,
.key3-comparison-table td:first-child {
  text-align: left;
}

.key3-comparison-table th:not(:first-child),
.key3-comparison-table td:not(:first-child) {
  text-align: center;
}

.key3-comparison-table thead th {
  font-weight: 600;
  color: #1f2933;
}

.key3-comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.key3-comparison-table tbody td strong {
  font-weight: 500;
}

/* Column widths for comparison table: label + 3 plans */
.key3-comparison-table th:first-child,
.key3-comparison-table td:first-child {
  width: 30%;
}

.key3-comparison-table th:not(:first-child),
.key3-comparison-table td:not(:first-child) {
  width: 23.33%; /* 70% / 3 ≈ 23.33% */
}

/* Responsive stacking on mobile (comparison table only) */
@media (max-width: 768px) {
  .key3-comparison-table,
  .key3-comparison-table thead,
  .key3-comparison-table tbody,
  .key3-comparison-table th,
  .key3-comparison-table td,
  .key3-comparison-table tr {
    display: block;
  }

  .key3-comparison-table thead {
    display: none;
  }

  .key3-comparison-table tr {
    margin-bottom: 16px;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    overflow: hidden;
  }

  .key3-comparison-table td {
    border-bottom: 1px solid #e3e8ee;
    position: relative;
    padding-left: 50%;
  }

  .key3-comparison-table td:first-child {
    padding-left: 16px;
    font-weight: 600;
    background: #f6f9fc;
  }

  .key3-comparison-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 500;
    color: #6b7c93;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
}

/* --- Pricing table + alignment with comparison table --- */

/* Make pricing + comparison tables share base layout */
.key3-pricing-table,
.key3-comparison-table {
  width: 100%;
  table-layout: fixed;
}

/* Make pricing table visually match the comparison table grid */
.key3-pricing-table {
  margin-top: 24px;                 /* same top spacing */
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 15px rgba(15, 35, 52, 0.06);
  border: 1px solid #e3e8ee;
  border-collapse: collapse;
}

.key3-pricing-table thead {
  background: #f6f9fc;
}

/* Shared cell styling for pricing table */
.key3-pricing-table th,
.key3-pricing-table td {
  text-align: center;
  vertical-align: top;
  padding: 16px;
  border-bottom: 1px solid #e3e8ee;
  font-size: 14px;
  width: calc(100% / 3); /* three equal plan columns: Free, Standard, Pro */
}

/* Last row: remove double bottom border if you like */
.key3-pricing-table tbody tr:last-child td {
  border-bottom: none;
}

/* Center the content stack inside each pricing cell */
.key3-pricing-table td#pricing-free-plan,
.key3-pricing-table td#pricing-standard-plan,
.key3-pricing-table td#pricing-pro-plan {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ────────────────────────────────
   Bigger, nicer Stripe-style buttons
   ──────────────────────────────── */

/* Base button */
.stripe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;              /* base size */
  font-size: 15px;
  font-weight: 600;
  border-radius: 9999px;           /* pill shape */
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

/* Stronger selector so our styles win in organizer/portal areas */
.subscription-overview .stripe-btn,
.stripe-dashboard .stripe-btn,
.key3-pricing-table .stripe-btn {
  padding: 14px 30px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  border-width: 1px !important;
}

/* Make primary buttons clearly primary */
.subscription-overview .subscribe-btn,
.subscription-overview .stripe-standard,
.subscription-overview .stripe-pro,
.stripe-dashboard .subscribe-btn,
.stripe-dashboard .stripe-standard,
.stripe-dashboard .stripe-pro {
  background-color: #635bff !important;
  color: #ffffff !important;
  border-color: #635bff !important;
  box-shadow: 0 6px 14px rgba(99, 91, 255, 0.35) !important;
}

/* Free plan button */
.subscription-overview .stripe-free,
.stripe-dashboard .stripe-free {
  background-color: #ffffff !important;
  color: #374151 !important;
  border-color: #d1d5db !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08) !important;
}

/* Manage subscription button */
.subscription-overview .stripe-manage,
.stripe-dashboard .stripe-manage {
  background-color: #ffffff !important;
  color: #4b44e0 !important;
  border-color: #c4b5fd !important;
  box-shadow: 0 4px 10px rgba(129, 140, 248, 0.25) !important;
}

/* Disabled state (e.g. Included button) */
.stripe-btn[disabled],
.stripe-btn:disabled {
  opacity: 0.65;
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* Make buttons fill cell nicely in pricing table */
.key3-pricing-table td .stripe-btn {
  width: 100%;
  max-width: 240px;
  justify-content: center;
  margin-top: 10px;
}

/* Button container */
.stripe-plan-buttons {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Dashboard card – align with Stripe cards */
.stripe-dashboard {
  background: #ffffff;
  padding: 16px 20px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 8px 12px rgba(15, 35, 52, 0.05);
  font-size: 14px;
}

/* ────────────────────────────────
   HARD OVERRIDE: keep pricing table horizontal
   even if theme/mobile CSS sets table parts to block
   ──────────────────────────────── */

.key3-pricing-table {
  display: table;
}

.key3-pricing-table thead {
  display: table-header-group;
}

.key3-pricing-table tbody {
  display: table-row-group;
}

.key3-pricing-table tr {
  display: table-row;
}

.key3-pricing-table th,
.key3-pricing-table td {
  display: table-cell;
}

/* ────────────────────────────────
   FINAL HARD OVERRIDE FOR PRICING TABLE
   Keep it as a real table no matter what the theme does.
   ──────────────────────────────── */

.key3-pricing-table {
  display: table !important;
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.key3-pricing-table thead {
  display: table-header-group !important;
}

.key3-pricing-table tbody {
  display: table-row-group !important;
}

.key3-pricing-table tr {
  display: table-row !important;
}

.key3-pricing-table th,
.key3-pricing-table td {
  display: table-cell !important;
  vertical-align: top !important;
  text-align: center !important;
}

/* keep the cells flex-centered *inside* each plan column */
.key3-pricing-table td#pricing-free-plan,
.key3-pricing-table td#pricing-standard-plan,
.key3-pricing-table td#pricing-pro-plan {
  display: table-cell !important;   /* table cell at layout level */
}

.key3-pricing-table td#pricing-free-plan > *,
.key3-pricing-table td#pricing-standard-plan > *,
.key3-pricing-table td#pricing-pro-plan > * {
  margin-left: auto;
  margin-right: auto;
}
