/* 🎨 VIBRANT COLOR PALETTE */
:root {
    --scc-brand: #22c55e;
    /* Vibrant Profit Green */
    --scc-brand-dark: #15803d;
    --scc-brand-light: #f0fdf4;

    --scc-accent: #f59e0b;
    /* Warm Warning Yellow */
    --scc-navy: #0f172a;
    /* Deep Slate */
    --scc-slate: #64748b;
    /* Muted Text */
    --scc-bg: #f8fafc;
    /* App Background */
    --scc-surface: #ffffff;
    /* Card Background */
    --scc-border: #e2e8f0;

    /* METRICS */
    --scc-radius: 16px;
    --scc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --scc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --scc-ring: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* RESET & LAYOUT */
.scc-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    background: var(--scc-bg) !important;
    border-radius: var(--scc-radius) !important;
    color: var(--scc-navy) !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    border: 1px solid var(--scc-border) !important;
    overflow: hidden !important;
}

.scc-wrapper * {
    box-sizing: border-box !important;
}

/* HEADER */
.scc-header {
    background: var(--scc-surface) !important;
    padding: 40px !important;
    text-align: center !important;
    border-bottom: 1px solid var(--scc-border) !important;
}

.scc-logo-placeholder {
    height: 48px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--scc-brand) !important;
}

.scc-logo-placeholder img {
    height: 48px !important;
    width: auto !important;
}

.scc-logo-placeholder svg {
    height: 100% !important;
    width: auto !important;
}

.scc-header h2 {
    margin: 0 0 8px 0 !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: var(--scc-navy) !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-header p {
    margin: 0 !important;
    color: var(--scc-slate) !important;
    font-size: 15px !important;
    font-family: 'Inter', sans-serif !important;
}

/* BODY */
.scc-body {
    padding: 32px 40px !important;
}

.scc-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    margin-bottom: 24px !important;
}

@media (max-width: 640px) {
    .scc-grid {
        grid-template-columns: 1fr !important;
    }
}

/* INPUTS */
.scc-label-row {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 8px !important;
}

.scc-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--scc-navy) !important;
    font-family: 'Inter', sans-serif !important;
}

/* TOOLTIP */
.scc-tooltip {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #e2e8f0 !important;
    color: var(--scc-slate) !important;
    font-size: 11px !important;
    font-weight: bold !important;
    margin-left: 6px !important;
    cursor: help !important;
    position: relative !important;
}

