/* Details / Summary blocks used inside WordPress post and page content. */
.vt-entry__content details,
.editor-styles-wrapper .wp-block-details {
    margin-block: 1rem;
    overflow: hidden;
    color: var(--vt-color-text);
    border: 1px solid var(--vt-color-border);
    border-radius: var(--vt-radius-md);
    background: var(--vt-color-surface);
}

.vt-entry__content details > summary,
.editor-styles-wrapper .wp-block-details > summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3.5rem;
    padding: .8rem 3rem .8rem 1rem;
    color: var(--vt-color-heading);
    font-weight: 800;
    line-height: 1.8;
    cursor: pointer;
    list-style: none;
    user-select: none;
    background: var(--vt-color-surface-soft);
}

.vt-entry__content details > summary::-webkit-details-marker,
.editor-styles-wrapper .wp-block-details > summary::-webkit-details-marker {
    display: none;
}

.vt-entry__content details > summary::after,
.editor-styles-wrapper .wp-block-details > summary::after {
    position: absolute;
    inset-inline-end: 1rem;
    top: 50%;
    display: grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    content: "+";
    color: var(--vt-color-link);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
    border: 1px solid var(--vt-color-border);
    border-radius: 50%;
    background: var(--vt-color-surface);
    transform: translateY(-50%);
}

.vt-entry__content details[open] > summary::after,
.editor-styles-wrapper .wp-block-details[open] > summary::after {
    content: "−";
}

.vt-entry__content details > summary:hover,
.vt-entry__content details > summary:focus-visible,
.editor-styles-wrapper .wp-block-details > summary:hover,
.editor-styles-wrapper .wp-block-details > summary:focus-visible {
    background: color-mix(in srgb, var(--vt-color-surface-soft) 82%, var(--vt-color-primary) 18%);
}

.vt-entry__content details > summary:focus-visible,
.editor-styles-wrapper .wp-block-details > summary:focus-visible {
    outline: 2px solid var(--vt-color-primary);
    outline-offset: -2px;
}

.vt-entry__content details > :not(summary),
.editor-styles-wrapper .wp-block-details > :not(summary) {
    margin-inline: 1rem;
}

.vt-entry__content details > :nth-child(2),
.editor-styles-wrapper .wp-block-details > :nth-child(2) {
    margin-block-start: 1rem;
}

.vt-entry__content details > :last-child,
.editor-styles-wrapper .wp-block-details > :last-child {
    margin-block-end: 1rem;
}

/* A closed details element must not expose its body even if another block style
   changes the display property of its children. */
.vt-entry__content details:not([open]) > :not(summary) {
    display: none !important;
}

@media (max-width: 700px) {
    .vt-entry__content details > summary,
    .editor-styles-wrapper .wp-block-details > summary {
        min-height: 3.25rem;
        padding-block: .7rem;
        padding-inline-start: .85rem;
        padding-inline-end: 2.8rem;
        font-size: .92rem;
    }
}
