/* High Times Subscription - Premium Editorial Design */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  /* High Times Brand */
  --ht-red: #8D0A11;
  --ht-red-dark: #6d080d;
  --ht-red-light: #a50c14;
  --ht-red-glow: rgba(141, 10, 17, 0.15);
  --ht-black: #0f0f0f;
  --ht-gold: #c9a227;

  /* Refined Neutrals */
  --white: #ffffff;
  --cream: #faf9f7;
  --gray-50: #f7f6f4;
  --gray-100: #efeeec;
  --gray-200: #e0dfdc;
  --gray-300: #c8c6c3;
  --gray-400: #9c9a96;
  --gray-500: #6e6c68;
  --gray-600: #4a4845;
  --gray-700: #333230;
  --gray-800: #1f1e1d;
  --gray-900: #121110;

  /* Semantic */
  --success: #1a7f4b;
  --success-light: #e8f5ee;
  --error: #c41e3a;
  --error-light: #fce8ec;
  --warning: #b8860b;
  --warning-light: #fef7e6;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16), 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px var(--ht-red-glow);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--gray-900);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================
   PREMIUM TYPOGRAPHY
   ============================================ */

h1, h2, h3, .display-font {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ============================================
   LAYOUT
   ============================================ */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at top, rgba(141, 10, 17, 0.03) 0%, transparent 50%),
    var(--cream);
}

.header {
  background: var(--ht-black);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ht-red), transparent);
}

.logo {
  height: 40px;
  width: auto;
}

.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: var(--space-12) var(--space-5);
}

.footer {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--gray-500);
  font-size: 0.875rem;
  background: var(--ht-black);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
  color: var(--gray-400);
}

.footer a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--ht-red-light);
}

/* ============================================
   CHECKOUT LAYOUT
   ============================================ */

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: var(--space-12);
  max-width: 1000px;
  width: 100%;
  align-items: start;
}

.checkout-left,
.checkout-right {
  display: flex;
  flex-direction: column;
}

/* ============================================
   PLAN SELECTION (Left Column)
   ============================================ */

.plan-header {
  margin-bottom: var(--space-8);
}

.plan-header-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ht-red);
  margin-bottom: var(--space-3);
}

.plan-header-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--space-3);
}

.plan-header-subtitle {
  font-size: 1.125rem;
  color: var(--gray-500);
  font-weight: 400;
}

/* Plan Cards */
.plan-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.plan-card {
  position: relative;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ht-red);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.plan-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
}

.plan-card.selected {
  border-color: var(--ht-red);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.plan-card.selected::before {
  transform: scaleX(1);
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card-inner {
  display: flex;
  align-items: center;
  padding: var(--space-6);
  gap: var(--space-5);
}

/* Radio Circle */
.plan-radio {
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.plan-card.selected .plan-radio {
  border-color: var(--ht-red);
  background: var(--ht-red);
}

.plan-radio-dot {
  width: 10px;
  height: 10px;
  background: var(--white);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.2s ease;
}

.plan-card.selected .plan-radio-dot {
  opacity: 1;
  transform: scale(1);
}

/* Plan Content */
.plan-content {
  flex: 1;
  min-width: 0;
}

.plan-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}

.plan-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--ht-red);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.plan-description {
  font-size: 0.9375rem;
  color: var(--gray-500);
}

/* Plan Pricing */
.plan-pricing {
  text-align: right;
  flex-shrink: 0;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--space-2);
}

.plan-discount {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ht-red);
}

.plan-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
}

.plan-price-period {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--gray-500);
}

.plan-billing {
  font-size: 0.8125rem;
  color: var(--gray-400);
  margin-top: 2px;
}

/* Expanded Plan Info */
.plan-expanded {
  display: none;
  padding: 0 var(--space-6) var(--space-6);
  padding-left: calc(24px + var(--space-5) + var(--space-6));
}

.plan-card.selected .plan-expanded {
  display: block;
}

.plan-expanded-text {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* Features List */
.features-section {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--gray-200);
}

.features-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  margin-bottom: var(--space-5);
}

.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 1rem;
  color: var(--gray-700);
}

