/* ============================================================================
   PREMIUM CALCULATOR CSS
   ============================================================================ */

/* ── Layout & Typography ───────────────────────────────────────────────── */
.do-premium-calc-section {
  padding: var(--do-space-16) 0;
  background-color: var(--do-bg);
}

.do-premium-calc-section--tinted {
  background-color: var(--do-bg-alt);
}

.do-premium-calc-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--do-space-16);
}

.do-premium-calc-header .do-overline {
  color: var(--do-primary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--do-space-4);
  display: block;
}

.do-premium-calc-header .do-h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 3rem;
  margin-bottom: var(--do-space-4);
  line-height: 1.1;
  color: var(--do-text);
}

.do-premium-calc-header p {
  color: var(--do-text-muted);
  font-size: 1.125rem;
}

/* ── Grid Layouts ──────────────────────────────────────────────────────── */
.do-premium-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--do-space-8);
  align-items: start;
}

@media (max-width: 991px) {
  .do-premium-calc-grid {
    grid-template-columns: 1fr;
    gap: var(--do-space-6);
  }
}

/* ── Premium Cards ─────────────────────────────────────────────────────── */
.do-premium-card {
  background-color: var(--do-surface);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--do-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .do-premium-card {
  background-color: var(--do-surface);
  border: 1px solid var(--do-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.do-premium-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .do-premium-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* ── Calculator Inputs ─────────────────────────────────────────────────── */
.do-calc-group {
  margin-bottom: var(--do-space-6);
}

.do-calc-group__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--do-space-3);
}

.do-calc-label {
  font-weight: 600;
  color: var(--do-text);
  font-size: 0.95rem;
}

.do-calc-value-bubble {
  background-color: var(--do-bg-alt);
  color: var(--do-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid var(--do-primary-alpha-20);
  transition: all 0.2s ease;
}

/* Custom Sliders */
.do-premium-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--do-border);
  outline: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.do-premium-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--do-surface);
  border: 3px solid var(--do-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.do-premium-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.do-premium-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--do-surface);
  border: 3px solid var(--do-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.do-premium-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
}

/* Custom Select & Inputs */
.do-premium-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--do-border);
  background-color: var(--do-bg);
  color: var(--do-text);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  appearance: none;
}

.do-premium-input:focus {
  outline: none;
  border-color: var(--do-primary);
  box-shadow: 0 0 0 3px var(--do-primary-alpha-20);
}

/* ── Live Dashboard (ROI) ──────────────────────────────────────────────── */
.do-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--do-space-4);
  margin-bottom: var(--do-space-6);
}

.do-metric-card {
  background-color: var(--do-bg-alt);
  border: 1px solid var(--do-border);
  border-radius: 12px;
  padding: var(--do-space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.do-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--do-primary-alpha-20);
}

.do-metric-card--primary {
  background-color: var(--do-primary-alpha-10);
  border-color: var(--do-primary-alpha-20);
}

.do-metric-label {
  font-size: 0.875rem;
  color: var(--do-text-muted);
  margin-bottom: var(--do-space-2);
  font-weight: 500;
}

.do-metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--do-text);
  font-family: 'Inter', sans-serif;
  transition: color 0.3s ease;
}

.do-metric-card--primary .do-metric-label {
  color: var(--do-primary);
}

.do-metric-card--primary .do-metric-value {
  color: var(--do-primary);
}

/* Savings Chart */
.do-chart-container {
  background-color: var(--do-bg);
  border-radius: 12px;
  padding: var(--do-space-4);
  margin-bottom: var(--do-space-4);
  border: 1px solid var(--do-border);
}

.do-chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--do-space-3);
  color: var(--do-text);
}

.do-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: var(--do-space-2);
}

.do-bar-row:last-child {
  margin-bottom: 0;
}

.do-bar-label {
  width: 120px;
  font-size: 0.875rem;
  color: var(--do-text-muted);
}

.do-bar-track {
  flex: 1;
  height: 12px;
  background-color: var(--do-border);
  border-radius: 6px;
  overflow: hidden;
  margin-right: 12px;
}

.do-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease-out;
}

.do-bar-fill--before {
  background-color: #94a3b8; /* Neutral slate */
  width: 100%;
}

.do-bar-fill--after {
  background-color: var(--do-primary);
  width: 40%;
}

.do-bar-value {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

/* Insights Card */
.do-insights-card {
  background: linear-gradient(135deg, var(--do-primary-alpha-10), transparent);
  border-left: 4px solid var(--do-primary);
  padding: var(--do-space-4);
  border-radius: 8px;
}

.do-insights-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--do-text);
  margin: 0;
}

/* ── Plan Estimator Features ───────────────────────────────────────────── */
.do-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--do-space-3);
  margin-bottom: var(--do-space-6);
}

.do-feature-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.do-feature-checkbox input {
  display: none;
}

.do-feature-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--do-border);
  border-radius: 4px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background-color: var(--do-bg);
}

.do-feature-checkbox input:checked + .do-feature-box {
  background-color: var(--do-primary);
  border-color: var(--do-primary);
}

.do-feature-box svg {
  width: 12px;
  height: 12px;
  stroke: white;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}

.do-feature-checkbox input:checked + .do-feature-box svg {
  opacity: 1;
  transform: scale(1);
}

.do-feature-label {
  font-size: 0.9rem;
  color: var(--do-text);
  user-select: none;
}

