﻿/* ============================================================
   EcomBridge Price Calculator -- calculator.css  v2.0.0
   ============================================================ */

/*  CSS variables  */
#ebc-calculator {
  --ebc-primary:       #2563eb;
  --ebc-primary-dark:  #1d4ed8;
  --ebc-primary-light: #eff6ff;
  --ebc-border:        #e2e8f0;
  --ebc-bg:            #fff;
  --ebc-surface:       #f8fafc;
  --ebc-text:          #1e293b;
  --ebc-muted:         #64748b;
  --ebc-radius:        12px;
  --ebc-shadow:        0 4px 20px rgba(0,0,0,.08);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--ebc-text);
}

/*  Layout  */
.ebc-calculator {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px;
  box-sizing: border-box;
}
@media (max-width: 780px) {
  .ebc-calculator { grid-template-columns: 1fr; }
}

/*  Sections  */
.ebc-section {
  background: var(--ebc-bg);
  border: 1.5px solid var(--ebc-border);
  border-radius: var(--ebc-radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.ebc-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ebc-section-icon { font-size: 18px; }
.ebc-section-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ebc-text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/*  Badges  */
.ebc-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.ebc-badge--required { background: #fee2e2; color: #b91c1c; }
.ebc-badge--optional { background: #e0f2fe; color: #0369a1; }

/*  Line items (app, yearly options)  */
.ebc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1.5px solid var(--ebc-border);
  border-radius: 10px;
  margin-bottom: 8px;
  gap: 10px;
  transition: border-color .15s, background .15s;
}
.ebc-item--checkbox { cursor: pointer; }
.ebc-item--checkbox:hover { border-color: var(--ebc-primary); background: var(--ebc-primary-light); }
.ebc-item--locked   { background: var(--ebc-surface); cursor: default; }

.ebc-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ebc-item-left input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--ebc-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.ebc-item-name  { display: block; font-weight: 600; font-size: 13px; }
.ebc-item-tag   { display: block; font-size: 11px; color: var(--ebc-muted); margin-top: 2px; }
.ebc-item-price { font-weight: 700; color: var(--ebc-primary); white-space: nowrap; font-size: 13px; }
.ebc-checkmark  { color: var(--ebc-primary); font-size: 16px; font-weight: 700; }
.ebc-per        { font-weight: 400; font-size: 11px; color: var(--ebc-muted); margin-left: 2px; }

/*  Feature cards  */
.ebc-features-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ebc-feature-card {
  border: 1.5px solid var(--ebc-border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--ebc-bg);
  transition: border-color .15s, background .15s;
  user-select: none;
}
.ebc-feature-card:hover { border-color: var(--ebc-primary); background: var(--ebc-primary-light); }

.ebc-feature-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ebc-feature-checkbox {
  width: 16px; height: 16px;
  accent-color: var(--ebc-primary);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 3px;
}

.ebc-feature-info { flex: 1; min-width: 0; }

.ebc-feature-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ebc-feature-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  flex: 1;
}

.ebc-feature-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/*  Type badges (on feature cards)  */
.ebc-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.ebc-type-client { background: #dbeafe; color: #1d4ed8; }
.ebc-type-agent  { background: #fed7aa; color: #c2410c; }
.ebc-type-both   { background: #d1fae5; color: #065f46; }

/*  Video play button  */
.ebc-video-btn {
  width: 24px; height: 24px;
  background: var(--ebc-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  transition: background .15s, transform .1s;
}
.ebc-video-btn:hover { background: var(--ebc-primary-dark); transform: scale(1.15); }

.ebc-feature-desc {
  font-size: 12px;
  color: var(--ebc-muted);
  margin: 0 0 8px;
  line-height: 1.5;
}

.ebc-feature-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.ebc-feature-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--ebc-primary);
  white-space: nowrap;
}

.ebc-qty-select {
  font-size: 12px;
  padding: 3px 6px;
  border: 1.5px solid var(--ebc-border);
  border-radius: 6px;
  cursor: pointer;
  accent-color: var(--ebc-primary);
}

/*  No features message  */
.ebc-no-features {
  text-align: center;
  color: var(--ebc-muted);
  font-size: 13px;
  padding: 16px;
  margin: 0;
}

/*  Validation message  */
.ebc-validation-msg {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 8px;
  color: #c2410c;
  font-size: 13px;
  font-weight: 600;
}

/*  Term selector  */
.ebc-term-row {
  display: flex;
  gap: 12px;
}
.ebc-term-card {
  flex: 1;
  display: flex;
  cursor: pointer;
}
.ebc-term-card input[type="radio"] { display: none; }
.ebc-term-content {
  flex: 1;
  border: 2px solid var(--ebc-border);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.ebc-term-card input:checked ~ .ebc-term-content {
  border-color: var(--ebc-primary);
  background: var(--ebc-primary-light);
}
.ebc-term-months { display: block; font-size: 28px; font-weight: 800; color: var(--ebc-primary); }
.ebc-term-label  { display: block; font-size: 12px; color: var(--ebc-muted); }

/*  Summary panel  */
.ebc-right { position: sticky; top: 20px; align-self: start; }

.ebc-summary {
  background: var(--ebc-bg);
  border: 1.5px solid var(--ebc-border);
  border-radius: var(--ebc-radius);
  padding: 20px;
  box-shadow: var(--ebc-shadow);
}

.ebc-summary-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ebc-text);
}

.ebc-summary-section {
  border-top: 1.5px solid var(--ebc-border);
  padding-top: 14px;
  margin-top: 14px;
}
.ebc-summary-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.ebc-summary-section h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ebc-muted);
}

.ebc-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 13px;
}
.ebc-summary-row span:first-child { color: var(--ebc-muted); }
.ebc-summary-row span:last-child  { font-weight: 600; }
.ebc-summary-row--term span { font-style: italic; font-size: 12px; }
.ebc-summary-row--sub { border-top: 1px dashed var(--ebc-border); padding-top: 6px; margin-top: 2px; }

.ebc-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--ebc-primary);
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.ebc-summary-total span:last-child { font-size: 16px; }

.ebc-summary-section--recurring { background: var(--ebc-surface); border-radius: 10px; padding: 14px; margin-top: 14px; }
.ebc-summary-section--recurring h4 { margin-bottom: 8px; }

.ebc-disclaimer {
  font-size: 11px;
  color: var(--ebc-muted);
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--ebc-border);
  line-height: 1.6;
}

/*  Video modal  */
.ebc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ebc-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(5px);
}
.ebc-modal-box {
  position: relative;
  z-index: 1;
  background: #000;
  border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
  overflow: hidden;
  width: 90vw;
  max-width: 860px;
}
.ebc-modal-body iframe,
.ebc-modal-body video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}
.ebc-modal-body video { max-height: 70vh; object-fit: contain; }
.ebc-modal-close {
  position: absolute;
  top: 10px; right: 12px;
  z-index: 2;
  background: rgba(255,255,255,.18);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  padding: 0;
}
.ebc-modal-close:hover { background: rgba(255,255,255,.35); }