/* Agent Modal (shared by create and rename) */

[popover].agent-modal {
    width: 400px;
    max-height: 80vh;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border-color, #333);
    border-radius: 8px;
    background: var(--bg-secondary, #1e1e1e);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: var(--text-primary, #fff);
    overflow: hidden;
}

[popover].agent-modal:popover-open {
    display: flex;
    flex-direction: column;
}

[popover].agent-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.agent-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #333);
    font-size: 14px;
    font-weight: 600;
}

.agent-modal__close {
    background: none;
    border: none;
    color: var(--text-secondary, #aaa);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.agent-modal__close:hover {
    background: var(--hover-bg, #333);
    color: var(--text-primary, #fff);
}

.agent-modal__body {
    padding: 16px;
}

.agent-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color, #333);
}

.agent-modal__btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.agent-modal__btn--cancel {
    background: transparent;
    color: var(--text-secondary, #aaa);
}

.agent-modal__btn--cancel:hover {
    background: var(--hover-bg, #333);
}

.agent-modal__btn--create {
    background: var(--color-accent-primary, #007bff);
    color: white;
}

.agent-modal__btn--create:hover {
    opacity: 0.9;
}

.agent-modal__btn--create:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.agent-modal__btn--delete {
    background: #d32f2f;
    color: white;
}

.agent-modal__btn--delete:hover {
    background: #b71c1c;
}