/**
 * Pricing Page Styles
 * ====================
 * Matches React /pricing page styling.
 * Uses DesignBase color variables and 1000px breakpoint.
 */

/* =============================================================================
   PAGE CONTAINER
   ============================================================================= */

.pricing-page {
  margin: 0 auto;
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.pricing-hero__headline {
  width: 100%;
  color: var(--color-primary-600);
  font-size: 64px;
  font-weight: 900;
  line-height: 72px;
  text-align: center;
  max-width: 800px;
  margin: 0;
}

.pricing-hero__description {
  line-height: 28px;
  font-weight: 400;
  color: var(--color-primary-600);
  font-size: 20px;
  max-width: 640px;
  text-align: center;
}

/* Mobile responsive - 1000px breakpoint (matches React) */
@media (max-width: 1000px) {
  .pricing-hero__headline {
    font-size: 36px;
    line-height: 44px;
  }

  .pricing-hero__description {
    font-size: 18px;
    line-height: 26px;
  }
}

/* =============================================================================
   PRICING PLANS GRID
   ============================================================================= */

/* Desktop: 3 cards in a row */
.pricing-plans-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100%;
  align-items: stretch;
}

/* Force op-container to use flex layout */
.pricing-plans-grid::part(container),
op-container.pricing-plans-grid {
  display: flex !important;
  flex-direction: row !important;
}

.pricing-plan-card {
  width: calc((100% - 48px) / 3) !important;
  min-width: calc((100% - 48px) / 3) !important;
  max-width: calc((100% - 48px) / 3) !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
}

