/* Wadewow widgets — savings calculator + sticky buy bar */

.wd-savings-calc {
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--line, #e6e8eb);
  border-radius: 16px;
  padding: 32px;
  max-width: 720px;
  margin: 48px auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.wd-savings-calc__title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink, #1a1a1a);
  font-family: 'Fraunces', Georgia, serif;
}
.wd-savings-calc__sub {
  font-size: 15px;
  color: var(--ink-soft, #4b5563);
  margin: 0 0 24px;
  line-height: 1.5;
}
.wd-savings-calc__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.wd-savings-calc__field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  margin-bottom: 6px;
}
.wd-savings-calc__field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line, #d1d5db);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink, #1a1a1a);
  background: var(--bg-elevated, #fff);
  box-sizing: border-box;
}
.wd-savings-calc__field input:focus {
  outline: none;
  border-color: var(--accent, #E8704C);
}
.wd-savings-calc__result {
  background: var(--bg-soft, #f9fafb);
  border-radius: 12px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.wd-savings-calc__result.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.wd-savings-calc__stat {
  text-align: center;
  padding: 0 8px;
}
.wd-savings-calc__stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent, #E8704C);
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.1;
}
.wd-savings-calc__stat-label {
  font-size: 12px;
  color: var(--ink-soft, #6b7280);
  margin-top: 4px;
  line-height: 1.3;
}
.wd-savings-calc__verdict {
  text-align: center;
  font-size: 14px;
  color: var(--ink, #1a1a1a);
  margin: 16px 0 0;
}
.wd-savings-calc__verdict strong {
  color: var(--accent, #E8704C);
}
.wd-savings-calc__cta {
  text-align: center;
  margin-top: 20px;
}
.wd-savings-calc__cta a {
  display: inline-block;
  background: var(--accent, #E8704C);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
@media (max-width: 640px) {
  .wd-savings-calc__inputs { grid-template-columns: 1fr; }
  .wd-savings-calc__result { grid-template-columns: 1fr; gap: 8px; }
  .wd-savings-calc__stat { padding: 8px 0; border-bottom: 1px solid var(--line, #e6e8eb); }
  .wd-savings-calc__stat:last-child { border-bottom: none; }
  .wd-savings-calc__stat-value { font-size: 22px; }
}

/* ===== Sticky Buy Bar (mobile) ===== */
.wd-sticky-buy {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--bg-elevated, #fff);
  border-top: 1px solid var(--line, #e6e8eb);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}
.wd-sticky-buy.is-visible {
  transform: translateY(0);
}
.wd-sticky-buy__info {
  flex: 1;
  min-width: 0;
}
.wd-sticky-buy__price {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink, #1a1a1a);
  line-height: 1.1;
  font-family: 'Fraunces', Georgia, serif;
}
.wd-sticky-buy__spec {
  font-size: 11px;
  color: var(--ink-soft, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wd-sticky-buy__cta {
  flex-shrink: 0;
  background: var(--accent, #E8704C);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.wd-sticky-buy__cta:hover { background: #c9593a; }

@media (min-width: 1024px) {
  .wd-sticky-buy { display: none !important; }
}

/* Push body up to prevent sticky bar from covering content */
body.has-wd-sticky-buy { padding-bottom: 70px; }
@media (min-width: 1024px) {
  body.has-wd-sticky-buy { padding-bottom: 0; }
}
