/**
 * Verve AI Admin Styles
 */

.verve-ai-admin {
    max-width: 1200px;
}

.verve-ai-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Cards */
.verve-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.verve-card h2 {
    margin: 0 0 15px;
    padding: 0 0 15px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 16px;
    font-weight: 600;
}

/* Status Indicator */
.verve-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.verve-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.verve-status-dot.status-green {
    background: #00a32a;
    box-shadow: 0 0 0 3px rgba(0, 163, 42, 0.2);
}

.verve-status-dot.status-orange {
    background: #dba617;
    box-shadow: 0 0 0 3px rgba(219, 166, 23, 0.2);
}

.verve-status-dot.status-red {
    background: #d63638;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.2);
}

.verve-status-text {
    font-size: 14px;
    font-weight: 500;
}

/* Store ID */
.verve-store-id {
    color: #646970;
    font-size: 13px;
}

.verve-store-id code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Connect Prompt */
.verve-connect-prompt {
    color: #646970;
    margin-bottom: 20px;
}

/* Actions */
.verve-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

.verve-actions .button-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.verve-actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Subscription Details */
.verve-subscription-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.verve-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.verve-detail-label {
    color: #646970;
    font-size: 13px;
}

.verve-detail-value {
    font-weight: 500;
    font-size: 13px;
}

.verve-detail-value.status-active {
    color: #00a32a;
}

.verve-detail-value.status-inactive {
    color: #646970;
}

.verve-detail-value.status-expired,
.verve-detail-value.status-error {
    color: #d63638;
}

/* Dashboard Card */
.verve-dashboard-card p {
    color: #646970;
    margin-bottom: 0;
}

/* Loading State */
.verve-loading {
    opacity: 0.6;
    pointer-events: none;
}

.verve-loading .button {
    position: relative;
}

.verve-loading .button::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: verve-spin 0.8s linear infinite;
}

@keyframes verve-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Settings Page */
.verve-ai-admin .form-table th {
    width: 200px;
}

.verve-ai-admin .widefat {
    margin-top: 15px;
}

.verve-ai-admin .widefat td {
    padding: 10px 15px;
}

.verve-ai-admin .widefat code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Sync Card */
.verve-sync-card .verve-sync-status {
    margin-bottom: 15px;
}

.verve-sync-loading {
    color: #646970;
    font-style: italic;
}

.verve-sync-error {
    color: #d63638;
}

.verve-sync-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.verve-sync-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.verve-sync-row label {
    min-width: 80px;
    font-weight: 500;
    color: #1d2327;
}

.verve-select {
    flex: 1;
    max-width: 200px;
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
}

.verve-sync-actions {
    display: flex;
    gap: 10px;
}

.verve-sync-progress {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

.verve-progress-bar {
    height: 20px;
    background: #f0f0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.verve-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #135e96);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.verve-progress-text {
    font-size: 12px;
    color: #646970;
    margin: 0;
}

.verve-sync-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.verve-sync-type-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f6f7f7;
    border-radius: 4px;
}

.verve-sync-type-name {
    font-weight: 500;
    min-width: 80px;
}

.verve-sync-type-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
}

.verve-sync-type-status.status-running {
    background: #e7f3ff;
    color: #2271b1;
}

.verve-sync-type-status.status-idle {
    background: #edfaef;
    color: #00a32a;
}

.verve-sync-type-status.status-never {
    background: #f0f0f1;
    color: #646970;
}

.verve-sync-type-time {
    margin-left: auto;
    font-size: 12px;
    color: #646970;
}

.verve-current-mode {
    margin-top: 10px;
    font-size: 13px;
    color: #646970;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .verve-ai-dashboard {
        grid-template-columns: 1fr;
    }
    
    .verve-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .verve-sync-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .verve-select {
        max-width: 100%;
        width: 100%;
    }
    
    .verve-sync-type-row {
        flex-wrap: wrap;
    }
    
    .verve-sync-type-time {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
}
