/* SumGeniusAI Business Efficiency Scanner - Portal Glass Theme */
/* File: /css/business-scanner-dark.css */

/* Root Variables matching Portal Style */
:root {
    /* CodePen Glass Variables */
    --hue1: 255;  /* Purple/Pink */
    --hue2: 222;  /* Blue */
    --border: 1px;
    --border-color: hsl(var(--hue2) 12% 20%);
    --radius: 22px;
    --ease: cubic-bezier(0.5, 1, 0.89, 1);
    
    /* Dark Theme Colors */
    --bg-primary: #0A0A0A;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    
    /* Purple/Blue Theme */
    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
}

/* Business Efficiency Scanner Widget - Portal Glass Style */
.business-scanner {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 420px;
    max-height: 80vh;
    background: linear-gradient(235deg, 
        hsl(var(--hue1) 50% 10% / 0.8), 
        hsl(var(--hue1) 50% 10% / 0) 33%), 
        linear-gradient(45deg, 
        hsl(var(--hue2) 50% 10% / 0.8), 
        hsl(var(--hue2) 50% 10% / 0) 33%), 
        linear-gradient(to bottom, hsl(220 25% 4.8% / 0.66), hsl(220 25% 4.8% / 0.66));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: var(--border) solid var(--border-color);
    box-shadow: 
        0px 10px 16px -8px hsl(var(--hue2) 50% 2%), 
        0px 20px 36px -14px hsl(var(--hue2) 50% 4%);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.4s var(--ease);
    transform: translateY(calc(100% - 80px));
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

.business-scanner.expanded {
    transform: translateY(0);
    box-shadow: 
        0px 15px 24px -12px hsl(var(--hue2) 50% 2%), 
        0px 30px 48px -18px hsl(var(--hue2) 50% 4%);
}

/* Subtle animated border gradient */
.business-scanner::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        hsla(var(--hue1) 50% 60% / 0.3),
        hsla(var(--hue2) 50% 60% / 0.3),
        hsla(var(--hue1) 50% 60% / 0.3));
    background-size: 200% 200%;
    border-radius: var(--radius);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.business-scanner:hover::before {
    opacity: 1;
    animation: subtleGradientFlow 4s ease infinite;
}

@keyframes subtleGradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.scanner-header {
    background: linear-gradient(135deg, 
        hsla(var(--hue1) 50% 50% / 0.1),
        hsla(var(--hue2) 50% 50% / 0.1));
    color: var(--text-primary);
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.scanner-header::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--text-secondary);
    border-top: none;
    border-right: none;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.business-scanner.expanded .scanner-header::after {
    transform: translateY(-50%) rotate(225deg);
}

.scanner-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.scanner-content {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
    background: hsla(220 25% 10% / 0.3);
}

