/* public/css/calc-card.css
   ─────────────────────────────────────────────────────────
   ToolsInfo-style calculator card.
   Used on home page, /tools, and any catalog surface.
   ───────────────────────────────────────────────────────── */

.aicost-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.aicost-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}

.aicost-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

/* Whole-card click target */
.aicost-card-clickwrap {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 14px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-height: 180px;
}

.aicost-card-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 12px;
  display: inline-block;
}

.aicost-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin: 0 0 6px;
}

.aicost-card-persona {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 10px;
  font-style: italic;
}

.aicost-card-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 14px;
  flex: 1;
}

.aicost-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

.aicost-card-cta-arrow {
  transition: transform 0.15s ease;
  display: inline-block;
}

.aicost-card:hover .aicost-card-cta-arrow {
  transform: translateX(3px);
}

/* Read-the-guide pill strip — sits between the click area and bottom actions */
.aicost-card-guide-strip {
  padding: 0 20px 12px;
}

.aicost-card-guide-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.aicost-card-guide-pill:hover {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
}

/* Bottom actions strip (Save + Share) */
.aicost-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 14px;
  border-top: 1px solid #f1f5f9;
}

.aicost-card-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.aicost-card-share:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.aicost-card-share svg {
  width: 14px;
  height: 14px;
}

/* The bookmark icon partial uses .aic-bm — preserve its existing layout
   but slightly visually unify with the share button. */
.aicost-card-actions .aic-bm {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.aicost-card-actions .aic-bm:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Section header above each outcome group */
.aicost-outcome-group {
  margin: 0 0 40px;
}

.aicost-outcome-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.aicost-outcome-icon {
  font-size: 28px;
  line-height: 1;
}

.aicost-outcome-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.aicost-outcome-desc {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.aicost-outcome-count {
  font-size: 13px;
  color: #94a3b8;
  margin-left: auto;
  white-space: nowrap;
}

/* Toast for share-success and bookmark-success (lightweight) */
.aicost-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  padding: 10px 18px;
  background: #0f172a;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
  z-index: 9999;
}

.aicost-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 600px) {
  .aicost-card-grid {
    grid-template-columns: 1fr;
  }
  .aicost-card-clickwrap {
    min-height: auto;
  }
}

/* ─── Save button (bookmark) ─────────────────────────────── */
.aic-bm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 100px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  transition: all 0.15s;
  font-family: inherit;
}
.aic-bm:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  transform: translateY(-1px);
}
.aic-bm svg {
  display: block;
  flex-shrink: 0;
}
.aic-bm-on {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}
.aic-bm-on:hover {
  background: #d1fae5;
}
.aic-bm-label {
  line-height: 1;
}
