/* ============================================
   VIP Membership System — Frontend Styles
   ============================================ */

:root {
  --vip-gold: #f59e0b;
  --vip-gold-light: #fde68a;
  --vip-dark: #1e1b4b;
  --vip-indigo: #4f46e5;
  --vip-green: #10b981;
  --vip-red: #ef4444;
  --vip-radius: 12px;
  --vip-shadow: 0 8px 32px rgba(79, 70, 229, 0.15);
}

/* ── Price display ───────────────────────── */
.vip-price-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vip-price-wrapper.vip-active .vip-current-price {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--vip-green);
}

.vip-price-wrapper.vip-active .vip-badge {
  display: inline-block;
  background: var(--vip-gold);
  color: #fff;
  font-size: 0.65em;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 4px;
}

.vip-price-wrapper.vip-active .vip-regular-price {
  font-size: 0.85em;
  color: #9ca3af;
}

.vip-price-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 0.82em;
  margin-top: 3px;
  padding: 4px 8px;
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 1px dashed var(--vip-gold);
  border-radius: 6px;
}

.vip-price-label {
  color: #92400e;
  font-weight: 600;
}

.vip-price-amount {
  font-weight: 700;
  color: var(--vip-green);
}

.vip-upsell-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--vip-gold);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.8em;
  padding: 2px 8px;
  border-radius: 20px;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  margin-left: auto; /* push to end, or onto new line if no space */
}

.vip-upsell-trigger:hover {
  background: #d97706;
  transform: scale(1.03);
}

.vip-crown { font-size: 1em; }

/* ── Top Banner ──────────────────────────── */

/* Banner lives inside #primary > .content-area — normal block flow, no flex fighting */
.vip-banner {
  display: block;
  width: 100%;
  margin-top: 0;
  margin-bottom: 16px;
}

.vip-banner__inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9em;
  font-weight: 500;
  border-radius: var(--vip-radius);
  box-sizing: border-box;
  line-height: 1.5;
  width: 100%;
}

.vip-banner--teaser .vip-banner__inner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #e0e7ff;
}

