html {
    --extension-bg-color: rgba(255, 255, 255, 0.4);
}
html.dark {
    --extension-bg-color: rgba(0, 0, 0, 0.2);
}

.extension-panel {
    height: 100%;
    background: var(--extension-bg-color);
    border-left: 1px solid var(--workspace-left-border-color);
    display: flex;
    flex-direction: column;
    /* 推入推出动画：初始宽度为 0，透明；由父级 CSS class 触发展开 */
    flex: 0 0 0;
    min-width: 0;
    overflow: hidden;
    transition: flex-basis 0.36s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.36s ease,
                border-left-color 0.36s ease;
}

/* 面板可见时：展开 */
.extension-panel--visible {
    flex-basis: 50%;
    opacity: 1;
}

/* 分屏时：面板展开（推入动画由 flex-basis 0→60% 触发，实现 4:6 比例） */
.workspace-content--both-visible .extension-panel {
    flex-basis: 60%;
    opacity: 1;
}

.extension-panel__title {
    font-size: var(--uosai-font-size-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.extension-panel__close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.extension-panel__close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.extension-panel__close-btn:active {
    background: rgba(0, 0, 0, 0.1);
}

.extension-panel__content {
    flex: 1;
    overflow-y: auto;
    padding: 0px;
    display: flex;
    justify-content: center;
}

.extension-panel__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-secondary);
    text-align: center;
}

.extension-panel__empty-icon {
    margin-bottom: 16px;
    opacity: 0.5;
}

.extension-panel__empty-text {
    font-size: var(--uosai-font-size-base);
    margin: 0;
}

/* Error state styles */
.extension-panel__error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 20px;
}

.extension-panel__error-icon {
    margin-bottom: 16px;
    opacity: 0.5;
}

.extension-panel__error-text {
    font-size: var(--uosai-font-size-md);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 8px 0;
}

.extension-panel__error-detail {
    font-size: var(--uosai-font-size-base);
    color: var(--color-text-secondary);
    margin: 0 0 16px 0;
    max-width: 300px;
}

.extension-panel__retry-btn {
    padding: 8px 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--uosai-font-size-base);
    transition: background 0.2s ease;
}

.extension-panel__retry-btn:hover {
    background: var(--color-primary-hover);
}

/* ExtensionPanel 内的 Footer 样式：最大宽度 960px 并居中显示 */
.extension-panel .footer {
    align-self: center;
    max-width: 960px !important;
}


