/* XBert ROI Calculator Styles - Updated to match React version */

:root {
    /* Nextiva Brand Colors - Updated to match React version */
    --xbert-primary: hsl(230, 94%, 60%);
    --xbert-primary-foreground: hsl(0, 0%, 100%);
    --xbert-primary-glow: hsl(230, 94%, 75%);
    --xbert-success: hsl(152, 69%, 45%);
    --xbert-success-foreground: hsl(0, 0%, 100%);
    --xbert-success-light: hsl(152, 60%, 96%);
    --xbert-destructive: hsl(0, 72%, 56%);
    --xbert-destructive-foreground: hsl(0, 0%, 100%);
    --xbert-destructive-light: hsl(0, 70%, 96%);
    --xbert-warning: hsl(25, 95%, 53%);
    --xbert-warning-foreground: hsl(0, 0%, 100%);
    --xbert-background: hsl(210, 40%, 98%);
    --xbert-foreground: hsl(220, 15%, 15%);
    --xbert-card: hsl(0, 0%, 100%);
    --xbert-card-foreground: hsl(220, 15%, 15%);
    --xbert-muted: hsl(210, 30%, 94%);
    --xbert-muted-foreground: hsl(220, 10%, 46%);
    --xbert-border: hsl(214, 32%, 88%);
    --xbert-radius: 0.75rem;
    --xbert-shadow-card: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --xbert-shadow-elevated: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

.xbert-calculator-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--xbert-background) 0%, var(--xbert-muted) 30%, var(--xbert-background) 100%);
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

.xbert-calculator-container {
    max-width: 1400px;
    margin: 0 auto;
}

.xbert-calculator-card {
    background: var(--xbert-card);
    border-radius: var(--xbert-radius);
    box-shadow: var(--xbert-shadow-elevated);
    border: 1px solid var(--xbert-border);
    overflow: hidden;
}

/* Header Styles */
.xbert-header {
    background: linear-gradient(135deg, var(--xbert-primary) 0%, var(--xbert-primary-glow) 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--xbert-primary-foreground);
}

.xbert-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xbert-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin: 0;
    opacity: 0.9;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* Content Styles */
.xbert-content {
    padding: 2.5rem;
}

.xbert-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--xbert-foreground);
    margin: 0 0 2rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--xbert-border);
}

/* Input Section */
.xbert-inputs-section {
    margin-bottom: 3rem;
}

.xbert-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.xbert-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.xbert-input-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.xbert-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--xbert-foreground);
}

.xbert-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--xbert-primary);
}

.xbert-slider-container {
    padding: 1rem 0;
    position: relative;
}

.xbert-slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--xbert-muted);
    border-radius: 4px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.xbert-slider-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--xbert-primary);
    border-radius: 4px;
    transition: width 0.2s ease;
    z-index: 2;
}

.xbert-slider {
    position: relative;
    width: 100%;
    height: 16px;
    border-radius: 4px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    z-index: 3;
}

/* WebKit Track - Make transparent since we use custom track */
.xbert-slider::-webkit-slider-track {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: transparent;
    border: none;
}

/* WebKit Thumb */
.xbert-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--xbert-primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #ffffff;
    margin-top: -6px;
    position: relative;
    z-index: 4;
}

/* Firefox Track - Make transparent */
.xbert-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: transparent;
    border: none;
}

/* Firefox Thumb */
.xbert-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--xbert-primary);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 4;
}

/* Hover Effects */
.xbert-slider:hover::-webkit-slider-thumb {
    background: hsl(230, 94%, 55%);
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.xbert-slider:hover::-moz-range-thumb {
    background: hsl(230, 94%, 55%);
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.xbert-slider:focus {
    outline: none;
}

.xbert-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.xbert-slider:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.xbert-help-text {
    font-size: 0.75rem;
    color: var(--xbert-muted-foreground);
    margin: 0;
}

/* Results Section */
.xbert-results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.xbert-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.xbert-cost-card {
    padding: 1.5rem;
    border-radius: var(--xbert-radius);
    box-shadow: var(--xbert-shadow-card);
}

.xbert-human-cost {
    background: var(--xbert-destructive-light);
    border: 1px solid hsl(0, 72%, 85%);
}

.xbert-ai-cost {
    background: var(--xbert-success-light);
    border: 1px solid hsl(152, 69%, 85%);
}

.xbert-cost-label {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
}

.xbert-human-cost .xbert-cost-label {
    color: var(--xbert-destructive);
}

.xbert-ai-cost .xbert-cost-label {
    color: var(--xbert-success);
}

.xbert-cost-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.xbert-human-cost .xbert-cost-value {
    color: var(--xbert-destructive);
}

.xbert-ai-cost .xbert-cost-value {
    color: var(--xbert-success);
}

.xbert-cost-description {
    font-size: 0.875rem;
    color: var(--xbert-muted-foreground);
    margin: 0;
}

/* Savings Card - Enhanced to match React version */
.xbert-savings-card {
    background: linear-gradient(135deg, hsl(230, 94%, 95%) 0%, hsl(230, 94%, 98%) 100%);
    border: 1px solid var(--xbert-primary);
    border-left: 4px solid var(--xbert-primary);
    padding: 2rem;
    border-radius: var(--xbert-radius);
    box-shadow: var(--xbert-shadow-elevated);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.xbert-savings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(230, 94, 60, 0.05) 100%);
    pointer-events: none;
}

.xbert-savings-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--xbert-primary);
    margin: 0 0 0.75rem 0;
}