.vip-banner--teaser .vip-banner__inner strong { color: var(--vip-gold-light, #fde68a); }

.vip-banner--active .vip-banner__inner {
  background: linear-gradient(135deg, var(--vip-bg-active, #064e3b) 0%, #065f46 100%);
  color: #d1fae5;
}

.vip-banner--active .vip-banner__inner strong { color: #6ee7b7; }

.vip-banner__body {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  display: flex !important;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vip-banner__crown {
  font-size: 1.2em;
  flex-shrink: 0;
}

/* Legacy — keep for back compat */
.vip-banner__text {
  display: contents;
}

.vip-banner__btn {
  flex-shrink: 0;
  margin-left: auto;
  background: var(--vip-gold, #f59e0b);
  color: #1e1b4b !important;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  text-decoration: none !important;
  font-size: 0.88em;
  transition: background 0.2s;
  white-space: nowrap;
}

.vip-banner__btn:hover { background: #fbbf24; }

.vip-banner__expiry {
  flex-shrink: 0;
  margin-left: 8px;
  opacity: 0.7;
  font-size: 0.83em;
  white-space: nowrap;
}

/* Mobile: allow wrap on very small screens only */
@media (max-width: 480px) {
  .vip-banner {
    flex-wrap: wrap !important;
  }
  .vip-banner__expiry, .vip-banner__btn {
    margin-left: 0;
  }
}

/* ── Cart Banner ─────────────────────────── */
.vip-cart-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #e0e7ff;
  padding: 16px 20px;
  border-radius: var(--vip-radius);
  margin-bottom: 20px;
  box-shadow: var(--vip-shadow);
  flex-wrap: wrap;
}

.vip-cart-banner__icon {
  font-size: 2em;
  line-height: 1;
}

.vip-cart-banner__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vip-cart-banner__content strong { color: var(--vip-gold-light); font-size: 1.05em; }
.vip-cart-banner__content span { font-size: 0.85em; opacity: 0.8; }

.vip-cart-banner__btn {
  background: var(--vip-gold);
  color: #1e1b4b !important;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none !important;
  font-size: 0.9em;
  transition: background 0.2s;
  white-space: nowrap;
}

.vip-cart-banner__btn:hover { background: #fbbf24; }

/* ── Checkout Notice ─────────────────────── */
.vip-checkout-notice {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 2px solid var(--vip-gold);
  border-radius: var(--vip-radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.92em;
}

.vip-checkout-notice strong { color: #92400e; }

.vip-checkout-notice--active {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border-color: var(--vip-green);
}

.vip-checkout-notice--active span { color: var(--vip-green); font-weight: 700; font-size: 1.1em; }
.vip-checkout-notice--active small { display: block; color: #6b7280; font-size: 0.85em; }

.vip-checkout-link {
  margin-left: auto;
  color: var(--vip-indigo) !important;
  font-weight: 700;
  text-decoration: underline !important;
}

/* ── Shipping info in cart totals ────────── */
.vip-shipping-info td { font-size: 0.85em; color: var(--vip-green); padding: 4px 0 !important; }

/* ── Modal ───────────────────────────────── */
.vip-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.vip-modal__container {
  position: relative;
  background: #fff;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 32px 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  animation: vipModalIn 0.3s ease;
}

@keyframes vipModalIn {
  from { opacity: 0; transform: scale(0.93) translateY(20px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.vip-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.vip-modal__close:hover { background: #e5e7eb; }

.vip-modal__header {
  text-align: center;
  margin-bottom: 32px;
}

.vip-modal__crown {
  font-size: 2.5em;
  display: block;
  margin-bottom: 8px;
}

.vip-modal__header h2 {
  font-size: 1.8em;
  font-weight: 800;
  color: var(--vip-dark);
  margin: 0 0 8px;
}

.vip-modal__header p {
  color: #6b7280;
  font-size: 0.95em;
}

.vip-modal__plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

/* ── Plan Card ───────────────────────────── */
.vip-plan-card {
  border: 2px solid #e5e7eb;
  border-radius: var(--vip-radius);
  padding: 24px 20px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.vip-plan-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

.vip-plan-card--popular {
  border-color: var(--plan-color, var(--vip-gold));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--plan-color, var(--vip-gold)) 20%, transparent);
}

.vip-plan-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--plan-color, var(--vip-gold));
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.vip-plan-card__header { margin-bottom: 16px; }

.vip-plan-card__header h3 {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--plan-color, var(--vip-indigo));
  margin: 0 0 8px;
}

.vip-plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.vip-plan-card__amount {
  font-size: 1.8em;
  font-weight: 800;
  color: var(--vip-dark);
}

.vip-plan-card__period {
  color: #9ca3af;
  font-size: 0.85em;
}

.vip-plan-card__desc {
  font-size: 0.83em;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.vip-plan-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  flex: 1;
}

.vip-plan-card__features li {
  font-size: 0.85em;
  color: #374151;
  padding: 5px 0;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vip-plan-card__btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--plan-color, var(--vip-indigo));
  color: #fff !important;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  font-size: 0.95em;
  transition: opacity 0.2s, transform 0.1s;
}

.vip-plan-card__btn:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

.vip-plan-card__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.vip-modal__footer {
  text-align: center;
  font-size: 0.78em;
  color: #9ca3af;
  margin: 0;
}

/* ── Status Badge ────────────────────────── */
.vip-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  text-decoration: none !important;
}

.vip-status-badge--active {
  background: #ecfdf5;
  color: var(--vip-green);
  border: 1px solid #6ee7b7;
}

.vip-status-badge--inactive {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid var(--vip-gold);
}

/* ── Thank you page ──────────────────────── */
.vip-thankyou-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 2px solid var(--vip-green);
  border-radius: var(--vip-radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.vip-thankyou-notice .vip-crown { font-size: 1.8em; }

/* ── Inline plans shortcode ──────────────── */
.vip-plans-grid-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.vip-plan-card-inline {
  border: 2px solid #e5e7eb;
  border-radius: var(--vip-radius);
  padding: 28px 22px;
  position: relative;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.vip-plan-card-inline.popular {
  border-color: var(--plan-color);
}

.vip-plan-card-inline:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.vip-plan-card-inline h3 {
  color: var(--plan-color, var(--vip-indigo));
  font-size: 1.2em;
  margin: 0 0 12px;
}

.vip-plan-card-inline .price {
  font-size: 2em;
  font-weight: 800;
  color: var(--vip-dark);
  margin-bottom: 10px;
}

.vip-plan-card-inline .price span {
  font-size: 0.45em;
  font-weight: 400;
  color: #9ca3af;
}

.vip-plan-card-inline ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
  text-align: left;
}

.vip-plan-card-inline ul li {
  font-size: 0.85em;
  color: #374151;
  padding: 5px 0;
	border-bottom: 1px solid #f3f4f6;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 640px) {
  .vip-modal__container { padding: 28px 16px 20px; }
  .vip-modal__plans { grid-template-columns: 1fr; }
  .vip-banner { flex-wrap: wrap; gap: 8px; }
}