/* Step System */
.step {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    font-size: 0.9rem;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Industry Selection - Glass Cards */
.industry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.industry-option {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: hsla(var(--hue1) 0% 40% / 0.05);
    backdrop-filter: blur(10px);
}

.industry-option:hover {
    border-color: hsla(var(--hue1) 50% 60% / 0.5);
    background: hsla(var(--hue1) 0% 40% / 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.industry-option.selected {
    border-color: hsla(var(--hue1) 50% 60% / 0.5);
    background: linear-gradient(135deg, 
        hsla(var(--hue1) 50% 60% / 0.1),
        hsla(var(--hue2) 50% 60% / 0.1));
    box-shadow: 0 0 0 3px hsla(var(--hue1) 50% 60% / 0.1);
}

.industry-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.industry-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* Business Size */
.size-options {
    margin: 16px 0;
}

.size-option {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
    background: hsla(var(--hue1) 0% 40% / 0.05);
    backdrop-filter: blur(10px);
}

.size-option:hover {
    border-color: hsla(var(--hue1) 50% 60% / 0.5);
    background: hsla(var(--hue1) 0% 40% / 0.08);
    transform: translateX(4px);
}

.size-option.selected {
    border-color: hsla(var(--hue1) 50% 60% / 0.5);
    background: linear-gradient(135deg, 
        hsla(var(--hue1) 50% 60% / 0.1),
        hsla(var(--hue2) 50% 60% / 0.1));
    box-shadow: 0 0 0 3px hsla(var(--hue1) 50% 60% / 0.1);
}

.size-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.size-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Problem Checklist */
.problems-list {
    margin: 16px 0;
}

.problem-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: hsla(var(--hue1) 0% 40% / 0.05);
    backdrop-filter: blur(10px);
}

.problem-item:hover {
    border-color: hsla(var(--hue1) 50% 60% / 0.5);
    background: hsla(var(--hue1) 0% 40% / 0.08);
    transform: translateX(4px);
}

.problem-item.selected {
    border-color: hsla(var(--hue1) 50% 60% / 0.5);
    background: linear-gradient(135deg, 
        hsla(var(--hue1) 50% 60% / 0.1),
        hsla(var(--hue2) 50% 60% / 0.1));
    box-shadow: 0 0 0 3px hsla(var(--hue1) 50% 60% / 0.1);
}

.problem-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
    background: hsla(var(--hue1) 0% 40% / 0.05);
}

.problem-item.selected .problem-checkbox {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.problem-text {
    flex: 1;
}

.problem-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.problem-impact {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Contact Form */
.contact-form {
    margin: 16px 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid hsl(var(--hue2) 13% 18.5% / 0.5);
    border-radius: calc(var(--radius) * 0.5);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: hsl(var(--hue1) 0% 40% / 0.05);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: hsl(var(--hue1) 50% 60% / 0.5);
    background: hsl(var(--hue1) 0% 40% / 0.08);
    box-shadow: 0 0 0 3px hsl(var(--hue1) 50% 60% / 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Results Display */
.results-container {
    background: hsla(var(--hue1) 0% 40% / 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    border: 1px solid var(--border-color);
}

.roi-display {
    background: var(--gradient-primary);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.roi-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.roi-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.roi-label {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.roi-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.roi-item {
    text-align: center;
    padding: 16px;
    background: hsla(var(--hue1) 0% 40% / 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.roi-item-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.roi-item-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.solutions-preview {
    margin: 20px 0;
}

.solution-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: hsla(var(--hue1) 0% 40% / 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid #8B5CF6;
}

.solution-icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.solution-text {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

/* Action Buttons - Matching Portal Style */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: calc(var(--radius) * 0.5);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 8px 0;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.btn-secondary {
    background: hsla(var(--hue1) 0% 40% / 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: hsla(var(--hue1) 0% 40% / 0.08);
    border-color: hsla(var(--hue1) 50% 60% / 0.5);
    transform: translateY(-2px);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: hsla(var(--hue2) 13% 18.5% / 0.3);
    border-radius: 3px;
    margin: 16px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
    border-radius: 3px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.notification-pulse {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, 
        hsla(var(--hue1) 50% 60% / 0.9),
        hsla(var(--hue2) 50% 60% / 0.9));
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

.time-estimate {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin: 8px 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .business-scanner {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        max-height: 85vh;
    }

    .industry-grid {
        grid-template-columns: 1fr;
    }

    .roi-breakdown {
        grid-template-columns: 1fr;
    }

    .scanner-content {
        padding: 16px;
    }
}

/* Smooth scrollbar for content */
.scanner-content::-webkit-scrollbar {
    width: 6px;
}

.scanner-content::-webkit-scrollbar-track {
    background: hsla(var(--hue2) 13% 18.5% / 0.1);
    border-radius: 3px;
}

.scanner-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        hsla(var(--hue1) 50% 60% / 0.5),
        hsla(var(--hue2) 50% 60% / 0.5));
    border-radius: 3px;
}

.scanner-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        hsla(var(--hue1) 50% 60% / 0.7),
        hsla(var(--hue2) 50% 60% / 0.7));
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.business-scanner *:focus {
    outline: 2px solid hsla(var(--hue1) 50% 60% / 0.5);
    outline-offset: 2px;
}

.industry-option:focus,
.size-option:focus,
.problem-item:focus {
    outline: 2px solid hsla(var(--hue1) 50% 60% / 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .business-scanner {
        border: 2px solid var(--text-primary);
    }
    
    .industry-option,
    .size-option,
    .problem-item {
        border-width: 2px;
    }
    
    .btn-primary {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .business-scanner,
    .step,
    .btn,
    .industry-option,
    .size-option,
    .problem-item {
        transition: none;
        animation: none;
    }
    
    .notification-pulse {
        animation: none;
    }
}

/* Print styles */
@media print {
    .business-scanner {
        display: none;
    }
}