.feature-check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--ht-red);
}

/* ============================================
   CHECKOUT FORM (Right Column)
   ============================================ */

.checkout-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--gray-100);
}

.checkout-card-body {
  padding: var(--space-8);
}

/* Form Sections */
.form-section {
  margin-bottom: var(--space-8);
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.form-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  margin-bottom: var(--space-4);
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

/* Inputs */
.form-input,
input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--white);
  transition: all 0.2s ease;
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus {
  outline: none;
  border-color: var(--ht-red);
  box-shadow: 0 0 0 4px var(--ht-red-glow);
}

.form-input::placeholder,
input::placeholder {
  color: var(--gray-400);
}

.form-input:disabled,
input:disabled {
  background: var(--gray-50);
  color: var(--gray-500);
  cursor: not-allowed;
}

/* Square Card Container */
#card-container {
  min-height: 48px;
}

/* Order Summary */
.order-summary {
  background: var(--gray-50);
  margin: var(--space-8) calc(-1 * var(--space-8)) 0;
  padding: var(--space-6) var(--space-8);
  border-top: 1px solid var(--gray-200);
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: 1rem;
}

.order-summary-row span:first-child {
  color: var(--gray-600);
}

.order-summary-row span:last-child {
  color: var(--gray-900);
  font-weight: 600;
}

.order-summary-row.total {
  border-top: 2px solid var(--gray-200);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
}

.order-summary-row.total span:last-child {
  font-size: 1.25rem;
  font-weight: 700;
}

.order-summary-row.discount span:last-child {
  color: var(--success);
}

.discount-value {
  color: var(--success) !important;
}

.order-summary-note {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-200);
}

/* Discount Code Input */
.discount-row {
  display: flex;
  gap: var(--space-3);
}

.discount-input {
  flex: 1;
  text-transform: uppercase;
}

.btn-apply {
  width: auto;
  padding: var(--space-3) var(--space-6);
  flex-shrink: 0;
}

.discount-message {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
}

.discount-message.success {
  background: var(--success-light);
  color: var(--success);
}

.discount-message.error {
  background: var(--error-light);
  color: var(--error);
}

/* Checkout Footer */
.checkout-footer {
  padding: var(--space-8);
  padding-top: 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--ht-red);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(141, 10, 17, 0.4);
}

.btn-primary:hover:not(:disabled) {
  background: var(--ht-red-dark);
  box-shadow: 0 6px 20px rgba(141, 10, 17, 0.5);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--gray-300);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-900);
  border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.btn-outline {
  background: transparent;
  color: var(--ht-red);
  border: 2px solid var(--ht-red);
}

.btn-outline:hover {
  background: var(--ht-red);
  color: var(--white);
}

/* Button Loading State */
.btn .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: var(--space-3);
}

.btn.loading .spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Trust Badge */
.trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
  color: var(--gray-500);
  font-size: 0.875rem;
  font-weight: 500;
}

.trust-badge svg {
  width: 18px;
  height: 18px;
  color: var(--success);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  font-size: 0.9375rem;
  font-weight: 500;
}

.alert-error {
  background: var(--error-light);
  color: var(--error);
  border: 1px solid rgba(196, 30, 58, 0.2);
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(26, 127, 75, 0.2);
}

/* ============================================
   SUCCESS STATE
   ============================================ */

.success-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-12);
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: linear-gradient(135deg, var(--ht-red), var(--ht-red-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(141, 10, 17, 0.3);
}

.success-icon svg {
  width: 36px;
  height: 36px;
  fill: var(--white);
}

.success-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--space-3);
}

.success-subtitle {
  font-size: 1.125rem;
  color: var(--gray-500);
  margin-bottom: var(--space-8);
}

.success-details {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  text-align: left;
}

.success-details-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  margin-bottom: var(--space-4);
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  font-size: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.success-detail-row:last-child {
  border-bottom: none;
}

.success-detail-row span:first-child {
  color: var(--gray-500);
}

.success-detail-row span:last-child {
  font-weight: 600;
  color: var(--gray-900);
}