/* ── Plan Recommendation Card ──────────────────────────────────────────── */
.do-rec-card {
  background: linear-gradient(to bottom, var(--do-surface), var(--do-bg-alt));
  border: 2px solid var(--do-primary);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.do-rec-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--do-primary);
  color: white;
  padding: 6px 16px;
  border-bottom-left-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.do-rec-header {
  text-align: center;
  padding-bottom: var(--do-space-4);
  border-bottom: 1px solid var(--do-border);
  margin-bottom: var(--do-space-4);
}

.do-rec-plan-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--do-text);
  margin-bottom: var(--do-space-2);
}

.do-rec-price {
  font-size: 3rem;
  font-weight: 700;
  font-family: 'DM Serif Display', serif;
  color: var(--do-primary);
}

.do-rec-price span {
  font-size: 1rem;
  color: var(--do-text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.do-rec-why {
  background-color: var(--do-bg);
  border-radius: 8px;
  padding: var(--do-space-3);
  margin-bottom: var(--do-space-4);
  font-size: 0.9rem;
  color: var(--do-text);
  line-height: 1.5;
  border-left: 3px solid var(--do-primary);
}

.do-rec-features-title {
  font-weight: 600;
  margin-bottom: var(--do-space-3);
  font-size: 1rem;
}

.do-rec-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--do-space-6) 0;
  flex-grow: 1;
}

.do-rec-features-list li {
  display: flex;
  align-items: center;
  margin-bottom: var(--do-space-2);
  font-size: 0.95rem;
  color: var(--do-text-muted);
}

.do-rec-features-list li svg {
  color: var(--do-primary);
  margin-right: 10px;
  flex-shrink: 0;
}

.do-rec-actions {
  display: flex;
  flex-direction: column;
  gap: var(--do-space-3);
  margin-top: auto;
}

/* Alternative Plans */
.do-alt-plans {
  margin-top: var(--do-space-8);
  display: flex;
  gap: var(--do-space-4);
  justify-content: center;
}

.do-alt-plan {
  padding: var(--do-space-3) var(--do-space-4);
  border: 1px solid var(--do-border);
  border-radius: 8px;
  text-align: center;
  opacity: 0.6;
  background-color: var(--do-surface);
  transition: opacity 0.2s;
  min-width: 140px;
}

.do-alt-plan:hover {
  opacity: 1;
}

.do-alt-plan.active {
  display: none; /* Hide the recommended one in the alternatives list */
}

.do-alt-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.do-alt-price {
  font-size: 0.85rem;
  color: var(--do-text-muted);
}

/* ── Layout Modifiers (Desktop Default) ────────────────────────────────── */
.do-feature-grid--3col { grid-template-columns: 1fr 1fr 1fr; }
.do-feature-grid--2col { grid-template-columns: 1fr 1fr; }

/* ============================================================================
   MOBILE RESPONSIVE (Max-width: 768px)
   ============================================================================ */
@media (max-width: 768px) {
  /* Layout & Spacing */
  .do-premium-calc-section, 
  .do-premium-calc-section--tinted {
    padding: var(--do-space-8) 16px;
  }
  .do-premium-calc-header {
    margin-bottom: var(--do-space-8);
  }
  .do-premium-calc-grid {
    grid-template-columns: 1fr;
    gap: var(--do-space-6);
  }
  
  /* Typography Scale */
  .do-premium-calc-header .do-h2 {
    font-size: 32px;
  }
  .do-premium-card .do-h3 {
    font-size: 24px;
    margin-bottom: var(--do-space-4) !important;
  }
  
  /* ROI Calculator Inputs */
  .do-feature-grid--3col,
  .do-feature-grid--2col,
  .do-feature-grid {
    grid-template-columns: 1fr;
    gap: var(--do-space-4) !important;
  }
  
  .do-premium-card {
    padding: 20px 16px;
  }

  .do-calc-group {
    margin-bottom: var(--do-space-4);
  }
  
  /* Touch Targets */
  .do-premium-input {
    min-height: 52px;
    font-size: 16px;
    padding: 14px 16px;
  }
  .do-premium-slider {
    height: 12px;
  }
  .do-premium-slider::-webkit-slider-thumb {
    width: 32px;
    height: 32px;
  }
  .do-premium-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
  }
  
  /* KPI Dashboard */
  .do-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--do-space-3);
    margin-bottom: var(--do-space-6);
  }
  .do-metric-card {
    min-height: 96px;
    padding: var(--do-space-3);
    justify-content: center;
    border-radius: 12px;
  }
  .do-metric-value {
    font-size: 24px;
  }
  .do-metric-label {
    font-size: 13px;
    margin-bottom: 4px;
  }
  
  /* Chart */
  .do-chart-container {
    padding: var(--do-space-3);
  }
  .do-bar-label {
    width: auto;
    flex: 1;
    font-size: 12px;
  }
  .do-bar-track {
    flex: 2;
    height: 8px;
    margin: 0 8px;
  }
  .do-bar-value {
    min-width: 45px;
    font-size: 12px;
  }
  
  /* Recommended Plan */
  .do-rec-header {
    margin-bottom: var(--do-space-4);
    padding-bottom: var(--do-space-3);
  }
  .do-rec-price {
    font-size: 36px;
  }
  .do-rec-why {
    font-size: 14px;
    padding: var(--do-space-3);
    margin-bottom: var(--do-space-4);
  }
  .do-rec-features-list li {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  /* Buttons */
  .do-btn,
  .do-rec-actions .do-btn {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Alternative Plans */
  .do-alt-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--do-space-3);
    margin-top: var(--do-space-6);
  }
  .do-alt-plan {
    min-width: unset;
    padding: var(--do-space-3);
  }
}
