/* ============================================================
   InsureBuddy — Smart Tools Page Styles
   ============================================================ */

/* ─── Tool Card ──────────────────────────────────────────── */
.tool-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--t-normal) var(--ease-out);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--navy-60));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-normal) var(--ease-out);
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--gray-200);
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 24px;
  background: var(--navy-light);
}

.tool-card h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.tool-card p {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 18px;
}

/* ─── Score / Progress Meter ─────────────────────────────── */
.score-bar-wrap {
  background: var(--gray-100);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}

.score-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--emerald-dk), var(--emerald));
  transition: width 0.6s var(--ease-out);
}

.score-label {
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  justify-content: space-between;
}

/* ─── Calculator Input Row ───────────────────────────────── */
.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

@media(max-width:640px) {
  .calc-row {
    grid-template-columns: 1fr;
  }
}

/* ─── Result Box ─────────────────────────────────────────── */
.result-box {
  background: var(--emerald-lt);
  border: 1px solid rgba(13, 158, 106, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
}

.result-box .result-val {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--emerald-dk);
  line-height: 1;
  margin-bottom: 4px;
}

.result-box .result-lbl {
  font-size: 13px;
  color: var(--emerald-dk);
  opacity: 0.8;
}

/* ── Fluid Responsive Sizing for Small Desktops ── */
@media(max-width: 1440px) {
  .tool-card {
    padding: 24px;
  }

  .tool-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    margin-bottom: 14px;
  }

  .tool-card h4 {
    font-size: 1rem;
  }

  .result-box {
    padding: 14px 16px;
  }

  .result-box .result-val {
    font-size: 1.6rem;
  }
}

@media(max-width: 1250px) {
  .tool-card {
    padding: 20px;
  }

  .tool-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-bottom: 12px;
  }

  .tool-card p {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .calc-row {
    gap: 10px;
    margin-bottom: 14px;
  }

  .result-box .result-val {
    font-size: 1.4rem;
  }
}

/* ─── Smart Tools Layout Fixes (Appended) ─── */
/* Removed conflicting hero padding here; padding is handled in smart-tools.php */

/* ─── Tools Tab Bar ─── */
.ib-tools-tab-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.ib-tools-tab-wrapper::-webkit-scrollbar {
  display: none;
}

.ib-tools-tab-container {
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.tool-tab-item {
  flex: 1;
  /* Stretch on desktop */
  min-width: 140px;
  background: transparent;
}

.tool-tab-item .tab-icon,
.tool-tab-item .tab-title {
  color: #1E293B;
}

.tool-tab-item.active-tab {
  background: #EEF2FF !important;
}

.tool-tab-item.active-tab .tab-icon,
.tool-tab-item.active-tab .tab-title {
  color: #2563EB !important;
}

@media (max-width: 768px) {
  .ib-tools-tab-container {
    width: max-content;
    /* Force container to content size so it can scroll */
    min-width: 100%;
  }

  .tool-tab-item {
    flex: 0 0 auto;
    /* Prevent stretching on mobile */
  }

  .score-ui-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── STRICT MOBILE HEADER OVERLAP FIX FOR SMART TOOLS ── */
@media (max-width: 480px) {

  .ib-container,
  .container {
    margin-top: -4px !important;
  }
}

@media (max-width: 1024px) {
  section.ib-page-hero.smart-tools-hero {
    padding-top: 150px !important;
  }
}

@media (max-width: 768px) {
  section.ib-page-hero.smart-tools-hero {
    padding-top: 200px !important;
    margin-top: -5px !important;
  }
}

@media (max-width: 480px) {
  section.ib-page-hero.smart-tools-hero {
    padding-top: 240px !important;
    margin-top: -5px !important;
  }
}