/* ==========================================================================
   SERENA HEALTH - STOREFRONT DESIGN SYSTEM
   Component-specific styles for the medical pharmacy storefront
   ========================================================================== */

/* ==========================================================================
   PROVIDER CARD COMPONENT
   Displays medical team credentials (e.g., Jenna Dykstra, PA-C)
   ========================================================================== */

.provider-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--spacing-4);
  background-color: var(--color-cream);
  border-left: 4px solid var(--color-accent-purple);
  border-radius: var(--radius-md);
  padding: var(--spacing-4);
  transition: var(--transition-standard);
}

.provider-card:hover {
  box-shadow: var(--shadow-medium);
}

/* Provider Photo */
.provider-card__photo {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--color-gray-100);
}

.provider-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Provider Content Container */
.provider-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-1);
}

/* Provider Name */
.provider-card__name {
  font-family: var(--font-family-heading);
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-accent-purple);
  line-height: var(--line-height-tight);
  margin: 0;
}

/* Provider Title/Role */
.provider-card__title {
  font-family: var(--font-family-label);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  margin: 0;
  margin-top: var(--spacing-0-5);
}

/* Provider Credentials List */
.provider-card__credentials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-1);
  margin-top: var(--spacing-1-5);
  padding: 0;
  list-style: none;
}

.provider-card__credentials li {
  font-family: var(--font-family-body);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  padding: var(--spacing-0-5) var(--spacing-1);
  background-color: var(--color-gray-100);
  border-radius: var(--radius-sm);
}

/* Provider Bio */
.provider-card__bio {
  font-family: var(--font-family-body);
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin: 0;
  margin-top: var(--spacing-2);
}

/* ==========================================================================
   PROVIDER CARD - MOBILE STYLES
   ========================================================================== */

@media (max-width: 768px) {
  .provider-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-3);
  }

  .provider-card__photo {
    width: 120px;
    height: 120px;
  }

  .provider-card__content {
    align-items: center;
  }

  .provider-card__credentials {
    justify-content: center;
  }

  .provider-card__name {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   PROVIDER CARD VARIANTS
   ========================================================================== */

/* Compact variant */
.provider-card--compact {
  padding: var(--spacing-3);
  gap: var(--spacing-3);
}

.provider-card--compact .provider-card__photo {
  width: 100px;
  height: 100px;
}

.provider-card--compact .provider-card__name {
  font-size: 1.25rem;
}

.provider-card--compact .provider-card__bio {
  font-size: 0.875rem;
}

/* Featured variant */
.provider-card--featured {
  border-left-width: 6px;
  padding: var(--spacing-5);
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-white) 100%);
  box-shadow: var(--shadow-subtle);
}

.provider-card--featured .provider-card__photo {
  width: 180px;
  height: 180px;
  border: 4px solid var(--color-white);
  box-shadow: var(--shadow-medium);
}

/* ==========================================================================
   PRICING CARD COMPONENT
   For subscription vs one-time purchase options
   ========================================================================== */

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--color-white);
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  padding: var(--spacing-4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--color-accent-purple);
  box-shadow: var(--shadow-medium);
}

/* Plan Type Label */
.pricing-card__label {
  font-family: var(--font-family-label);
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-widest);
  color: var(--color-accent-purple);
  margin: 0;
  margin-bottom: var(--spacing-2);
}

/* Price Display */
.pricing-card__price {
  font-family: var(--font-family-heading);
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1;
  margin: 0;
}

.pricing-card__price-currency {
  font-size: 1.5rem;
  vertical-align: top;
  margin-right: 2px;
}

.pricing-card__price-period {
  font-family: var(--font-family-body);
  font-size: 0.875rem;
  font-weight: var(--font-weight-normal);
  color: var(--color-text-tertiary);
}

/* Billing Frequency */
.pricing-card__frequency {
  font-family: var(--font-family-body);
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
  margin: 0;
  margin-top: var(--spacing-1);
}

/* Features List */
.pricing-card__features {
  width: 100%;
  list-style: none;
  padding: 0;
  margin: var(--spacing-3) 0;
  text-align: left;
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-1);
  font-family: var(--font-family-body);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  padding: var(--spacing-1) 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.pricing-card__features li:last-child {
  border-bottom: none;
}

/* Checkmark icon for features */
.pricing-card__features li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B3F9D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* CTA Button Container */
.pricing-card__cta {
  width: 100%;
  margin-top: auto;
  padding-top: var(--spacing-2);
}

/* ==========================================================================
   PRICING CARD - FEATURED VARIANT
   "Most Popular" highlighted option
   ========================================================================== */

.pricing-card--featured {
  border: 2px solid transparent;
  background: 
    linear-gradient(var(--color-white), var(--color-white)) padding-box,
    var(--gradient-primary) border-box;
  box-shadow: var(--shadow-medium);
  transform: scale(1.02);
}

.pricing-card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(233, 30, 140, 0.03) 0%, 
    rgba(123, 63, 157, 0.03) 50%, 
    rgba(0, 71, 187, 0.03) 100%
  );
  border-radius: var(--radius-md);
  pointer-events: none;
  z-index: 0;
}

.pricing-card--featured > * {
  position: relative;
  z-index: 1;
}

.pricing-card--featured:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-elevated);
}

/* "Most Popular" Badge */
.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-family-label);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  color: var(--color-white);
  background: var(--gradient-primary);
  padding: var(--spacing-0-5) var(--spacing-2);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ==========================================================================
   PRICING CARD - MOBILE STYLES
   ========================================================================== */

