/**
 * FlowContent Admin Styles
 */

/* General */
.flowcontent-dashboard,
.flowcontent-settings,
.flowcontent-content-page,
.flowcontent-analytics-page,
.flowcontent-woocommerce-page,
.flowcontent-ai-page {
    max-width: 1400px;
}

/* Cards */
.flowcontent-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.flowcontent-card h2 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.flowcontent-card h3 {
    margin-top: 20px;
}

/* Dashboard Grid */
.flowcontent-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Status Card */
.flowcontent-status-card .status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.flowcontent-status-card .status-indicator.connected {
    background: #d4edda;
    color: #155724;
}

.flowcontent-status-card .status-indicator.disconnected {
    background: #f8d7da;
    color: #721c24;
}

.flowcontent-status-card .status-indicator .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.flowcontent-status-card .meta {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
}

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

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
}

.stat-item .stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #0073aa;
}

.stat-item .stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* SEO Score */
.seo-score-display {
    text-align: center;
    padding: 20px;
}

.seo-score-display .score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    color: #fff;
}

.seo-score-display.score-good .score-circle {
    background: #46b450;
}

.seo-score-display.score-ok .score-circle {
    background: #ffb900;
}

.seo-score-display.score-poor .score-circle {
    background: #dc3232;
}

.seo-score-display .score-value {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.seo-score-display .score-label {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* Quick Actions */
.quick-actions {
    list-style: none;
    margin: 0;
    padding: 0;
}

.quick-actions li {
    margin-bottom: 10px;
}

.quick-actions li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f5f5f5;
    border-radius: 5px;
    text-decoration: none;
    color: #23282d;
    transition: background 0.2s;
}

.quick-actions li a:hover {
    background: #e8e8e8;
}

.quick-actions li a .dashicons {
    color: #0073aa;
}

/* Modules List */
.modules-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.modules-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.modules-list li:last-child {
    border-bottom: none;
}

.modules-list li .dashicons {
    color: #0073aa;
}

.modules-list li .badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    background: #46b450;
    color: #fff;
}

.modules-list li .badge.inactive {
    background: #999;
}

.modules-list li.module-inactive {
    opacity: 0.6;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Welcome Panel */
.flowcontent-welcome-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.flowcontent-welcome-panel h2 {
    color: #fff;
    border-bottom: none;
}

.flowcontent-welcome-panel p {
    opacity: 0.9;
}

.flowcontent-welcome-panel .button-hero {
    background: #fff;
    color: #667eea;
    border: none;
    font-size: 16px;
    padding: 12px 30px;
}

.flowcontent-welcome-panel .button-hero:hover {
    background: #f0f0f0;
}

/* Settings */
.flowcontent-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.flowcontent-settings .form-table th {
    width: 200px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.connection-status.connected {
    background: #d4edda;
}

.connection-status.disconnected {
    background: #f8d7da;
}

.connection-status .dashicons {
    font-size: 30px;
    width: 30px;
    height: 30px;
}

.connection-status.connected .dashicons {
    color: #155724;
}

.connection-status.disconnected .dashicons {
    color: #721c24;
}

.connection-status .site-id {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0 0;
}

.connect-input-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.connect-input-group input {
    flex: 1;
}

.flowcontent-system-info {
    width: 100%;
}

.flowcontent-system-info th {
    text-align: left;
    padding: 8px 10px 8px 0;
    font-weight: normal;
    color: #666;
}

.flowcontent-system-info td {
    padding: 8px 0;
}

/* Tabs */
.flowcontent-tabs .nav-tab-wrapper {
    margin-bottom: 20px;
}

/* Buttons */
.flowcontent-card .button .dashicons {
    vertical-align: middle;
    margin-right: 5px;
    margin-top: -2px;
}

/* Sync Status */
.sync-status {
    display: inline-flex;
    align-items: center;
}

.sync-status.synced {
    color: #46b450;
}

.sync-status.not-synced {
    color: #999;
}

/* Loading */
.flowcontent-loading {
    text-align: center;
    padding: 40px;
}

.flowcontent-loading .spinner {
    float: none;
    margin: 0 auto;
}

/* Notices */
.flowcontent-notice {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.flowcontent-notice.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.flowcontent-notice.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.flowcontent-notice.warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

/* Progress Bar */
.progress-bar {
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    transition: width 0.3s ease;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .flowcontent-dashboard-grid,
    .flowcontent-settings-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .button {
        width: 100%;
    }

    .connect-input-group {
        flex-direction: column;
    }
}

/* AI Editor Styles */
.flowcontent-ai-assistant {
    padding: 10px;
}

.flowcontent-ai-assistant h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
}

.flowcontent-ai-assistant .button {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    text-align: left;
}

.flowcontent-ai-assistant .button .dashicons {
    margin-right: 5px;
}

/* SEO Metabox */
.flowcontent-seo-metabox .seo-score {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.flowcontent-seo-metabox .seo-score-good {
    background: #d4edda;
    color: #155724;
}

.flowcontent-seo-metabox .seo-score-ok {
    background: #fff3cd;
    color: #856404;
}

.flowcontent-seo-metabox .seo-score-poor {
    background: #f8d7da;
    color: #721c24;
}

/* Social Metabox */
.flowcontent-social-metabox .char-count {
    float: right;
}

/* Dashboard Widget */
.flowcontent-dashboard-widget .flowcontent-status {
    margin-bottom: 15px;
}

.flowcontent-dashboard-widget .flowcontent-quick-stats h4 {
    margin-bottom: 10px;
}

.flowcontent-dashboard-widget ul {
    margin: 0;
}

.flowcontent-dashboard-widget ul li {
    margin-bottom: 5px;
}

/* Monitoring Widget */
.flowcontent-monitoring-widget .health-score {
    margin-bottom: 20px;
}

.flowcontent-monitoring-widget .health-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* Print styles */
@media print {
    .flowcontent-card {
        break-inside: avoid;
    }
}