/* ============================================
   PRINT PAGE - PLAN SUMMARY
   ============================================ */

.plan-summary-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.plan-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.plan-summary-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
}

.plan-summary-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--ht-red);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.plan-summary-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-summary-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  font-family: 'Playfair Display', Georgia, serif;
}

.plan-summary-period {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--gray-500);
}

.plan-summary-note {
  font-size: 0.9375rem;
  color: var(--gray-500);
  margin-top: var(--space-2);
}

/* ============================================
   LOADING STATE
   ============================================ */

#loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  width: 100%;
}

#loading .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--ht-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#loading p {
  margin-top: var(--space-5);
  color: var(--gray-500);
  font-size: 1rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   MANAGE PAGE
   ============================================ */

.manage-container {
  max-width: 600px;
  width: 100%;
}

.manage-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-10);
  border: 1px solid var(--gray-100);
}

.manage-card-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.manage-card-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--space-3);
}

.manage-card-subtitle {
  font-size: 1.125rem;
  color: var(--gray-500);
}

.manage-back {
  margin-bottom: var(--space-6);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: none;
  color: var(--gray-600);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-back svg {
  width: 20px;
  height: 20px;
}

.manage-empty {
  text-align: center;
  padding: var(--space-8) 0;
}

.manage-empty p {
  color: var(--gray-500);
  font-size: 1.125rem;
  margin-bottom: var(--space-6);
}

.manage-empty .btn {
  width: auto;
  display: inline-flex;
}

.manage-cta {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

.manage-cta p {
  color: var(--gray-500);
  margin-bottom: var(--space-5);
  font-size: 1rem;
}

.manage-cta .btn {
  width: auto;
  display: inline-flex;
  padding: var(--space-4) var(--space-8);
}

/* Subscription Card */
.subscription-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-5);
  border: 1px solid var(--gray-100);
}

.subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-6);
}

.subscription-plan-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-1);
  font-family: 'Playfair Display', Georgia, serif;
}

.subscription-plan-price {
  font-size: 1rem;
  color: var(--gray-500);
}

.subscription-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
}

.subscription-status.status-active {
  background: var(--success-light);
  color: var(--success);
}

.subscription-status.status-canceled,
.subscription-status.status-cancelled {
  background: var(--gray-100);
  color: var(--gray-500);
}

.subscription-status.status-pending {
  background: var(--warning-light);
  color: var(--warning);
}

/* ============================================
   STRIPE HISTORY CARD - PREMIUM REDESIGN
   ============================================ */

.stripe-history-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: var(--space-5);
  border: 1px solid var(--gray-100);
}

.stripe-history-card-header {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--ht-black) 100%);
  padding: var(--space-6) var(--space-8);
  position: relative;
}

.stripe-history-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-8);
  right: var(--space-8);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.stripe-history-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: var(--gray-300);
  margin-bottom: var(--space-4);
  backdrop-filter: blur(4px);
}

.stripe-history-badge svg {
  width: 14px;
  height: 14px;
}

.stripe-history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.stripe-history-plan-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-1);
  font-family: 'Playfair Display', Georgia, serif;
}

.stripe-history-plan-price {
  font-size: 1rem;
  color: var(--gray-400);
}

.stripe-history-plan-pricing {
  text-align: right;
}

.stripe-history-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  font-family: 'Playfair Display', Georgia, serif;
}

.stripe-history-period {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.stripe-history-card-body {
  padding: var(--space-8);
}

.stripe-history-details {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.stripe-history-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gray-200);
}

.stripe-history-detail-row:last-child {
  border-bottom: none;
}

.stripe-history-detail-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.stripe-history-detail-value {
  font-size: 0.9375rem;
  color: var(--gray-900);
  font-weight: 600;
}

.stripe-history-message {
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--ht-red-glow) 0%, rgba(141, 10, 17, 0.08) 100%);
  border: 1px solid rgba(141, 10, 17, 0.15);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.stripe-history-message p {
  font-size: 1rem;
  color: var(--ht-red-dark);
  margin: 0;
  font-weight: 500;
}