.scc-tooltip-content {
    visibility: hidden !important;
    width: 240px !important;
    background-color: var(--scc-navy) !important;
    color: #fff !important;
    text-align: left !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    position: absolute !important;
    z-index: 10 !important;
    bottom: 140% !important;
    left: 50% !important;
    margin-left: -120px !important;
    opacity: 0 !important;
    transition: opacity 0.2s, transform 0.2s !important;
    transform: translateY(5px) !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
    box-shadow: var(--scc-shadow-lg) !important;
    pointer-events: none !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-tooltip-content::after {
    content: "" !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    margin-left: -5px !important;
    border-width: 5px !important;
    border-style: solid !important;
    border-color: var(--scc-navy) transparent transparent transparent !important;
}

.scc-tooltip:hover .scc-tooltip-content {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.scc-input-group {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.scc-icon {
    position: absolute !important;
    left: 14px !important;
    color: var(--scc-slate) !important;
    pointer-events: none !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-input,
.scc-select {
    width: 100% !important;
    height: 52px !important;
    padding: 0 14px !important;
    background: var(--scc-surface) !important;
    border: 1px solid var(--scc-border) !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    color: var(--scc-navy) !important;
    transition: all 0.2s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    font-weight: 500 !important;
    box-shadow: var(--scc-shadow-sm) !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-input.has-icon {
    padding-left: 34px !important;
}

.scc-input:hover,
.scc-select:hover {
    border-color: #cbd5e1 !important;
}

.scc-input:focus,
.scc-select:focus {
    border-color: var(--scc-brand) !important;
    outline: none !important;
    box-shadow: var(--scc-ring) !important;
}

.scc-input::placeholder {
    color: #cbd5e1 !important;
    font-weight: 400 !important;
}

.scc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

/* ADVANCED TOGGLE */
.scc-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--scc-brand-dark) !important;
    background: var(--scc-brand-light) !important;
    padding: 10px 18px !important;
    border-radius: 100px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    border: 1px solid transparent !important;
    margin-bottom: 24px !important;
    user-select: none !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-toggle:hover {
    filter: brightness(0.96) !important;
    transform: translateY(-1px) !important;
}

.scc-toggle svg {
    transition: transform 0.2s !important;
}

.scc-toggle.active svg {
    transform: rotate(180deg) !important;
}

.scc-advanced-panel {
    background: var(--scc-surface) !important;
    border: 1px solid var(--scc-border) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-bottom: 32px !important;
    display: none;
    /* JS toggles this, so NO !important here */
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESULTS */
.scc-results {
    background: var(--scc-surface) !important;
    border-top: 1px solid var(--scc-border) !important;
    padding: 40px !important;
}

/* WINNER CARD & CTA */
.scc-winner-card {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border-radius: 16px !important;
    padding: 32px 32px 40px 32px !important;
    text-align: center !important;
    color: white !important;
    box-shadow: 0 20px 25px -5px rgba(22, 163, 74, 0.25), 0 8px 10px -6px rgba(22, 163, 74, 0.1) !important;
    margin-bottom: 40px !important;
    position: relative !important;
    overflow: hidden !important;
}

.scc-winner-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15) 0%, transparent 60%) !important;
    pointer-events: none !important;
}

.scc-winner-label {
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 700 !important;
    opacity: 0.9 !important;
    margin-bottom: 8px !important;
    display: block !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-winner-title {
    font-size: 36px !important;
    color: white !important;
    font-weight: 800 !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.02em !important;
    text-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-savings-pill {
    display: inline-block !important;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    padding: 6px 16px !important;
    border-radius: 100px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-family: 'Inter', sans-serif !important;
}

/* CTA BUTTON */
.scc-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    color: var(--scc-brand-dark) !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    padding: 14px 28px !important;
    border-radius: 100px !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06) !important;
    border: 2px solid transparent !important;
    width: 100% !important;
    max-width: 280px !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-cta-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.1) !important;
    background: #fdfdfd !important;
}

.scc-cta-btn svg {
    margin-left: 8px !important;
    width: 18px !important;
    height: 18px !important;
    transition: transform 0.2s !important;
}

.scc-cta-btn:hover svg {
    transform: translateX(4px) !important;
}

/* TABLE */
.scc-table-container {
    overflow-x: auto !important;
    border: 1px solid var(--scc-border) !important;
    border-radius: 12px !important;
}

.scc-table {
    width: 100% !important;
    border-collapse: collapse !important;
    min-width: 600px !important;
}

.scc-table th {
    text-align: left !important;
    padding: 16px 24px !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--scc-slate) !important;
    font-weight: 700 !important;
    border-bottom: 1px solid var(--scc-border) !important;
    background: #fcfcfc !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-table td {
    padding: 20px 24px !important;
    border-bottom: 1px solid var(--scc-border) !important;
    vertical-align: middle !important;
    font-size: 15px !important;
    color: var(--scc-navy) !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-table tr:last-child td {
    border-bottom: none !important;
}

.scc-row-winner {
    background-color: var(--scc-brand-light) !important;
}

.scc-row-winner td:first-child {
    border-left: 4px solid var(--scc-brand) !important;
}

.scc-row-winner td {
    color: var(--scc-brand-dark) !important;
    font-weight: 600 !important;
}

/* VISUAL BREAKDOWN */
.scc-viz-bar {
    height: 8px !important;
    width: 100% !important;
    min-width: 100px !important;
    background: #e2e8f0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    display: flex !important;
    margin-top: 8px !important;
}

.scc-segment {
    height: 100% !important;
    transition: width 0.3s ease !important;
}

.scc-seg-sub {
    background: #334155 !important;
}

.scc-seg-fees {
    background: var(--scc-accent) !important;
}

.scc-seg-other {
    background: #cbd5e1 !important;
}

/* LEGEND */
.scc-legend {
    display: flex !important;
    gap: 24px !important;
    margin-top: 24px !important;
    justify-content: center !important;
    font-size: 13px !important;
    color: var(--scc-slate) !important;
    font-family: 'Inter', sans-serif !important;
}

.scc-legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 500 !important;
}

.scc-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 3px !important;
}

.scc-disclaimer {
    font-size: 12px !important;
    color: var(--scc-slate) !important;
    font-family: 'Inter', sans-serif !important;
    opacity: 0.6 !important;
    text-align: center !important;
    margin-top: 24px !important;
    line-height: 1.6 !important;
}