/* ===== Cost Per Mbps Calculator & NEW Tools ===== */
/* Added: Cost Per Mbps calc, Savings calc, Data cap calc, Tooltips, Auto-save */

/* === Tooltip === */
.info-tip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #d1d9e6; color: #4a4a5a; font-size: 0.7rem; font-weight: 700; cursor: help; margin-left: 4px; vertical-align: middle; position: relative; transition: background 0.2s; }
.info-tip:hover { background: var(--primary); color: #fff; }
.info-tip .tooltip-text { visibility: hidden; opacity: 0; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg-card); padding: 8px 12px; border-radius: 8px; font-size: 0.78rem; font-weight: 400; white-space: nowrap; max-width: 260px; white-space: normal; z-index: 50; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: all 0.2s; }
.info-tip .tooltip-text::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--text); }
.info-tip:hover .tooltip-text { visibility: visible; opacity: 1; }

/* === Cost Per Mbps === */
.cpm-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.cpm-card { background: var(--bg); padding: 16px; border-radius: 10px; text-align: center; }
.cpm-card .cpm-value { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.cpm-card .cpm-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.cpm-rank { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
.cpm-rank.great { background: #D1FAE5; color: #065F46; }
.cpm-rank.good { background: #DBEAFE; color: #1E40AF; }
.cpm-rank.ok { background: #FEF3C7; color: #92400E; }
.cpm-rank.poor { background: #FEE2E2; color: #991B1B; }

/* === Savings Calculator === */
.savings-total { font-size: 2.8rem; font-weight: 900; color: #059669; text-align: center; padding: 20px 0; }
.savings-breakdown { border-top: 1px solid var(--border); padding-top: 12px; }
.savings-item { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 0.88rem; }
.savings-item .savings-label { color: var(--text-secondary); }
.savings-item .savings-amount { font-weight: 600; color: #059669; }

/* === Data Cap Calculator === */
.data-meter { height: 20px; background: var(--border); border-radius: 10px; overflow: hidden; margin: 8px 0; }
.data-meter-fill { height: 100%; border-radius: 10px; transition: width 0.5s; }
.data-meter-fill.safe { background: #059669; }
.data-meter-fill.warn { background: #F59E0B; }
.data-meter-fill.danger { background: #DC2626; }

/* === ISP Comparison Table === */
.isp-table-wrap { overflow-x: auto; margin: 20px 0; }
.isp-compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.isp-compare-table th { background: var(--primary); color: #fff; padding: 12px 14px; text-align: left; font-weight: 600; white-space: nowrap; }
.isp-compare-table th:first-child { border-radius: 8px 0 0 0; }
.isp-compare-table th:last-child { border-radius: 0 8px 0 0; }
.isp-compare-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.isp-compare-table tr:hover td { background: var(--primary-light); }
.isp-compare-table .isp-best { color: #059669; font-weight: 700; }
.isp-compare-table .isp-worst { color: #DC2626; font-weight: 500; }

/* === Updated Badge === */
.updated-badge { display: inline-flex; align-items: center; gap: 4px; background: #D1FAE5; color: #065F46; padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.updated-badge svg { width: 12px; height: 12px; }

/* === Quiz Steps === */
.quiz-step { display: none; }
.quiz-step.active { display: block; }
.quiz-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.quiz-option { padding: 14px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; text-align: center; transition: all 0.2s; background: var(--bg-card); }
.quiz-option:hover { border-color: var(--primary); background: var(--primary-light); }
.quiz-option.selected { border-color: var(--primary); background: var(--primary-light); }
.quiz-option .quiz-icon { font-size: 1.5rem; margin-bottom: 6px; }
.quiz-option .quiz-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.quiz-option .quiz-desc { font-size: 0.78rem; color: var(--text-muted); }
.quiz-progress { display: flex; gap: 8px; margin-bottom: 24px; justify-content: center; }
.quiz-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); transition: background 0.3s; }
.quiz-dot.active { background: var(--primary); }
.quiz-dot.done { background: #059669; }

/* === Range Slider === */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--border); outline: none; padding: 0; margin: 8px 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(22,93,255,0.3); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(22,93,255,0.3); }
.range-value { font-size: 1.3rem; font-weight: 700; color: var(--primary); text-align: center; }

/* === Verified Data Badge === */
.verify-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-light); border: 1px solid var(--primary); padding: 6px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 500; color: var(--primary); }
.verify-badge svg { width: 16px; height: 16px; }

/* === Mobile adaptations === */
@media (max-width: 768px) {
  .cpm-result { grid-template-columns: repeat(2, 1fr); }
  .savings-total { font-size: 2rem; }
  .quiz-options { grid-template-columns: repeat(2, 1fr); }
  .isp-compare-table { font-size: 0.78rem; }
  .isp-compare-table th, .isp-compare-table td { padding: 8px 6px; }
}
