/* WalletBB Demo Web Styles */

/* Header Styles */
.demo-header {
    background: linear-gradient(135deg, #060606 0%, #0d0913 50%, #ec4899 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

.demo-badges {
    margin-top: 1rem;
}

.demo-badges .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Metric Cards */
.metric-card {
    transition: transform 0.2s ease-in-out;
    border: 1px solid #e9ecef;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Scenario Cards */
.scenario-card {
    transition: all 0.3s ease;
    min-height: 450px;
    position: relative;
}

.scenario-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.scenario-icon {
    width: 60px;
    text-align: center;
}

.scenario-title {
    color: #495057;
    font-weight: 600;
}

.scenario-features .badge {
    font-size: 0.75rem;
}

.scenario-actions {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
}

/* Progress Bars */
.progress-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-content {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #007bff;
}

/* Stat Cards */
.stat-card {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Metrics Panel */
.metrics-panel {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.metric-item {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-name {
    font-weight: 500;
    text-transform: capitalize;
    flex: 1;
}

.metric-value {
    font-weight: bold;
    color: #007bff;
}

/* Modal Enhancements */
.modal-xl {
    max-width: 1200px;
}

/* Alert Enhancements */
.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Loading Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Enhanced Button and Progress Styles */

/* Demo Action Section - Better positioned button */
.demo-action-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.demo-action-section:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0,123,255,0.1);
}

.demo-start-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
}

.demo-start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.3);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

/* Enhanced Live Progress Section */
.live-progress-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-top: 1.5rem;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
}

.progress-header h5 {
    font-size: 1.3rem;
    font-weight: 700;
}

.progress-badge .badge {
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 0.6rem 1.2rem;
}

/* Current Action Card */
.current-action-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.current-action-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.progress-animation .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

/* Visual Progress Bar */
.visual-progress .progress {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: visible;
}

.visual-progress .progress-bar {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 50%, #004085 100%);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 14px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.progress-markers {
    margin-top: 0.5rem;
}

.progress-markers small {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Enhanced Metrics Grid */
.metrics-grid .metric-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metrics-grid .metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metrics-grid .metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.metrics-grid .metric-card:hover::before {
    opacity: 1;
}

.metric-icon {
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-value {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Story Timeline */
.story-timeline h6 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #007bff, #e9ecef);
    border-radius: 2px;
}

.timeline-step {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.timeline-step.completed .timeline-content {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.timeline-step.current .timeline-content {
    background: linear-gradient(135deg, #cce7ff 0%, #b8daff 100%);
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 10px rgba(0,123,255,0.2);
}

.timeline-step.pending .timeline-content {
    background: #f8f9fa;
    border-left: 4px solid #e9ecef;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
    z-index: 2;
}

.timeline-step.completed .timeline-marker {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

.timeline-step.current .timeline-marker {
    border-color: #007bff;
    background: #007bff;
    color: white;
    animation: pulse-marker 2s infinite;
}

.timeline-content {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.step-number {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.step-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.current-indicator {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,123,255,0.2);
}

/* Live Status Footer */
.live-status-footer {
    background: rgba(0,123,255,0.05);
    border-radius: 8px;
    padding: 1rem;
}

.status-info, .estimated-time {
    display: flex;
    align-items: center;
}

/* Animations */
@keyframes pulse-marker {
    0% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0,123,255,0.4);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(0,123,255,0);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0,123,255,0);
    }
}

/* Enhanced completion and success states */

/* Completion Section */
.success-header h6 {
    font-size: 1.1rem;
}

.success-header .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
}

.completion-summary {
    padding: 1rem;
    background: rgba(25, 135, 84, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--bs-success);
}

.achievement-stats {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
}

.achievement-stats .h5 {
    font-weight: bold;
    font-size: 1.25rem;
}

.action-buttons {
    margin-top: 1rem;
}

.action-buttons .btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Enhanced result section */
.result-section {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #198754, #20c997);
    border-radius: 3px 3px 0 0;
}

.result-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(25, 135, 84, 0.15);
}

/* Animation for completion state */
@keyframes completionPulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4);
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

.result-section {
    animation: completionPulse 2s infinite;
}

/* Ensure completion message is visible */
.live-progress-section .current-action-card {
    min-height: 100px;
    display: flex;
    align-items: center;
}

.current-action-card .col-md-8 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Make completion text more prominent */
.current-action-card h6 {
    font-size: 1.2rem;
}

.current-action-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Success completion animation */
.completion-success {
    animation: successBounce 0.6s ease-in-out;
}

@keyframes successBounce {
    0% { 
        transform: scale(0.8);
        opacity: 0;
    }
    50% { 
        transform: scale(1.05);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Continue Button Styles */
.completion-ready-message {
    background: linear-gradient(135deg, #d4f8e8 0%, #c8f7dc 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.completion-ready-message h6 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.continue-button {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
    position: relative;
    overflow: hidden;
}

.continue-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;
}

.continue-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(25, 135, 84, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #198754 100%);
    animation: none; /* Stop pulsing on hover */
}

.continue-button:hover::before {
    left: 100%;
}

.continue-button:active {
    transform: translateY(-1px);
}

/* Animation for button appearance */
.continue-button {
    animation: buttonSlideIn 0.5s ease-out, buttonPulse 2s infinite;
}

@keyframes buttonSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(25, 135, 84, 0.6);
    }
}

/* Enhanced completion message */
.completion-ready-message {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.completion-ready-message {
    animation: messageSlideIn 0.4s ease-out;
}

@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .demo-header {
        padding: 1.5rem;
    }
    
    .demo-header h1 {
        font-size: 2rem;
    }
    
    .scenario-card {
        min-height: auto;
        position: static;
    }
    
    .scenario-actions {
        position: static;
        margin-top: 1rem;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-marker {
        left: -16px;
        width: 12px;
        height: 12px;
    }
    
    .demo-action-section {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .live-progress-section {
        padding: 1rem !important;
        margin-top: 1rem;
    }
    
    .metrics-grid .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .timeline-container {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .progress-header h5 {
        font-size: 1.1rem;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
}

/* Button Enhancements */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Card Shadows */
.card {
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Success States */
.result-section {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Progress Bar Animations */
.progress-bar {
    transition: width 0.6s ease;
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Icon Alignments */
.fas, .far {
    vertical-align: middle;
}

/* Color Scheme */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Storytelling enhancements */
.persona-badge {
    margin-bottom: 8px;
}

.story-context {
    border-left: 3px solid #17a2b8;
    padding-left: 0;
}

.story-context .bg-light {
    border-radius: 6px;
    font-style: italic;
}

.business-impact {
    border-left: 3px solid #28a745;
    padding-left: 0;
}

.business-impact .bg-success {
    border-radius: 6px;
}

/* Enhanced badges */
.badge.bg-info.bg-opacity-15 {
    font-size: 0.7em;
    font-weight: 500;
}

/* Story progress indicators */
.progress-section .text-muted {
    font-style: italic;
    color: #6c757d !important;
}
