/* ActionsPanel Styles */

.panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    overflow: hidden;
}

.header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    background: var(--bg-primary, #ffffff);
}

.title {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.searchBox {
    display: flex;
    align-items: center;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.searchIcon {
    color: var(--text-secondary, #666);
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.searchInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    color: var(--text-primary, #333);
    outline: none;
}

.searchInput::placeholder {
    color: var(--text-tertiary, #999);
}

.actionsList {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.loading,
.error,
.empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary, #666);
}

.error {
    color: var(--error-color, #dc3545);
}

.retryButton {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.retryButton:hover {
    background: var(--primary-hover, #0056b3);
}

/* Method Groups */
.methodGroup {
    margin-bottom: 0.5rem;
    background: var(--bg-primary, #ffffff);
    border-radius: 6px;
    overflow: hidden;
}

.methodHeader {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    transition: background 0.2s;
}

.methodHeader:hover {
    background: var(--bg-hover, #f0f0f0);
}

.methodHeader svg {
    margin-right: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
}

.methodName {
    flex: 1;
    text-transform: capitalize;
}

.methodCount {
    background: var(--primary-color, #007bff);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Method Actions */
.methodActions {
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.actionItem {
    border-bottom: 1px solid var(--border-light, #f0f0f0);
}

.actionItem:last-child {
    border-bottom: none;
}

.actionHeader {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.actionHeader:hover {
    background: var(--bg-hover, #f5f5f5);
}

.actionInfo {
    flex: 1;
    min-width: 0;
}

.actionName {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary, #333);
}

.actionDesc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copyButton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary, #f5f5f5);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary, #666);
    transition: all 0.2s;
}

.copyButton:hover {
    background: var(--primary-color, #007bff);
    border-color: var(--primary-color, #007bff);
    color: white;
}

/* Action Details */
.actionDetails {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, #f8f9fa);
    border-top: 1px solid var(--border-light, #f0f0f0);
}

.actionDetails h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #666);
    text-transform: uppercase;
}

/* Parameters */
.parameters {
    margin-bottom: 1rem;
}

.parameters ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.param {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
}

.paramName {
    font-weight: 500;
    color: var(--text-primary, #333);
}

.required {
    color: var(--error-color, #dc3545);
    margin-left: 2px;
}

.paramType {
    font-family: monospace;
    font-size: 0.75rem;
    background: var(--bg-code, #e9ecef);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    color: var(--text-secondary, #666);
}

.paramDesc {
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-tertiary, #888);
}

/* Example JSON */
.exampleJson {
    margin-bottom: 1rem;
}

.exampleJson pre {
    margin: 0;
    padding: 0.75rem;
    background: var(--bg-code, #1e1e1e);
    color: var(--text-code, #d4d4d4);
    border-radius: 4px;
    font-size: 0.75rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.insertButton {
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.insertButton:hover {
    background: var(--primary-hover, #0056b3);
}
