/* =========================================
   E-COMMERCE CALCULATOR CUSTOM STYLES
   ========================================= */

/* Preset buttons: always one row */
.df-target-cr-presets {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 8px;
}

.df-preset-btn {
    flex: 1 1 0;
    min-width: 0; /* lets buttons shrink instead of wrapping */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    min-height: 64px;
    box-sizing: border-box;
}

.df-preset-btn strong {
    font-size: 15px;
    font-weight: 700;
    color: #0f2855;
    line-height: 1.2;
}

.df-preset-btn span {
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.2;
}

/* Hover & Active */
.df-preset-btn:hover {
    border-color: #148dfb;
    background-color: #f8fafc;
}

.df-preset-btn.active {
    background-color: #148dfb !important;
    border-color: #148dfb !important;
}

.df-preset-btn.active strong,
.df-preset-btn.active span {
    color: #ffffff !important;
}

/* "Custom" has no sub-label, so center its text */
.df-preset-btn[data-type="custom"] strong {
    margin: auto 0;
}

/* Custom target CR field: hidden until "Custom" is selected */
.df-target-cr-custom {
    display: none;
    margin-top: 10px;
}

/* Show it when the Custom preset is active (no JS change needed) */
.df-target-cr-presets:has(.df-preset-btn[data-type="custom"].active) + .df-target-cr-custom {
    display: block;
}

.input-wrapper .suffix {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Metrics: one white horizontal card with dividers */
.df-ecom-result-box .df-ecom-metrics-card {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 8px;
    margin: 20px 0;
    box-sizing: border-box;
}

.df-ecom-result-box .df-ecom-metrics-card .df-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10px;
}

.df-ecom-result-box .df-ecom-metrics-card .metric-label {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.3;
    margin-bottom: 6px;
}

.df-ecom-result-box .df-ecom-metrics-card h4 {
    margin: 0 !important;
    font-size: 18px;
    font-weight: 700;
    color: #0f2855;
    line-height: 1.2;
    white-space: nowrap;
}

.df-ecom-result-box .df-ecom-metrics-card h4.text-green {
    color: #42A66C;
}

/* The "|" between columns */
.df-ecom-result-box .df-ecom-metrics-card .df-divider-vertical {
    flex: 0 0 1px;
    width: 1px;
    height: auto;
    align-self: stretch;
    background: #e2e8f0;
    margin: 0;
}

/* Promo card: SVG background + live text */
.df-ecom-result-box .df-promo-card-ecom {
    container-type: inline-size;
    position: relative;
    width: 100%;
    aspect-ratio: 590 / 172;
    margin: 0;
    padding: 0 !important;
    background: url('../assets/images/ecom-promo-bg.svg') center / 100% 100% no-repeat !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible;
}

.df-ecom-result-box .df-promo-card-ecom .promo-content {
    position: absolute;
    inset: 0;
    padding: 0;
    margin: 0;
}

.df-ecom-result-box .df-promo-card-ecom h3 {
    position: absolute;
    left: 3.9%;
    top: 26.5%;
    margin: 0 !important;
    padding: 0 !important;
    font-size: clamp(11px, 3.47cqw, 26px) !important;
    line-height: 1.17 !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.df-ecom-result-box .df-promo-card-ecom .df-promo-cta {
    position: absolute;
    left: 3.9%;
    top: 59.5%;
    font-size: clamp(9px, 2.46cqw, 18px);
    font-weight: 600;
    line-height: 1.2;
    color: #3fa2ff !important;
    text-decoration: none;
    white-space: nowrap;
}

.df-ecom-result-box .df-promo-card-ecom .df-promo-cta:hover {
    text-decoration: underline;
}

.df-ecom-result-box .df-promo-card-ecom .df-brand-footer {
    display: none;
}

/* Header: title + cart image */
.df-ecom-result-box .df-ecom-header {
    position: relative;
}

.df-ecom-result-box .df-ecom-header > *:not(.df-ecom-hero-img) {
    position: relative;
    z-index: 1;
}

.df-ecom-result-box .df-ecom-title {
    margin: 0 0 32px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #ffffff !important;
}

.df-ecom-result-box .df-ecom-hero-img {
    position: absolute;
    top: 0;
    right: 4.6%;
    width: 29.5%;
    max-width: 174px;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.df-disclaimer {
    margin: 0;
}

/* Container Box */
.df-consultation-banner {
  background-color: #0b1f3f;
  border-radius: 12px;
  padding: 24px 32px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
  width: 100%;
}

/* Left Content Area */
.df-banner-content {
  display: flex;
  flex-direction: column;
}

.df-banner-title {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.3 !important;
}

.df-banner-subtitle {
  color: #a3b8d4 !important;
  font-size: 14px !important;
  margin: 0 0 16px 0 !important;
  line-height: 1.4 !important;
}

/* Data Pills */
.df-banner-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.df-pill {
  background-color: #1f3456;
  color: #c9daf8;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  white-space: nowrap;
}

/* Right Action Button */
.df-banner-action {
  flex-shrink: 0;
}

.df-banner-button {
  display: inline-block;
  background-color: #1d8cf8;
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.df-banner-button:hover {
  background-color: #1272ce;
  color: #ffffff !important;
}

/* Panel Container */
.df-revenue-panel {
  background-color: #F5F9FF;
  border: 1px solid #e3e8f0;
  border-radius: 12px;
  padding: 24px 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  width: 100%;
  box-sizing: border-box;
}

/* Formulas (Top Section) */
.df-formula-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.df-formula-line {
  /* Monospace font stack for the code-like appearance */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-style: normal;
  font-weight: 400;
  color: #148DFB; /* Bright blue matching the image */
  line-height: 20px;
}

/* Example Calculation (Bottom Section) */
.df-example-line {
  color: #566581; /* Slate grey text */
  font-style: normal;
  font-weight: 400;
  line-height: 23px;
}

.df-example-line strong {
  color: #0F2855; /* Dark blue/black for the final result */
  font-style: normal;
  font-weight: 600;
  line-height: normal;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .df-revenue-panel {
    padding: 20px;
  }

  .df-formula-line {
    font-size: 13px; /* Slightly smaller on mobile to prevent overflow */
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .df-consultation-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .df-banner-action {
    width: 100%;
    margin-top: 8px;
  }

  .df-banner-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 480px) {
    .df-ecom-result-box .df-ecom-title {
        font-size: 17px !important;
        margin-bottom: 24px !important;
    }
    .df-ecom-result-box .df-ecom-hero-img {
        width: 90px;
        right: 0;
    }
}

/* Mobile: stay horizontal, tighten up */
@media screen and (max-width: 480px) {
    .df-ecom-result-box .df-ecom-metrics-card {
        padding: 14px 4px;
    }
    .df-ecom-result-box .df-ecom-metrics-card .df-col {
        padding: 0 6px;
    }
    .df-ecom-result-box .df-ecom-metrics-card .metric-label {
        font-size: 10px;
    }
    .df-ecom-result-box .df-ecom-metrics-card h4 {
        font-size: 13px;
    }
}

/* Mobile: stay on one line, just tighten up */
@media screen and (max-width: 480px) {
    .df-target-cr-presets {
        gap: 6px;
    }
    .df-preset-btn {
        padding: 10px 4px;
        min-height: 58px;
        border-radius: 10px;
    }
    .df-preset-btn strong {
        font-size: 13px;
    }
    .df-preset-btn span {
        font-size: 10px;
    }

    .input-wrapper .suffix {
        font-size: 12px;
    }
}