/* Mobile: stack cards vertically */
@media (max-width: 1000px) {
  .pricing-plans-grid {
    flex-direction: column !important;
  }

  .pricing-plans-grid::part(container),
  op-container.pricing-plans-grid {
    flex-direction: column !important;
  }

  .pricing-plan-card {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}

/* =============================================================================
   PLAN CARD ELEMENTS
   ============================================================================= */

.pricing-plan__name {
  margin: 0;
}

.pricing-plan__description {
  min-height: 48px;
  display: block;
}

.pricing-plan__price {
  margin: 0;
}

.pricing-plan__billing-cycle {
  font-size: 12px;
  color: var(--color-neutral-400);
}

.pricing-plan__feature {
  font-size: 13px;
}

/* Mobile: larger button */
@media (max-width: 1000px) {
  .pricing-plan__button {
    --op-button-size: Large;
  }
}

/* =============================================================================
   FEATURE COMPARISON SECTION
   ============================================================================= */

.pricing-comparison__title {
  width: 100%;
  color: var(--color-black);
  font-size: 56px;
  font-weight: 900;
  line-height: 64px;
  text-align: center;
  max-width: 800px;
  margin: 0;
}

.pricing-comparison__description {
  line-height: 28px;
  font-weight: 400;
  color: var(--color-neutral-600);
  font-size: 20px;
  max-width: 640px;
  text-align: center;
}

/* Mobile responsive */
@media (max-width: 1000px) {
  .pricing-comparison__title {
    font-size: 36px;
    line-height: 44px;
  }

  .pricing-comparison__description {
    font-size: 18px;
    line-height: 26px;
  }
}

/* =============================================================================
   COMPARISON TABLE SECTION HEADERS
   ============================================================================= */

.pricing-section-icon {
  --op-icon-size: 48px;
  width: 48px;
  height: 48px;
}

.pricing-section__heading {
  margin: 0;
}

.pricing-section__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: var(--color-primary-100, #d1fae5);
  color: var(--color-primary-700, #047857);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Mobile: smaller icons and use h4 instead of h3 */
@media (max-width: 1000px) {
  .pricing-section-icon {
    --op-icon-size: 32px;
    width: 32px;
    height: 32px;
  }

  .pricing-section__heading {
    font-size: 18px;
    line-height: 24px;
  }

  .pricing-section__badge {
    padding: 4px 10px;
    font-size: 11px;
  }
}

/* =============================================================================
   NATIVE HTML COMPARISON TABLES
   ============================================================================= */

/* Table section container */
.pricing-table-section {
  width: 100%;
  margin-top: 32px;
}

/* Table header with icon and title */
.pricing-table-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

/* Table wrapper with rounded corners and white background */
.pricing-table-wrapper {
  width: 100%;
  background: var(--color-white, #ffffff);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border: 1px solid var(--color-neutral-200, #e5e5e5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Native HTML table */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* Table header cells */
.pricing-table__th {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 40px;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border-bottom: 1px solid var(--color-neutral-100, #f5f5f5);
}

.pricing-table__th--feature {
  width: 40%;
}

/* Table body rows */
.pricing-table__row {
  transition: background-color 0.15s ease;
}

.pricing-table__row:hover {
  background-color: var(--color-neutral-50, #fafafa);
}

/* Table body cells */
.pricing-table__cell {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-neutral-100, #f5f5f5);
}

.pricing-table__cell--feature {
  vertical-align: top;
}

.pricing-table__cell--value {
  text-align: left;
}

/* Constrain icons in table cells */
.pricing-table__cell op-icon,
.pricing-table__cell .pricing-cell__icon {
  --op-icon-size: 20px !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  display: inline-flex !important;
  flex-shrink: 0;
  font-size: 20px !important;
}

/* Also target SVG inside op-icon */
.pricing-table__cell op-icon svg,
.pricing-table__cell op-icon::part(svg) {
  width: 20px !important;
  height: 20px !important;
}

.pricing-table__cell--erx {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* Mobile responsive for native tables */
@media (max-width: 1000px) {
  .pricing-table-section {
    margin-top: 24px;
  }

  .pricing-table-header {
    margin-bottom: 24px;
  }

  .pricing-table-wrapper {
    border-radius: 16px;
  }

  .pricing-table__th {
    padding: 12px 8px;
    font-size: 11px;
    line-height: 16px;
  }

  .pricing-table__cell {
    padding: 12px 8px;
  }
}

@media (max-width: 480px) {
  .pricing-table-wrapper {
    border-radius: 12px;
  }

  .pricing-table__th {
    padding: 8px 4px;
    font-size: 9px;
    line-height: 12px;
  }

  .pricing-table__cell {
    padding: 8px 4px;
  }
}

/* =============================================================================
   COMPARISON TABLES - Cell Styling (matches /free page pattern)
   ============================================================================= */

/* Table header cell */
.pricing-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 40px;
  white-space: nowrap;
}

/* Feature cell (first column) */
.pricing-cell--feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 16px 20px;
}

/* Value cells (icon/text columns) */
.pricing-cell--value {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 16px 20px;
}

/* Feature name */
.pricing-cell__name {
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
}

.pricing-cell__name--bold {
  font-weight: 600;
}

/* Feature annotation */
.pricing-cell__annotation {
  font-size: 12px;
  line-height: 16px;
  opacity: 0.5;
}

/* Cell text (prices, etc) */
.pricing-cell__text {
  font-size: 14px;
  line-height: 18px;
  opacity: 0.7;
}

/* Icon styling */
.pricing-cell__icon {
  flex-shrink: 0;
}

.pricing-cell__icon--dimmed {
  opacity: 0.5;
}

/* =============================================================================
   MOBILE RESPONSIVE - Tables
   ============================================================================= */

@media (max-width: 1000px) {
  /* Smaller header text */
  .pricing-header {
    padding: 12px 8px;
    font-size: 11px;
    line-height: 16px;
  }

  /* Smaller cell padding */
  .pricing-cell--feature,
  .pricing-cell--value {
    padding: 12px 8px;
  }

  /* Smaller feature text */
  .pricing-cell__name {
    font-size: 12px;
    line-height: 14px;
  }

  /* Hide annotations on mobile to save space */
  .pricing-cell__annotation {
    display: none;
  }

  /* Smaller value text */
  .pricing-cell__text {
    font-size: 11px;
    line-height: 14px;
  }

  /* Smaller icons */
  .pricing-cell__icon {
    --op-icon-size: 14px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .pricing-header {
    padding: 8px 4px;
    font-size: 9px;
    line-height: 12px;
  }

  .pricing-cell--feature,
  .pricing-cell--value {
    padding: 8px 4px;
  }

  .pricing-cell__name {
    font-size: 10px;
    line-height: 12px;
  }

  .pricing-cell__text {
    font-size: 9px;
    line-height: 12px;
  }

  .pricing-cell__icon {
    --op-icon-size: 12px;
  }

  /* ERX buy button - smaller on mobile */
  .erx-buy-now-btn {
    padding: 4px 8px;
    font-size: 10px;
    margin-top: 6px;
  }
}

/* =============================================================================
   BOTTOM CTA SECTION - Matches React BottomCTA component (same as about page)
   React: title 56px/64px weight 900, description 20px/24px opacity 0.75
   ============================================================================= */

/* Bottom CTA title - React: 56px/64px weight 900, white text */
.pricing-page .bottom-cta__title {
  color: var(--color-white);
  font-size: 56px;
  font-weight: 900;
  line-height: 64px;
  text-align: center;
  margin: 0;
}

/* Bottom CTA description - React: 20px/24px opacity 0.75, white text */
.pricing-page .bottom-cta__description {
  line-height: 24px;
  color: var(--color-white);
  font-size: 20px;
  opacity: 0.75;
  text-align: center;
  max-width: 640px;
  margin-bottom: 0;
}

/* Bottom CTA section item descriptions - white text on dark background */
.pricing-page op-website-section-item {
  --op-website-section-item-description-color: var(--color-primary-100);
  --color-primary-300: var(--color-primary-100);
}
.pricing-page op-website-section-item::part(description) {
  color: var(--color-primary-100) !important;
}
.pricing-page op-website-section-item span {
  color: var(--color-primary-100) !important;
}

/* Mobile responsive */
@media (max-width: 1000px) {
  .pricing-page .bottom-cta__title {
    font-size: 36px;
    line-height: 44px;
  }

  .pricing-page .bottom-cta__description {
    font-size: 16px;
    line-height: 22px;
  }
}

/* =============================================================================
   E-PRESCRIBING BUY NOW BUTTON
   ============================================================================= */

.erx-buy-now-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white, #ffffff);
  background-color: var(--color-primary-500, #10a267);
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.erx-buy-now-btn:hover {
  background-color: var(--color-primary-600, #0d8a56);
  color: var(--color-white, #ffffff);
}