@media (max-width: 768px) {
  .pricing-card {
    padding: var(--spacing-3);
  }

  .pricing-card__price {
    font-size: 2rem;
  }

  .pricing-card--featured {
    transform: scale(1);
  }

  .pricing-card--featured:hover {
    transform: scale(1);
  }
}

/* ==========================================================================
   PRICING CARD VARIANTS
   ========================================================================== */

/* Compact variant for inline display */
.pricing-card--compact {
  padding: var(--spacing-3);
}

.pricing-card--compact .pricing-card__price {
  font-size: 2rem;
}

.pricing-card--compact .pricing-card__features li {
  font-size: 0.875rem;
  padding: var(--spacing-0-5) 0;
}

/* Horizontal variant */
.pricing-card--horizontal {
  flex-direction: row;
  text-align: left;
  gap: var(--spacing-4);
}

.pricing-card--horizontal .pricing-card__features {
  margin: 0;
}

@media (max-width: 768px) {
  .pricing-card--horizontal {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   COMPARISON TABLE COMPONENT
   For product comparisons (e.g., Injectable vs Sublingual)
   ========================================================================== */

/* Table Container - enables horizontal scroll on mobile */
.comparison-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Base Table Styles */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  background-color: var(--color-white);
  min-width: 600px;
}

/* Header Row */
.comparison-table thead {
  background: linear-gradient(135deg, 
    rgba(233, 30, 140, 0.08) 0%, 
    rgba(123, 63, 157, 0.08) 50%, 
    rgba(0, 71, 187, 0.08) 100%
  );
}

.comparison-table th {
  font-family: var(--font-family-heading);
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-align: center;
  padding: 1.5rem 1rem;
  border-bottom: 2px solid var(--color-gray-200);
}

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

/* Header with gradient text */
.comparison-table th.th--gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Body Rows */
.comparison-table tbody tr {
  background-color: var(--color-white);
  transition: background-color var(--transition-fast);
}

.comparison-table tbody tr:nth-child(even) {
  background-color: var(--color-gray-50);
}

.comparison-table tbody tr:hover {
  background-color: var(--color-accent-purple-light);
}

/* Body Cells */
.comparison-table td {
  font-family: var(--font-family-body);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid var(--color-gray-200);
  vertical-align: middle;
}

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

/* First Column - Feature Names */
.comparison-table td:first-child,
.comparison-table th:first-child {
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  min-width: 180px;
}

/* Checkmark and X icons for comparison */
.comparison-table .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--color-success-light);
  border-radius: var(--radius-full);
}

.comparison-table .check::before {
  content: '';
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.comparison-table .cross {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--color-gray-100);
  border-radius: var(--radius-full);
}

.comparison-table .cross::before {
  content: '';
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239e9e9e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Highlight Column */
.comparison-table .col--highlight {
  background-color: rgba(123, 63, 157, 0.05);
}

.comparison-table th.col--highlight {
  background: linear-gradient(135deg, 
    rgba(233, 30, 140, 0.15) 0%, 
    rgba(123, 63, 157, 0.15) 50%, 
    rgba(0, 71, 187, 0.15) 100%
  );
}

/* ==========================================================================
   COMPARISON TABLE - MOBILE STYLES
   ========================================================================== */

@media (max-width: 768px) {
  .comparison-table {
    min-width: 500px;
  }

  .comparison-table th {
    font-size: 1rem;
    padding: 1rem 0.75rem;
  }

  .comparison-table td {
    font-size: 0.875rem;
    padding: 0.75rem;
  }

  .comparison-table td:first-child,
  .comparison-table th:first-child {
    min-width: 140px;
  }
}

/* Sticky First Column Option */
.comparison-table--sticky-first {
  position: relative;
}

.comparison-table--sticky-first th:first-child,
.comparison-table--sticky-first td:first-child {
  position: sticky;
  left: 0;
  background-color: var(--color-white);
  z-index: 1;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.comparison-table--sticky-first tbody tr:nth-child(even) td:first-child {
  background-color: var(--color-gray-50);
}

.comparison-table--sticky-first thead th:first-child {
  background: linear-gradient(135deg, 
    rgba(233, 30, 140, 0.08) 0%, 
    rgba(123, 63, 157, 0.08) 50%, 
    rgba(0, 71, 187, 0.08) 100%
  );
  z-index: 2;
}

/* ==========================================================================
   COMPARISON TABLE VARIANTS
   ========================================================================== */

/* Compact variant */
.comparison-table--compact th {
  padding: 1rem 0.75rem;
  font-size: 1rem;
}

.comparison-table--compact td {
  padding: 0.75rem;
  font-size: 0.875rem;
}

/* Bordered variant */
.comparison-table--bordered td,
.comparison-table--bordered th {
  border: 1px solid var(--color-gray-200);
}

/* No shadow variant */
.comparison-table--flat {
  box-shadow: none;
  border: 1px solid var(--color-gray-200);
}

/* ==========================================================================
   PRODUCT CARD COMPONENT
   ========================================================================== */

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-4px);
}

.product-card img {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}

.product-card:hover img {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.product-card__content {
  padding: var(--spacing-3);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__category {
  font-family: var(--font-family-label);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-widest);
  color: var(--color-accent-purple);
  margin-bottom: var(--spacing-1);
}

.product-card__name {
  font-family: var(--font-family-heading);
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-1) 0;
}

.product-card__price {
  font-family: var(--font-family-body);
  font-size: 1.125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-2);
}

.product-card__price-period {
  font-size: 0.875rem;
  font-weight: var(--font-weight-normal);
  color: var(--color-text-tertiary);
}

.product-card__cta {
  margin-top: auto;
}
