/* ==========================================================================
   Davies Fee Comparison Calculator — Styles
   Colors: accent #FB8E28, text #313131, secondary #777, bg white/#eee,
           links #136AAF
   ========================================================================== */

/* ---- Reset & Container ---- */
.dfc-wrap {
    --accent: #FB8E28;
    --accent-dark: #e07a1a;
    --text: #313131;
    --secondary: #777777;
    --bg-light: #f7f7f7;
    --bg-muted: #eeeeee;
    --link: #136AAF;
    --white: #ffffff;
    --success: #2e7d32;
    --danger: #c62828;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
    line-height: 1.6;
    box-sizing: border-box;
}
.dfc-wrap *, .dfc-wrap *::before, .dfc-wrap *::after {
    box-sizing: border-box;
}

/* ---- Sections ---- */
.dfc-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
    margin-bottom: 24px;
}

/* ---- Hero / Input ---- */
.dfc-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 8px;
}
.dfc-subtitle {
    text-align: center;
    color: var(--secondary);
    margin: 0 0 24px;
    font-size: 1.05rem;
}

/* ---- Trust Badges ---- */
.dfc-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.dfc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-light);
    border: 1px solid var(--bg-muted);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.dfc-badge-icon {
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
}

/* ---- Portfolio Input ---- */
.dfc-input-group {
    max-width: 500px;
    margin: 0 auto;
}
.dfc-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    font-size: 0.95rem;
}
.dfc-portfolio-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 16px;
}
.dfc-dollar {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--secondary);
}
.dfc-portfolio-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    border: none;
    border-bottom: 2px solid var(--accent);
    background: transparent;
    text-align: center;
    width: 220px;
    outline: none;
    padding: 4px 0;
    font-family: inherit;
}
.dfc-portfolio-val:focus {
    border-bottom-color: var(--accent-dark);
}

/* ---- Slider ---- */
.dfc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-muted);
    outline: none;
    margin: 0 0 8px;
    cursor: pointer;
}
.dfc-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--fill, 0%), var(--bg-muted) var(--fill, 0%), var(--bg-muted) 100%);
}
.dfc-slider::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: var(--bg-muted);
}
.dfc-slider::-moz-range-progress {
    height: 8px;
    border-radius: 4px;
    background: var(--accent);
}
.dfc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    margin-top: -8px;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.dfc-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}
.dfc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.dfc-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--secondary);
}

/* ---- Section Titles ---- */
.dfc-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 20px;
}

/* ---- Bar Chart ---- */
.dfc-bars {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.dfc-bar-row {
    display: grid;
    grid-template-columns: 180px 1fr 100px;
    align-items: center;
    gap: 12px;
}
.dfc-bar-row-highlight {
    background: rgba(251,142,40,0.06);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin: 0 -12px;
}
.dfc-bar-label {
    display: flex;
    flex-direction: column;
}
.dfc-bar-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}
.dfc-bar-detail {
    font-size: 0.75rem;
    color: var(--secondary);
}
.dfc-bar-detail-highlight {
    color: var(--accent);
    font-weight: 600;
}
.dfc-bar-track {
    height: 28px;
    background: var(--bg-muted);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.dfc-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 4px;
}
.dfc-bar-industry {
    background: #c62828;
}
.dfc-bar-wirehouse {
    background: #e65100;
}
.dfc-bar-davies {
    background: var(--accent);
}
.dfc-bar-amount {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: right;
}
.dfc-bar-amount-highlight {
    color: var(--accent);
}

/* ---- Tier Info ---- */
.dfc-tier-info {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--secondary);
}
.dfc-tier-info strong {
    color: var(--accent);
}

/* ---- Savings Cards ---- */
.dfc-savings-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--secondary);
    margin: -8px 0 20px;
}
.dfc-savings-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.dfc-savings-card {
    text-align: center;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 20px 12px;
    border: 1px solid var(--bg-muted);
}
.dfc-savings-card-highlight {
    border-color: var(--accent);
    background: rgba(251,142,40,0.06);
}
.dfc-savings-period {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dfc-savings-amount {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}
.dfc-savings-card-highlight .dfc-savings-amount {
    color: var(--accent);
}

/* ---- Highlight Box ---- */
.dfc-highlight-box {
    text-align: center;
    background: linear-gradient(135deg, #FB8E28 0%, #e07a1a 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 28px 20px;
}
.dfc-highlight-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 8px;
}
.dfc-highlight-amount {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
}
.dfc-highlight-sub {
    display: block;
    font-size: 0.85rem;
    opacity: 0.85;
}

/* ---- CTA ---- */
.dfc-cta-section {
    text-align: center;
    background: var(--bg-light);
}
.dfc-cta-headline {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.dfc-cta-sub {
    color: var(--secondary);
    margin: 0 0 20px;
}

/* ---- Buttons ---- */
.dfc-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}
.dfc-btn-primary {
    background: var(--accent);
    color: var(--white);
}
.dfc-btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}
.dfc-btn-primary:active {
    transform: translateY(0);
}
.dfc-btn-full {
    width: 100%;
    text-align: center;
}
.dfc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ---- Capture Form ---- */
.dfc-capture {
    background: var(--bg-light);
}
.dfc-capture-inner {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}
.dfc-capture-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 6px;
}
.dfc-capture-sub {
    color: var(--secondary);
    margin: 0 0 20px;
    font-size: 0.95rem;
}
.dfc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.dfc-form-field {
    text-align: left;
}
.dfc-form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.dfc-form-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.2s;
}
.dfc-form-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(251,142,40,0.15);
}
.dfc-form-field input.dfc-input-error {
    border-color: var(--danger);
}
.dfc-form-msg {
    margin-top: 12px;
    font-size: 0.9rem;
    min-height: 1.4em;
}
.dfc-form-msg.dfc-msg-success {
    color: var(--success);
    font-weight: 600;
}
.dfc-form-msg.dfc-msg-error {
    color: var(--danger);
}

/* ---- Disclaimer ---- */
.dfc-disclaimer {
    padding: 16px 20px;
    margin-bottom: 24px;
}
.dfc-disclaimer p {
    font-size: 0.75rem;
    color: var(--secondary);
    line-height: 1.5;
    margin: 0;
}
.dfc-disclaimer a {
    color: var(--link);
    text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .dfc-section {
        padding: 24px 18px;
    }
    .dfc-title {
        font-size: 1.35rem;
    }
    .dfc-bar-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .dfc-bar-label {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }
    .dfc-bar-amount {
        text-align: left;
        font-size: 0.9rem;
    }
    .dfc-savings-cards {
        grid-template-columns: 1fr;
    }
    .dfc-highlight-amount {
        font-size: 2rem;
    }
    .dfc-form-row {
        grid-template-columns: 1fr;
    }
    .dfc-portfolio-val {
        font-size: 1.3rem;
        width: 180px;
    }
    .dfc-badges {
        gap: 8px;
    }
    .dfc-badge {
        font-size: 0.78rem;
        padding: 5px 12px;
    }
}
