/* Shopify Fetcher Styles */

:root {
    --primary-color: #5c6ac4;
    --success-color: #50b83c;
    --warning-color: #f49342;
    --error-color: #de3618;
    --info-color: #47c1bf;
    --dark-bg: #1a1a1a;
    --light-bg: #f4f6f8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

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

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
}

.data-panel, .log-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.panel-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background: #f8f9fa;
}

.log-container {
    height: 600px;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    background: var(--dark-bg);
}

.log-entry {
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-timestamp {
    color: #888;
    min-width: 60px;
}

.log-level {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 50px;
    text-align: center;
}

.log-message {
    flex: 1;
    color: #ddd;
}

.log-info .log-level {
    background: var(--info-color);
    color: white;
}

.log-success .log-level {
    background: var(--success-color);
    color: white;
}

.log-warning .log-level {
    background: var(--warning-color);
    color: white;
}

.log-error .log-level {
    background: var(--error-color);
    color: white;
}

.log-debug .log-level {
    background: #666;
    color: white;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .log-container {
        height: 400px;
    }
}