/* Drawer 抽屉组件样式 */

.drawer-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1030;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.drawer-backdrop.drawer-backdrop--visible {
    opacity: 1;
    pointer-events: auto;
}

.drawer-container {
    position: fixed;
    z-index: 1039;
    pointer-events: none;
    display: flex;
}

/* 方向定位 */
.drawer-container--right  { top: 0; right: 0; bottom: 0; justify-content: flex-end; }
.drawer-container--left   { top: 0; left: 0; bottom: 0; justify-content: flex-start; }
.drawer-container--top    { top: 0; left: 0; right: 0; align-items: flex-start; }
.drawer-container--bottom { bottom: 0; left: 0; right: 0; align-items: flex-end; }

.drawer {
    background: var(--color-neutral-bg, #fff);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.7, 0.3, 0.1, 1);
}

/* 初始位移（隐藏状态） */
.drawer--right  { height: 100%; transform: translateX(100%); }
.drawer--left   { height: 100%; transform: translateX(-100%); }
.drawer--top    { width: 100%; transform: translateY(-100%); }
.drawer--bottom { width: 100%; transform: translateY(100%); }

.drawer.drawer--visible {
    transform: translate(0, 0);
}

/* 内部结构样式（复用 Modal 风格） */
.drawer__header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-neutral-border-secondary, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-neutral-title, #333);
}

.drawer__close-btn {
    background: none; border: none; font-size: 22px; cursor: pointer;
    color: var(--color-neutral-text-tertiary, #999);
}

.drawer__body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.drawer__footer {
    padding: 10px 24px;
    border-top: 1px solid var(--color-neutral-border-secondary, #f0f0f0);
    text-align: right;
}