/**
 * EmbedPress Admin Styles
 */

// Import shared variables
@import './variables.scss';

// Layout styles
.embedpress-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.embedpress-header {
    background: #fff;
    border-bottom: 1px solid #e1e1e1;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    
    .embedpress-logo h1 {
        margin: 0;
        color: var(--ep-primary-color, #007cba);
        font-size: 24px;
        font-weight: 600;
    }
    
    .embedpress-nav {
        display: flex;
        gap: 20px;
        
        a {
            text-decoration: none;
            color: #555;
            font-weight: 500;
            padding: 8px 16px;
            border-radius: 4px;
            transition: all 0.2s ease;
            
            &:hover {
                background: #f0f0f0;
                color: var(--ep-primary-color, #007cba);
            }
        }
    }
}

.embedpress-main {
    flex: 1;
    padding: 20px;
    background: #f9f9f9;
}

.embedpress-footer {
    background: #fff;
    border-top: 1px solid #e1e1e1;
    padding: 15px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

// Dashboard styles
.embedpress-admin-dashboard {
    h1 {
        margin-bottom: 20px;
        color: #333;
    }
}

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

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    
    h3 {
        margin: 0 0 10px 0;
        color: #666;
        font-size: 14px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .stat-number {
        display: block;
        font-size: 32px;
        font-weight: 700;
        color: var(--ep-primary-color, #007cba);
        margin-bottom: 5px;
    }
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

// Analytics styles
.embedpress-analytics {
    h1 {
        margin-bottom: 20px;
        color: #333;
    }
}

.analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    h3 {
        margin: 0 0 10px 0;
        color: #666;
        font-size: 14px;
        font-weight: 500;
    }
    
    .metric-value {
        display: block;
        font-size: 28px;
        font-weight: 700;
        color: #333;
        margin-bottom: 5px;
    }
    
    .metric-change {
        font-size: 12px;
        color: #28a745;
        font-weight: 500;
    }
}

.analytics-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.chart-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    h3 {
        margin: 0 0 15px 0;
        color: #333;
        font-size: 16px;
    }
    
    .chart-placeholder {
        height: 200px;
        background: #f8f9fa;
        border: 2px dashed #dee2e6;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #6c757d;
        border-radius: 4px;
    }
}

// Settings styles
.embedpress-settings {
    h1 {
        margin-bottom: 20px;
        color: #333;
    }
}

.settings-sections {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.settings-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    h3 {
        margin: 0 0 20px 0;
        color: #333;
        font-size: 18px;
        border-bottom: 1px solid #e1e1e1;
        padding-bottom: 10px;
    }
}

.setting-item {
    margin-bottom: 20px;
    
    &:last-child {
        margin-bottom: 0;
    }
    
    label {
        display: flex;
        align-items: center;
        font-weight: 500;
        color: #333;
        cursor: pointer;
        
        input[type="checkbox"] {
            margin-right: 10px;
        }
    }
    
    .setting-description {
        margin: 5px 0 0 25px;
        color: #666;
        font-size: 14px;
        line-height: 1.4;
    }
}

.settings-actions {
    display: flex;
    gap: 15px;
}

// Error boundary styles
.embedpress-error-boundary {
    padding: 40px;
    text-align: center;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    margin: 20px;
    
    h2 {
        color: #dc3545;
        margin-bottom: 15px;
    }
    
    p {
        color: #666;
        margin-bottom: 20px;
    }
    
    details {
        text-align: left;
        margin: 20px 0;
        
        summary {
            cursor: pointer;
            font-weight: 500;
            margin-bottom: 10px;
        }
        
        pre {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 4px;
            overflow-x: auto;
            font-size: 12px;
        }
    }
}

// Button styles
.button {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    
    &:hover {
        background: #f8f9fa;
        border-color: #999;
    }
    
    &:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    &.button-primary {
        background: var(--ep-primary-color, #007cba);
        border-color: var(--ep-primary-color, #007cba);
        color: #fff;
        
        &:hover {
            background: #005a87;
            border-color: #005a87;
        }
    }
    
    &.button-large {
        padding: 12px 24px;
        font-size: 16px;
    }
}

// Responsive styles
@media (max-width: 768px) {
    .embedpress-header {
        flex-direction: column;
        height: auto;
        padding: 15px;
        
        .embedpress-nav {
            margin-top: 15px;
        }
    }
    
    .dashboard-stats,
    .analytics-overview {
        grid-template-columns: 1fr;
    }
    
    .analytics-charts {
        grid-template-columns: 1fr;
    }
    
    .dashboard-actions,
    .settings-actions {
        flex-direction: column;
    }
    
    .onboarding-content {
        padding: 20px;
    }
    
    .completion-actions {
        .button {
            width: 100%;
        }
    }
}