/* CTA Buttons Grid */
.stripe-history-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.stripe-history-cta .btn {
  width: 100%;
  padding: var(--space-5) var(--space-4);
  font-size: 0.9375rem;
}

/* Plan Choice Cards */
.plan-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.plan-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.plan-choice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ht-red);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.plan-choice-card:hover {
  border-color: var(--ht-red);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-2px);
}

.plan-choice-card:hover::before {
  transform: scaleX(1);
}

.plan-choice-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  background: var(--gray-100);
  color: var(--gray-600);
  transition: all 0.25s ease;
}

.plan-choice-card:hover .plan-choice-icon {
  background: var(--ht-red);
  color: var(--white);
}

.plan-choice-icon svg {
  width: 28px;
  height: 28px;
}

.plan-choice-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.plan-choice-description {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.plan-choice-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ht-red);
  font-family: 'Playfair Display', Georgia, serif;
}

.subscription-details {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.subscription-detail-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  font-size: 1rem;
}

.subscription-detail-row:first-child {
  padding-top: 0;
}

.subscription-detail-row:last-child {
  padding-bottom: 0;
}

.subscription-detail-label {
  color: var(--gray-500);
}

.subscription-detail-value {
  font-weight: 600;
  color: var(--gray-900);
}

/* Payment Card Display */
.subscription-payment {
  margin-bottom: var(--space-6);
}

.payment-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}

.payment-card-icon {
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  box-shadow: var(--shadow-sm);
}

.payment-card-icon svg {
  width: 24px;
  height: 24px;
}

.payment-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-card-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.payment-card-number {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--ht-red);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-text-action:hover {
  background: var(--ht-red-glow);
}

/* Subscription Actions */
.subscription-actions {
  padding-top: var(--space-5);
  border-top: 1px solid var(--gray-200);
}

.btn-cancel {
  color: var(--gray-600);
}

.btn-cancel:hover {
  color: var(--error);
  border-color: var(--error);
  background: var(--error-light);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--gray-200);
}

.modal-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  font-family: 'Playfair Display', Georgia, serif;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.modal-close svg {
  width: 22px;
  height: 22px;
}

.modal-body {
  padding: var(--space-8);
}

.modal-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 0 var(--space-8) var(--space-8);
}

/* ============================================
   LEGACY SUPPORT
   ============================================ */

.container {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-6);
}

.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-8);
}

.section-header {
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--gray-500);
  margin-top: var(--space-2);
}

label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

/* Legacy form section title */
.form-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  margin-bottom: var(--space-4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
    max-width: 520px;
    gap: var(--space-8);
  }

  .checkout-left {
    order: 1;
  }

  .checkout-right {
    order: 2;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: var(--space-6) var(--space-4);
  }

  .header {
    padding: var(--space-4);
  }

  .logo {
    height: 32px;
  }

  .plan-header-title {
    font-size: 1.75rem;
  }

  .plan-card-inner {
    padding: var(--space-5);
    flex-wrap: wrap;
  }

  .plan-pricing {
    width: 100%;
    text-align: left;
    padding-left: calc(24px + var(--space-5));
    margin-top: var(--space-3);
  }

  .plan-price-row {
    justify-content: flex-start;
  }

  .checkout-card-body {
    padding: var(--space-6);
  }

  .checkout-footer {
    padding: var(--space-6);
    padding-top: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .order-summary {
    margin: var(--space-6) calc(-1 * var(--space-6)) 0;
    padding: var(--space-5) var(--space-6);
  }

  .manage-card {
    padding: var(--space-6);
  }

  .manage-card-title {
    font-size: 1.5rem;
  }

  .stripe-history-card-header {
    padding: var(--space-5) var(--space-6);
  }

  .stripe-history-card-body {
    padding: var(--space-6);
  }

  .stripe-history-plan-name {
    font-size: 1.375rem;
  }

  .stripe-history-cta {
    grid-template-columns: 1fr;
  }

  .plan-choice-grid {
    grid-template-columns: 1fr;
  }

  .plan-choice-card {
    padding: var(--space-5);
  }

  .stripe-history-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .stripe-history-plan-pricing {
    text-align: left;
  }
}
