/* Demo Page Styles — extends base.html design system */

/* Demo Container */
.demo-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-4, 1rem) var(--spacing-4, 1rem);
}

@media (max-width: 767px) {
    .demo-container {
        padding-bottom: 100px;
    }
}

/* Demo Banner Strip */
.demo-banner-strip {
    background: linear-gradient(135deg, var(--primary, #3b82f6), #6366f1);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 24px;
}

.demo-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 0.9rem;
}

.demo-banner-inner i {
    font-size: 1.1rem;
}

/* Business Selector */
.business-selector {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.business-btn {
    background: var(--card-bg, #1e293b);
    border: 2px solid var(--border, #334155);
    color: var(--text-primary, #f8fafc);
    padding: 12px 20px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.9rem;
}

.business-btn:hover, .business-btn.active {
    background: var(--primary, #3b82f6);
    border-color: var(--primary, #3b82f6);
    color: white;
    transform: translateY(-1px);
}

/* Panels */
.panel {
    background: var(--card-bg, #1e293b);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border, #334155);
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border, #334155);
}

.panel-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary, #f8fafc);
    font-weight: 600;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary, #cbd5e1);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border, #334155);
    border-radius: 8px;
    background: var(--bg-secondary, #1e293b);
    color: var(--text-primary, #f8fafc);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

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

.form-control::placeholder {
    color: var(--text-muted, #64748b);
}

/* Buttons */
.demo-container .btn {
    background: var(--primary, #3b82f6);
    color: white;
    border: 1px solid var(--primary, #3b82f6);
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-right: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.demo-container .btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.demo-container .btn-danger {
    background: var(--danger, #ef4444);
    border-color: var(--danger, #ef4444);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.stat-card {
    background: var(--bg-secondary, #1e293b);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border, #334155);
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary, #3b82f6);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary, #cbd5e1);
    font-weight: 500;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin-top: 16px;
    border-radius: 16px;
    border: 1px solid var(--border, #334155);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    background: var(--card-bg, #1e293b);
}

.data-table thead tr {
    background: var(--bg-secondary, #1e293b);
    border-bottom: 1px solid var(--border, #334155);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary, #cbd5e1);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border, #334155);
    color: var(--text-primary, #f8fafc);
    font-size: 0.875rem;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-secondary, #1e293b);
}

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

/* Scenarios */
.business-scenario {
    display: none;
}

.business-scenario.active {
    display: block;
}

.operation-section {
    display: none;
}

.operation-section.active {
    display: block;
}

/* Cart */
.cart-item {
    background: var(--bg-secondary, #1e293b);
    padding: 16px;
    margin: 8px 0;
    border-radius: 12px;
    border: 1px solid var(--border, #334155);
}

.cart-total {
    border-top: 2px solid var(--border, #334155);
    padding-top: 16px;
    margin-top: 16px;
    font-size: 1.125rem;
    font-weight: 700;
}

/* Notifications */
.notification {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success, #10b981);
    padding: 16px;
    border-radius: 12px;
    margin: 8px 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin: 16px 0;
}

/* Responsive */
@media (max-width: 968px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .business-selector {
        flex-direction: column;
    }

    .business-btn {
        width: 100%;
    }

    .chart-container {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .demo-container {
        padding: 0 12px 100px;
    }

    .panel {
        padding: 16px;
    }

    .chart-container {
        height: 200px;
    }

    .data-table {
        min-width: 500px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .demo-container {
        padding: 0 8px 100px;
    }

    .chart-container {
        height: 180px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .data-table {
        min-width: 450px;
        font-size: 0.75rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
}
