/* Sales Tools & Conversion Elements */

/* --- ROI Calculator --- */
.roi-calculator-widget {
    background: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    max-width: 600px;
    margin: 2rem auto;
    font-family: 'Inter', sans-serif;
}

.roi-header {
    text-align: center;
    margin-bottom: 2rem;
}

.roi-header h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.roi-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.roi-form-group {
    margin-bottom: 1.5rem;
}

.roi-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.roi-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.roi-prefix,
.roi-suffix {
    position: absolute;
    color: #94a3b8;
    font-weight: 500;
}

.roi-prefix {
    left: 1rem;
}

.roi-suffix {
    right: 1rem;
}

.roi-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.2s;
}

.roi-input.has-prefix {
    padding-left: 2.5rem;
}

.roi-input.has-suffix {
    padding-right: 2.5rem;
}

.roi-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.roi-results {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid #e2e8f0;
    display: none;
    /* Hidden by default */
}

.roi-results.visible {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.roi-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #cbd5e1;
}

.roi-result-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.roi-result-label {
    color: #64748b;
    font-size: 0.95rem;
}

.roi-result-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.125rem;
}

.roi-result-value.highlight {
    color: #ef4444;
    /* Red for loss */
}

.roi-result-value.savings {
    color: #10b981;
    /* Green for savings */
    font-size: 1.5rem;
}

.roi-cta {
    margin-top: 2rem;
    text-align: center;
}

.btn-calculate {
    width: 100%;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    padding: 0.875rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-calculate:hover {
    background: #2563eb;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Exit Intent Popup --- */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    /* Dark backdrop */
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.exit-popup-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.exit-popup-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exit-popup-overlay.visible .exit-popup-content {
    transform: scale(1);
}

.exit-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    z-index: 10;
}

.exit-popup-close:hover {
    color: #475569;
}

.exit-popup-header {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    padding: 2rem 2rem 3rem;
    /* Extra padding bottom for overlap */
    color: white;
    text-align: center;
}

.exit-popup-body {
    padding: 0 2rem 2rem;
    margin-top: -2rem;
    /* Pull up to overlap header */
    text-align: center;
}

.exit-popup-icon {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: #a855f7;
}

.exit-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.exit-popup-text {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.exit-popup-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.exit-popup-btn {
    width: 100%;
    background: #10b981;
    color: white;
    font-weight: 600;
    padding: 0.875rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.exit-popup-btn:hover {
    background: #059669;
}

.exit-popup-subtext {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 1rem;
}

/* --- Comparison Table --- */
.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    text-align: left;
}

.comparison-table th,
.comparison-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.comparison-table th.highlight,
.comparison-table td.highlight {
    background: #eff6ff;
    position: relative;
}

.comparison-table th.highlight {
    color: #3b82f6;
    border-bottom-color: #bfdbfe;
}

.comparison-table td.highlight {
    border-bottom-color: #bfdbfe;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.check-icon {
    color: #10b981;
}

.cross-icon {
    color: #ef4444;
}

/* --- Mobile Responsiveness (Overnight Sprint) --- */
@media (max-width: 768px) {

    /* ROI Calculator Mobile */
    .roi-calculator-widget {
        padding: 1.5rem;
        margin: 1rem 0;
        border-radius: 0.75rem;
    }

    .roi-header h3 {
        font-size: 1.25rem;
    }

    .roi-input,
    .btn-calculate {
        font-size: 16px;
        /* Prevent iOS zoom */
        padding: 0.875rem 1rem;
        /* Larger touch targets */
    }

    /* Exit Popup Mobile */
    .exit-popup-content {
        width: 95%;
        max-width: 100%;
        border-radius: 1rem;
    }

    .exit-popup-header {
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .exit-popup-body {
        padding: 0 1.25rem 1.5rem;
    }

    .exit-popup-title {
        font-size: 1.25rem;
    }

    /* Report Page Mobile */
    .report-header {
        padding: 40px 0 60px;
        /* Adjust for overlap */
    }

    .report-section {
        padding: 1.5rem;
    }

    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 2rem;
        margin-top: -50px;
        /* Pull up less */
        margin-bottom: 2rem;
    }

    /* General Typography Scaling */
    .hero-title {
        font-size: 2rem !important;
        /* Override inline styles */
        line-height: 1.2;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Comparison Table Horizontal Scroll Hint */
    .comparison-table-wrapper {
        position: relative;
    }

    .comparison-table-wrapper::after {
        content: 'Scroll →';
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.75rem;
        color: #94a3b8;
        background: rgba(255, 255, 255, 0.8);
        padding: 2px 6px;
        border-radius: 4px;
        pointer-events: none;
    }
}