.xbert-savings-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--xbert-primary);
    margin: 0 0 0.75rem 0;
    word-break: break-word;
}

.xbert-savings-description {
    font-size: 0.875rem;
    color: var(--xbert-foreground);
    opacity: 0.8;
    margin: 0;
}

/* Breakdown Section */
.xbert-breakdown-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.xbert-breakdown-card {
    background: var(--xbert-card);
    border: 1px solid var(--xbert-border);
    border-left: 4px solid var(--xbert-primary);
    border-radius: var(--xbert-radius);
    padding: 1.25rem;
    box-shadow: var(--xbert-shadow-card);
}

.xbert-breakdown-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--xbert-foreground);
    margin: 0 0 0.75rem 0;
}

.xbert-breakdown-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.xbert-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6a7181;
    font-size: 16px;
}

.xbert-breakdown-row.xbert-savings-row {
    border-top: 1px solid var(--xbert-border);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    color: #21242c;
    font-weight: 700;
}

.xbert-breakdown-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.xbert-human-value {
    color: var(--xbert-destructive);
}

.xbert-ai-value {
    color: var(--xbert-success);
}

.xbert-savings-value {
    color: var(--xbert-primary);
}

.xbert-breakdown-row.xbert-savings-row .xbert-breakdown-value {
    font-size: 1.875rem;
    font-weight: 800;
}

/* CTA Section */
.xbert-cta-section {
    text-align: center;
    padding-top: 1.5rem;
}

.xbert-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    background: var(--xbert-primary);
    color: var(--xbert-primary-foreground);
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: var(--xbert-radius);
    text-decoration: none;
    box-shadow: var(--xbert-shadow-elevated);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
    position: relative;
    overflow: hidden;
}

.xbert-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.xbert-cta-button:hover {
    background: hsl(230, 94%, 55%);
    transform: scale(1.02);
    color: var(--xbert-primary-foreground);
    text-decoration: none;
    box-shadow: 0 25px 30px -5px rgb(0 0 0 / 0.15), 0 10px 15px -8px rgb(0 0 0 / 0.1);
}

.xbert-cta-button:hover::before {
    left: 100%;
}

.xbert-cta-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3), var(--xbert-shadow-elevated);
}

.xbert-phone-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.xbert-cta-description {
    margin: 1rem 0 0 0;
    font-size: 0.875rem;
    color: var(--xbert-muted-foreground);
}

.xbert-phone-number {
    font-weight: 600;
    color: var(--xbert-foreground);
}

/* Enhanced Responsive Design - Matching React version */
@media (max-width: 1024px) {
    .xbert-inputs-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .xbert-calculator-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .xbert-header {
        padding: 2rem 1.5rem;
    }
    
    .xbert-content {
        padding: 1.5rem;
    }
    
    .xbert-inputs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .xbert-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .xbert-savings-value {
        font-size: clamp(2rem, 8vw, 3rem);
        word-break: break-word;
    }
    
    .xbert-cost-value {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    
    .xbert-breakdown-value {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
    
    .xbert-breakdown-row.xbert-savings-row .xbert-breakdown-value {
        font-size: clamp(1.25rem, 5vw, 1.875rem);
    }
    
    .xbert-breakdown-row {
        font-size: 0.875rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .xbert-breakdown-title {
        font-size: 1rem;
    }
    
    .xbert-cost-description,
    .xbert-savings-description {
        font-size: 0.75rem;
    }
    
    .xbert-cta-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .xbert-phone-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .xbert-slider {
        height: 12px;
    }
    
    .xbert-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
        margin-top: -5px;
    }
    
    .xbert-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .xbert-calculator-wrapper {
        padding: 0.5rem 0.25rem;
    }
    
    .xbert-header {
        padding: 1.5rem 1rem;
    }
    
    .xbert-content {
        padding: 1rem;
    }
    
    .xbert-savings-card {
        padding: 1.5rem;
    }
    
    .xbert-breakdown-card {
        padding: 1rem;
    }
    
    .xbert-cost-card {
        padding: 1.25rem;
    }
}