/**
 * Ulteh AI Agents Admin Styles
 */

.ulteh-v2-container {
	max-width: 1200px;
	margin: 20px 0;
}

.ulteh-v2-container > h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ulteh-v2-container > h1 .dashicons {
    color: #3b82f6;
    font-size: 28px;
}

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

.ulteh-card-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.ulteh-card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.ulteh-card-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.ulteh-card-body {
    padding: 24px;
}

/* Success Card */
.ulteh-success-card {
    border-color: #10b981;
    background: #f0fdf4;
}

.ulteh-success-card .ulteh-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom-color: #10b981;
}

.ulteh-success-card .dashicons {
    color: #10b981;
    font-size: 32px;
}

/* Header Bar */
.ulteh-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ulteh-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.ulteh-user-info .dashicons {
    color: #3b82f6;
}

.ulteh-user-email {
    color: #64748b;
}

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

.ulteh-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.ulteh-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s;
}

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

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

.ulteh-btn-primary {
    background: #3b82f6;
    color: #fff;
}

.ulteh-btn-primary:hover {
    background: #2563eb;
}

.ulteh-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.ulteh-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.ulteh-btn-secondary:hover {
    background: #f9fafb;
}

.ulteh-btn-success {
    background: #10b981;
    color: #fff;
}

.ulteh-btn-success:hover {
    background: #059669;
}

.ulteh-btn-danger {
    background: #ef4444;
    color: #fff;
}

.ulteh-btn-danger:hover {
    background: #dc2626;
}

/* Messages */
.ulteh-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.ulteh-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.ulteh-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Agents Grid */
.ulteh-agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.ulteh-agent-card {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.ulteh-agent-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.ulteh-agent-card.active {
    border-color: #10b981;
    background: #f0fdf4;
}

.ulteh-agent-card.active::before {
    content: "✓ Active";
    position: absolute;
    top: 12px;
    right: 12px;
    background: #10b981;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.ulteh-agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e2e8f0;
    margin-bottom: 12px;
    overflow: hidden;
}

.ulteh-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ulteh-agent-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.ulteh-agent-description {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.ulteh-agent-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.ulteh-agent-actions {
    display: flex;
    gap: 8px;
}

.ulteh-agent-actions .ulteh-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
}

/* Loading */
.ulteh-loading {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ulteh-spin 0.6s linear infinite;
}

.spinner.large {
    width: 32px;
    height: 32px;
    border-color: rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
    border-width: 3px;
}

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

/* Help */
.ulteh-help {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.ulteh-help p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.ulteh-help a {
    color: #3b82f6;
    text-decoration: none;
}

.ulteh-help a:hover {
    text-decoration: underline;
}

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

    .ulteh-header-bar {
        flex-direction: column;
        gap: 12px;
    }

    .ulteh-user-info {
        text-align: center;
    }
}
