/* Agent Documentation Proposal Card */
.agent-doc-proposal-card {
    margin-top: 12px;
    border: 1px dashed var(--md-sys-color-primary);
    background: rgba(103, 80, 164, 0.05); /* Soft primary tint */
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.3s ease-out;
}

.agent-doc-proposal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.agent-doc-proposal-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-doc-proposal-filename {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: var(--md-sys-font-mono, monospace);
    color: var(--md-sys-color-on-surface);
}

.agent-doc-proposal-desc {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.4;
    color: var(--md-sys-color-on-surface);
}

.agent-doc-proposal-preview {
    font-size: 11px;
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 6px;
}

.agent-doc-proposal-preview summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    outline: none;
    user-select: none;
}

.agent-doc-proposal-preview pre {
    white-space: pre-wrap;
    font-family: var(--md-sys-font-mono, monospace);
    font-size: 11px;
    margin-top: 6px;
    padding: 8px;
    max-height: 150px;
    overflow-y: auto;
    background: #1e1e1e;
    border-radius: 4px;
    color: #d4d4d4;
    border: 1px solid rgba(255,255,255,0.05);
}

.agent-doc-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.agent-doc-approve-btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.agent-doc-approve-btn:hover {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.agent-doc-approve-btn:active {
    transform: scale(0.97);
}

.agent-doc-dismiss-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--md-sys-color-outline);
    background: transparent;
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.agent-doc-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.agent-doc-dismiss-btn:active {
    transform: scale(0.97);
}

.agent-doc-status-msg {
    font-size: 12px;
    font-weight: 600;
    color: var(--md-sys-color-tertiary, #4CAF50);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

/* Unified Agent Proposal Cards */
.agent-proposal-card {
    margin-top: 12px;
    border: 1px dashed var(--md-sys-color-outline);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeIn 0.3s ease-out;
}

.agent-proposal-card.snippet-proposal {
    border-color: #E28743;
    background: rgba(226, 135, 67, 0.05);
}

.agent-proposal-card.interface-proposal {
    border-color: #00A896;
    background: rgba(0, 168, 150, 0.05);
}

.agent-proposal-card.file-proposal {
    border-color: #7209B7;
    background: rgba(114, 9, 183, 0.05);
}

.agent-proposal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.agent-proposal-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--md-sys-color-on-surface);
    display: flex;
    align-items: center;
    gap: 6px;
}

.snippet-proposal .agent-proposal-title {
    color: #E28743;
}

.interface-proposal .agent-proposal-title {
    color: #00A896;
}

.file-proposal .agent-proposal-title {
    color: #9D4EDD;
}

.agent-proposal-meta {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: var(--md-sys-font-mono, monospace);
    color: var(--md-sys-color-on-surface);
}

.agent-proposal-desc {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.4;
    color: var(--md-sys-color-on-surface);
}

.agent-proposal-preview {
    font-size: 11px;
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 6px;
}

.agent-proposal-preview summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    outline: none;
    user-select: none;
}

.agent-proposal-preview pre {
    white-space: pre-wrap;
    font-family: var(--md-sys-font-mono, monospace);
    font-size: 11px;
    margin-top: 6px;
    padding: 8px;
    max-height: 150px;
    overflow-y: auto;
    background: #1e1e1e;
    border-radius: 4px;
    color: #d4d4d4;
    border: 1px solid rgba(255,255,255,0.05);
}

.agent-proposal-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.agent-proposal-approve-btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.snippet-proposal .agent-proposal-approve-btn {
    background: #E28743;
    color: #ffffff;
}
.snippet-proposal .agent-proposal-approve-btn:hover {
    background: #f4a261;
}

.interface-proposal .agent-proposal-approve-btn {
    background: #00A896;
    color: #ffffff;
}
.interface-proposal .agent-proposal-approve-btn:hover {
    background: #02c39a;
}

.file-proposal .agent-proposal-approve-btn {
    background: #7209B7;
    color: #ffffff;
}
.file-proposal .agent-proposal-approve-btn:hover {
    background: #9d4edd;
}

.agent-proposal-approve-btn:active {
    transform: scale(0.97);
}

.agent-proposal-dismiss-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--md-sys-color-outline);
    background: transparent;
    color: var(--md-sys-color-on-surface);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.agent-proposal-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.agent-proposal-dismiss-btn:active {
    transform: scale(0.97);
}

.agent-proposal-status-msg {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.agent-proposal-status-msg.success {
    color: var(--md-sys-color-tertiary, #4CAF50);
}

/* Expected Outputs Selector */
.expected-outputs-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.output-toggle-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    opacity: 0.8;
    user-select: none;
}

.output-toggle-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.output-chip {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: rgba(255, 255, 255, 0.02);
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 3px;
}

.output-chip:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--md-sys-color-on-surface);
}

/* Active states with custom dark-palette selections */
.output-chip.active[data-type="code"] {
    background: rgba(85, 85, 255, 0.15);
    border-color: #5555ff;
    color: #9cdcfe;
    font-weight: 500;
}
.output-chip.active[data-type="files"] {
    background: rgba(114, 9, 183, 0.15);
    border-color: #7209b7;
    color: #d8b4fe;
    font-weight: 500;
}
.output-chip.active[data-type="docs"] {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--md-sys-color-outline);
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
}
.output-chip.active[data-type="snippets"] {
    background: rgba(226, 135, 67, 0.15);
    border-color: #E28743;
    color: #fbd38d;
    font-weight: 500;
}
.output-chip.active[data-type="interfaces"] {
    background: rgba(0, 168, 150, 0.15);
    border-color: #00A896;
    color: #4fd1c5;
    font-weight: 500;
}

#close-ai-panel-btn {
    cursor: pointer;
    color: var(--md-sys-color-on-surface-strong, #ffffff) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#close-ai-panel-btn:hover {
    background: rgba(244, 71, 71, 0.2) !important;
    border-color: rgba(244, 71, 71, 0.45) !important;
    color: var(--md-sys-color-error, #ff5252) !important;
    transform: rotate(90deg);
}

#close-ai-panel-btn svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}
