/**
 * Document Intelligence Interactive Demo Styles
 * 
 * Responsive design with modern UI elements for engaging user experience
 * Aligned with SeaDev brand colors and design system
 */

/* Experience Container */
.document-experience-container {
    max-width: 1400px;
    margin: 0 auto 2rem auto;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.document-demo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4154f1, #6366f1, #8b5cf6);
    z-index: 1;
}

/* Experience Header */
.experience-header {
    text-align: center;
    margin-bottom: 2rem;
}

.demo-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.experience-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 0;
}

/* Progress Section */
.experience-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4154f1, #6366f1);
    transition: width 0.6s ease;
    border-radius: 4px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-step {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.progress-step i {
    font-size: 1.25rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.progress-step span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    transition: color 0.3s ease;
}

.progress-step.active {
    border-color: #4154f1;
    background: #f8faff;
    transform: translateY(-2px);
}

.progress-step.active i {
    color: #4154f1;
}

.progress-step.active span {
    color: #1e293b;
}

.progress-step:hover:not(.active) {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* Document Selection Dropdown */
.document-selector-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.selector-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.selector-label i {
    color: #4154f1;
    font-size: 1.1rem;
}

.custom-select-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.document-type-select {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #1e293b;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.document-type-select:focus {
    outline: none;
    border-color: #4154f1;
    box-shadow: 0 0 0 3px rgba(65, 84, 241, 0.1);
}

.document-type-select:hover {
    border-color: #cbd5e1;
}

.document-type-select option {
    padding: 0.5rem;
    background: white;
    color: #1e293b;
}

.document-type-select option:hover,
.document-type-select option:focus {
    background: #f8faff;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select-wrapper:hover .select-arrow {
    color: #4154f1;
}

.document-description {
    min-height: 120px;
    transition: all 0.3s ease;
}

.description-placeholder {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    margin: 0;
    background: #f1f5f9;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
}

.selected-document-info {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.document-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.document-header i {
    font-size: 1.5rem;
    color: #4154f1;
    flex-shrink: 0;
}

.document-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.document-desc {
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.extracted-fields {
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
}

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

.fields-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.field-tag {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #dbeafe;
}

.no-document {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
}

/* Enhanced Document Item */
.document-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.document-item i {
    font-size: 2rem;
    color: #dc2626;
    flex-shrink: 0;
}

.document-item.processed i {
    color: #16a34a;
}

.document-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.document-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.document-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.3;
}

/* Enhanced Result Items */
.result-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    animation: fadeIn 0.6s ease;
}

.result-item i {
    font-size: 1.5rem;
    color: #16a34a;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.result-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
}

.result-detail {
    font-size: 0.8rem;
    color: #16a34a;
    opacity: 0.8;
    line-height: 1.3;
}

/* Selection Prompt */
.selection-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.selection-prompt.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.prompt-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.prompt-content i {
    font-size: 1.5rem;
    color: #d97706;
    flex-shrink: 0;
}

.prompt-content p {
    margin: 0;
    color: #92400e;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
}

/* Experience workspace styles */
.experience-workspace {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

/* Demo workspace styles (legacy) */
.demo-workspace {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.experience-input, .experience-output, .demo-input, .demo-output {
    min-height: 200px;
}

.demo-input h4, .demo-output h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demo-input h4::before {
    content: '📥';
}

.demo-output h4::before {
    content: '📤';
}

.document-preview, .results-preview {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.document-item i {
    font-size: 1.5rem;
    color: #dc2626;
}

.document-item.processed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.document-item.processed i {
    color: #16a34a;
}

.process-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #16a34a;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    animation: fadeIn 0.6s ease;
}

.result-item i {
    font-size: 1.25rem;
    color: #16a34a;
}

.no-results {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Demo Process (Center Column) */
.demo-process {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #4154f1, #6366f1);
    border-radius: 12px;
    color: white;
    min-width: 200px;
}

.current-step-info i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.current-step-info h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.current-step-info p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.experience-action-btn, .demo-action-btn {
    background: #ffffff;
    color: #4154f1;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.demo-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Demo Benefits */
.demo-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Experience Benefits - Always in one line */
.experience-benefits {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
}

.benefit-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #4154f1;
}

.benefit-card i {
    font-size: 2rem;
    color: #4154f1;
    margin-bottom: 0.75rem;
}

.benefit-card h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.benefit-card p {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0;
}

/* Demo CTA */
.demo-cta, .experience-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-primary, .cta-secondary {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-primary {
    background: #4154f1;
    color: white;
}

.cta-primary:hover {
    background: #3730a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(65, 84, 241, 0.3);
}

.cta-secondary {
    background: transparent;
    color: #4154f1;
    border-color: #4154f1;
}

.cta-secondary:hover {
    background: #4154f1;
    color: white;
    transform: translateY(-2px);
}

/* Demo Completion */
.experience-completion, .demo-completion {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.6s ease;
}

.completion-message {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    margin: 2rem;
}

.completion-message i {
    font-size: 4rem;
    color: #16a34a;
    margin-bottom: 1rem;
}

.completion-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.completion-message p {
    color: #64748b;
    margin-bottom: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .demo-workspace {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .demo-process {
        order: -1;
    }
    
    .progress-steps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .document-selector-container {
        padding: 1.25rem;
    }
    
    .document-type-select {
        padding: 0.75rem 2.5rem 0.75rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .selected-document-info {
        padding: 1rem;
    }
    
    .document-header h4 {
        font-size: 1rem;
    }
    
    .field-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 768px) {
    .document-demo-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .demo-title {
        font-size: 1.75rem;
    }
    
    .progress-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-step {
        min-width: auto;
    }
    
    .demo-workspace {
        padding: 1.5rem;
    }
    
    .demo-benefits {
        grid-template-columns: 1fr;
    }
    
    .experience-benefits {
        gap: 1rem;
    }
    
    .experience-benefits .benefit-card {
        padding: 1.25rem;
    }
    
    .demo-cta {
        flex-direction: column;
    }
    
    .cta-primary, .cta-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .progress-steps {
        grid-template-columns: 1fr;
    }
    
    .progress-step span {
        font-size: 0.75rem;
    }
    
    .completion-message {
        padding: 2rem;
        margin: 1rem;
    }
    
    .document-selector-container {
        padding: 1rem;
    }
    
    .selector-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .document-type-select {
        padding: 0.75rem 2.5rem 0.75rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .selected-document-info {
        padding: 0.875rem;
    }
    
    .document-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        text-align: left;
    }
    
    .document-header i {
        font-size: 1.25rem;
    }
    
    .document-header h4 {
        font-size: 0.95rem;
    }
    
    .field-tag {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
    
    .fields-list {
        gap: 0.25rem;
    }
    
    .selection-prompt {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .prompt-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .experience-benefits {
        gap: 0.75rem;
    }
    
    .experience-benefits .benefit-card {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .experience-benefits .benefit-card i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .experience-benefits .benefit-card h5 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .experience-benefits .benefit-card p {
        font-size: 0.8rem;
    }
}

/* Versioning and Certification Styles */
.version-feature, .versioning-features {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    margin: 0.25rem 0;
}

.versioning-features {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.version-feature i {
    color: #4154f1;
    width: 1.2rem;
    text-align: center;
}

.hash-display {
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
    color: #475569;
    border: 1px solid #e2e8f0;
    word-break: break-all;
}

.status-verified {
    color: #16a34a;
    font-weight: 600;
}

.version-results {
    margin-top: 1rem;
}

.version-results .result-item {
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-left: 3px solid #4154f1;
    border-radius: 0 4px 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Certificate icon animation for versioning step */
.fa-certificate.fa-spin {
    animation: certificateGlow 2s ease-in-out infinite;
}

@keyframes certificateGlow {
    0%, 100% { 
        opacity: 1; 
        transform: rotate(0deg) scale(1);
        color: #4154f1;
    }
    50% { 
        opacity: 0.7; 
        transform: rotate(180deg) scale(1.1);
        color: #16a34a;
    }
}

/* Enhanced result items for certification */
.result-item .fa-certificate {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
    padding: 0.25rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Secure audit trail styles */
.audit-info {
    background: rgba(65, 84, 241, 0.05);
    border: 1px solid rgba(65, 84, 241, 0.2);
    border-radius: 6px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.audit-info .fa-shield-alt {
    color: #4154f1;
    margin-right: 0.25rem;
}

/* Audit trail indicator */
.audit-trail {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.audit-trail .fa-shield-alt {
    font-size: 0.7rem;
}