/* dgs Tab styling */
.dgs-tab {
    width: 100%;
}

.dgs-tab-panel {
    width: 100%;
}

.dgs-tab-content {
    width: 100%;
}

/* Editor styling */
.dgs-tab-editor-info {
    background-color: var(--base-ultra-light);
    color: var(--primary);
    padding: 0.5em;
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-xs);
    font-size: var(--text-xs);
    /* border: 1px dashed var(--base-trans-30); */
}

.dgs-tab-editor-info small {
    font-size: 0.85em;
    opacity: 0.8;
}

/* Block spacing in tab */
.dgs-tab .wp-block {
    margin-top: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.dgs-tab-content
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout
    > * {
    margin-bottom: var(--space-s);
}

.dgs-tab-content
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout
    > *:last-child {
    margin-bottom: 0;
}

/* Basic visibility */
.dgs-tab[aria-hidden="true"] {
    display: none;
}

.dgs-tab[aria-hidden="false"] {
    display: block;
}

/* Editor focus state */
.dgs-tab:focus-within .dgs-tab-editor-info {
    border-color: var(--primary);
    background-color: var(--primary-ultra-light);
}

/* Editor empty state */
.wp-admin .dgs-tab .block-editor-inner-blocks .block-list-appender {
    margin-top: var(--space-xs);
}

/* Force display when selected */
.is-selected.dgs-tab,
.is-selected .dgs-tab,
.has-child-selected .dgs-tab {
    display: block !important;
}
