/*
 * Frontend styles for the CMS Page Builder blocks
 * (kept intentionally small + Bootstrap-friendly)
 */

.cmsb-hero{
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 48px 0;

  /* Defaults (can be overridden by cmsb-text-dark / cmsb-text-light) */
  --cmsb-hero-overlay: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.55));
  --cmsb-hero-title: #fff;
  --cmsb-hero-subtitle: rgba(255,255,255,0.9);
  --cmsb-hero-badge-bg: rgba(255,255,255,0.15);
  --cmsb-hero-badge-color: #fff;
  --cmsb-hero-badge-border: rgba(255,255,255,0.25);
}

.cmsb-hero__overlay{
  position:absolute;
  inset:0;
  background: var(--cmsb-hero-overlay);
}

.cmsb-hero .container{ z-index: 1; }

.cmsb-hero__badge{
  background: var(--cmsb-hero-badge-bg);
  color: var(--cmsb-hero-badge-color);
  border: 1px solid var(--cmsb-hero-badge-border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.cmsb-hero__title{ color: var(--cmsb-hero-title); font-weight:800; letter-spacing:-0.02em; }
.cmsb-hero__subtitle{ color: var(--cmsb-hero-subtitle); font-size:1.15rem; }

/* If the user forces dark text, invert the hero overlay + text colors */
.cmsb-hero.cmsb-text-dark{
  --cmsb-hero-overlay: linear-gradient(180deg, rgba(255,255,255,0.60), rgba(255,255,255,0.60));
  --cmsb-hero-title: #0b1220;
  --cmsb-hero-subtitle: rgba(11,18,32,0.82);
  --cmsb-hero-badge-bg: rgba(255,255,255,0.85);
  --cmsb-hero-badge-color: #0b1220;
  --cmsb-hero-badge-border: rgba(0,0,0,0.12);
}

.cmsb-section{ position: relative; }

.cmsb-page-wrap{ width:100%; margin-left:auto; margin-right:auto; padding-left: 12px; padding-right: 12px; }
@media (max-width: 768px){ .cmsb-page-wrap{ max-width: 100% !important; padding-left: 10px; padding-right: 10px; } }

.cmsb-section--custom{ background-size: cover; background-position: center; background-repeat: no-repeat; }
.cmsb-text-light{ color:#fff; }
.cmsb-text-light .cmsb-section__subtitle,
.cmsb-text-light .cmsb-richtext,
.cmsb-text-light .cmsb-card__text,
.cmsb-text-light .cmsb-image__caption,
.cmsb-text-light .cmsb-cta__text{ color: rgba(255,255,255,0.88); }

/* Make card-like elements readable on dark/colored backgrounds when text is light */
.cmsb-text-light .cmsb-card,
.cmsb-text-light .cmsb-price-card{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
}
.cmsb-text-dark{ color:#0b1220; }

.cmsb-bg-inline{ border-radius: 18px; overflow:hidden; }
.cmsb-bg-inline.has-bg{ padding: 18px; }


.cmsb-section--muted{ background: #F8FAFC !important; }
.cmsb-section--dark{ background: #0b1220 !important; color: #fff; }
.cmsb-section--dark .cmsb-richtext, .cmsb-section--dark .cmsb-section__subtitle{ color: rgba(255,255,255,0.9); }

.cmsb-section__title{ font-weight: 800; letter-spacing: -0.02em; }
.cmsb-section__subtitle{ color: rgba(0,0,0,0.65); }

.cmsb-richtext p{ line-height: 1.7; }
.cmsb-richtext h1, .cmsb-richtext h2, .cmsb-richtext h3{ font-weight: 800; letter-spacing: -0.02em; }

.cmsb-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.cmsb-card__icon{
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,123,255,0.08);
  margin-bottom: 10px;
}

.cmsb-card__title{ font-weight: 700; }
.cmsb-card__text{ color: rgba(0,0,0,0.65); margin-top: 6px; }

.cmsb-image__caption{ color: rgba(0,0,0,0.6); font-size: 0.95rem; }

.cmsb-cta{
  background: linear-gradient(135deg, rgba(0,123,255,0.08), rgba(0,123,255,0.02));
  border: 1px solid rgba(0,123,255,0.16);
  border-radius: 18px;
  padding: 22px;
}

.cmsb-cta__title{ font-weight: 800; margin:0; }
.cmsb-cta__text{ margin:0; color: rgba(0,0,0,0.7); }

.cmsb-section--dark .cmsb-cta{ background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); }
.cmsb-section--dark .cmsb-cta__text{ color: rgba(255,255,255,0.85); }

/* Pricing comparison */
.cmsb-price-card{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.04);
  height: 100%;
  display:flex;
  flex-direction: column;
}
.cmsb-price-card.is-featured{
  border-color: rgba(0,123,255,0.45);
  box-shadow: 0 16px 32px rgba(0,123,255,0.10);
}
.cmsb-price-card__header{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.cmsb-price-card__name{ font-weight: 800; font-size: 1.1rem; }
.cmsb-price-card__badge{
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,123,255,0.10);
  color: rgba(0,123,255,1);
  border: 1px solid rgba(0,123,255,0.20);
  white-space: nowrap;
}
.cmsb-price-card__price{ margin-top: 12px; display:flex; align-items:baseline; gap:6px; }
.cmsb-price-card__currency{ font-weight: 800; opacity: 0.8; }
.cmsb-price-card__amount{ font-weight: 900; font-size: 2rem; letter-spacing: -0.02em; }
.cmsb-price-card__period{ color: rgba(0,0,0,0.6); }
.cmsb-price-card__features{ margin: 14px 0 18px; padding-left: 0; list-style: none; flex: 1; }
.cmsb-price-card__features li{ display:flex; gap:10px; align-items:flex-start; padding: 6px 0; color: rgba(0,0,0,0.75); }
.cmsb-price-card__features i{ margin-top: 3px; color: rgba(0,123,255,1); }
.cmsb-price-card__cta{ border-radius: 14px; padding: 10px 12px; }

/* Pricing comparison (table style) */
.cmsb-pricing-compare{ width:100%; }
.cmsb-pc-period{ margin: 0 0 14px; }
.cmsb-pc-wrap{
  overflow-x: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.04);
}
.cmsb-pc-table{ margin:0; min-width: 760px; }
.cmsb-pc-table th, .cmsb-pc-table td{ border-color: rgba(0,0,0,0.08); padding: 12px 14px; vertical-align: middle; }
.cmsb-pc-th-feature{ position: sticky; left:0; background:#fff; z-index:2; min-width: 210px; }
.cmsb-pc-feature{ position: sticky; left:0; background:#fff; z-index:1; font-weight: 800; }
.cmsb-pc-planhead{ text-align:center; min-width: 180px; }
.cmsb-pc-planhead.is-featured{ background: rgba(0,123,255,0.05); }
.cmsb-pc-planhead.is-active{ box-shadow: inset 0 -2px 0 rgba(0,123,255,0.7); }
.cmsb-pc-select{ border:0; background:transparent; padding:0; width:100%; }
.cmsb-pc-planname{ font-weight: 900; font-size: 1.05rem; }
.cmsb-pc-badge{
  display:inline-block;
  margin-top:6px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,123,255,0.10);
  color: rgba(0,123,255,1);
  border: 1px solid rgba(0,123,255,0.20);
}
.cmsb-pc-price{ margin-top: 10px; font-weight: 900; font-size: 1.5rem; letter-spacing: -0.02em; }
.cmsb-pc-suffix{ font-size: 0.95rem; font-weight: 700; color: rgba(0,0,0,0.55); margin-left: 4px; }
.cmsb-pc-cell{ text-align:center; }
.cmsb-pc-cell.is-active{ background: rgba(0,123,255,0.04); }
.cmsb-pc-yes i{ color: rgba(0,123,255,1); }
.cmsb-pc-no{ color: rgba(0,0,0,0.35); }

.cmsb-pc-actions{
  margin-top: 14px;
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  padding: 14px;
}

/* Pricing selector */
.cmsb-ps-panel{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 18px;
  padding: 16px;
}
.cmsb-ps-heading{ margin: 0 0 10px; font-weight: 800; }
.cmsb-ps-options{ display:flex; flex-direction: column; gap: 10px; }
.cmsb-ps-option{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  cursor: pointer;
}
.cmsb-ps-option input{ margin-top: 4px; }
.cmsb-ps-option__main{ display:flex; justify-content:space-between; width:100%; gap: 10px; }
.cmsb-ps-option__label{ font-weight: 700; }
.cmsb-ps-option__desc{ display:block; color: rgba(0,0,0,0.6); font-size: 0.9rem; margin-top: 2px; }
.cmsb-ps-option__price{ font-weight: 800; white-space: nowrap; }
.cmsb-ps-divider{ margin: 14px 0; opacity: 0.15; }

.cmsb-ps-summary{
  background: linear-gradient(135deg, rgba(0,123,255,0.08), rgba(0,123,255,0.02));
  border: 1px solid rgba(0,123,255,0.18);
  border-radius: 18px;
  padding: 16px;
  height: 100%;
  display:flex;
  flex-direction: column;
}
.cmsb-ps-summary__top{ display:flex; align-items:center; justify-content:space-between; gap: 10px; }
.cmsb-ps-summary__label{ font-weight: 800; }
.cmsb-ps-summary__total{ font-weight: 900; font-size: 1.8rem; letter-spacing: -0.02em; }
.cmsb-ps-summary__period{ font-size: 1rem; font-weight: 700; color: rgba(0,0,0,0.55); margin-left: 6px; }
.cmsb-ps-summary__items{ margin-top: 14px; flex: 1; }
.cmsb-ps-summary__sub{ font-weight: 800; margin-bottom: 8px; }
.cmsb-ps-summary__list{ padding-left: 18px; margin: 0; color: rgba(0,0,0,0.7); }
.cmsb-ps-summary__note{ margin-top: 10px; color: rgba(0,0,0,0.6); font-size: 0.92rem; }


/* Pricing compare discount display */
.cmsb-pc-price-modern,
.cmsb-price-card__price-modern{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.cmsb-pc-price-old,
.cmsb-price-card__price-old{
  display:none;
  font-size:.95rem;
  font-weight:700;
  color:#dc3545;
  text-decoration:line-through;
  text-decoration-thickness:2px;
}
.cmsb-pc-price-current.is-discounted,
.cmsb-price-card__price-current.is-discounted{
  color:#198754;
}
.cmsb-pc-discount-note{
  min-height:1.1rem;
  font-size:.85rem;
  font-weight:700;
  color:#198754;
}

/* Compact pricing selector summary + options */
.cmsb-ps-option-wrap--compact{gap:8px!important;align-items:center!important;}
.cmsb-ps-option-wrap--compact .cmsb-ps-option{padding:9px 11px;border-radius:12px;}
.cmsb-ps-option-wrap--compact [data-addon-qty]{
  height:36px;
  min-height:36px;
  border-radius:10px;
  padding:4px 6px;
  font-size:13px;
  text-align:center;
  -webkit-appearance:textfield !important;
  appearance:textfield !important;
  -moz-appearance:textfield !important;
}

.cmsb-ps-option-wrap--compact [data-addon-qty]::-webkit-outer-spin-button,
.cmsb-ps-option-wrap--compact [data-addon-qty]::-webkit-inner-spin-button{
  -webkit-appearance:none !important;
  margin:0 !important;
}
.cmsb-ps-qty-stepper{display:flex;align-items:center;gap:6px;}
.cmsb-ps-qty-stepper [data-addon-qty]{flex:1 1 auto;min-width:0;width:100%;}
.cmsb-ps-qty-stepper__btn{display:inline-flex;align-items:center;justify-content:center;width:32px;min-width:32px;height:36px;border:1px solid rgba(15,23,42,.12);border-radius:10px;background:#fff;color:inherit;font-size:18px;line-height:1;font-weight:700;padding:0;touch-action:manipulation;}
.cmsb-ps-qty-stepper__btn:disabled{opacity:.55;cursor:not-allowed;}
.cmsb-ps-summary__top{align-items:flex-start;flex-direction:column;gap:6px;}
.cmsb-ps-summary__label{font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;opacity:.8;}
.cmsb-ps-summary__total{font-size:2rem;line-height:1;font-weight:900;letter-spacing:-.03em;}
.cmsb-ps-summary__savings{margin-top:0;font-size:.88rem;line-height:1.3;}
.cmsb-ps-summary__items{margin-top:12px;}
.cmsb-ps-summary__sub{font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;opacity:.8;margin-bottom:6px;}
.cmsb-ps-summary__list{padding-left:16px;font-size:.94rem;line-height:1.45;}
.cmsb-ps-summary .btn{border-radius:12px;padding:.72rem 1rem;font-weight:700;}
.cmsb-ps-option__price .cmsb-price-stack,
.cmsb-ps-option__price .cmsb-price-stack__top{align-items:flex-end;}
.cmsb-ps-option__price .cmsb-price-stack__old{color:#dc3545;opacity:1;text-decoration-thickness:2px;}
.cmsb-ps-option__price .cmsb-price-stack__now{color:#198754;}
.cmsb-ps-option__price .cmsb-price-stack__meta{color:#198754;opacity:1;font-weight:700;}
