.layer-panel {
    position: relative;
}

.layer-panel.is-loading {
    gap: 0;
    padding: 0;
}

.layer-list-scroll .layer-list {
    padding: 0;
}

.layer-panel-loading {
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: rgba(10, 14, 24, 0.5);
}

.layer-panel-loading.hidden {
    display: none;
}

.layer-panel.is-loading .layer-panel-loading {
    display: flex;
    position: absolute;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
    border-radius: 0;
}

.layer-panel.is-loading .sidebar-prompt-bar {
    display: none;
}

.layer-panel-loading-stage {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.layer-panel-fx-canvas {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.layer-panel-loading-text {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-light);
    text-align: center;
    pointer-events: none;
    text-shadow:
        0 0 20px rgba(0, 0, 0, 0.9),
        0 1px 3px rgba(0, 0, 0, 0.8);
}

.layer-list .layer-item-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.layer-list .layer-item-desc.is-truncated {
    cursor: help;
}

.layer-desc-tooltip {
    position: fixed;
    z-index: 10000;
    max-width: min(300px, calc(100vw - 20px));
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.35),
        0 16px 40px rgba(0, 0, 0, 0.55);
    color: var(--text-light);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0.01em;
    pointer-events: none;
    white-space: normal;
    word-break: break-word;
}

.layer-desc-tooltip::before {
    content: '';
    position: absolute;
    left: 16px;
    width: 10px;
    height: 10px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    transform: rotate(45deg);
}

.layer-desc-tooltip[data-placement='above']::before {
    bottom: -6px;
    border-top: none;
    border-left: none;
}

.layer-desc-tooltip[data-placement='below']::before {
    top: -6px;
    border-bottom: none;
    border-right: none;
}

.layer-desc-tooltip[hidden] {
    display: none !important;
}

