/* Bootstrap 5.3 doesn't yet have native support for dark tables */

[data-bs-theme="dark"] {
    color-scheme: dark;
}

[data-bs-theme="light"] {
    color-scheme: light;
}

[data-bs-theme="dark"] .table-success {
    --bs-table-color: var(--bs-success-text);
    --bs-table-bg: var(--bs-success-bg-subtle);
    --bs-table-border-color: var(--bs-success-border-subtle);
    --bs-table-striped-color: var(--bs-success-text);
    --bs-table-active-color: var(--bs-success-text);
    --bs-table-hover-color: var(--bs-success-text);
}

[data-bs-theme="dark"] .table-warning {
    --bs-table-color: var(--bs-warning-text);
    --bs-table-bg: var(--bs-warning-bg-subtle);
    --bs-table-border-color: var(--bs-warning-border-subtle);
    --bs-table-striped-color: var(--bs-warning-text);
    --bs-table-active-color: var(--bs-warning-text);
    --bs-table-hover-color: var(--bs-warning-text);
}

summary {
    margin-bottom: 1em;
}

.card .card-body {
    min-width: 0;
}

pre code {
    overflow: auto;
}

.card-group.card-group-vertical {
    flex-flow: column;
}

.card-group.card-group-vertical > .card:not(:first-child) {
    border-radius: var(--bs-card-border-radius);
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}
.card-group.card-group-vertical > .card:not(:last-child) {
    border-radius: var(--bs-card-border-radius);
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
.card-group.card-group-vertical > .card+.card {
    margin-top: 0;
    border-top: 0;
    border-left: var(--bs-card-border-width) solid var(--bs-card-border-color);
}

.card.card-horizontal {
    flex-direction: row;
    --bs-card-spacer-x: 0.5rem;
    --bs-card-spacer-y: 0.5rem;
    --bs-card-cap-padding-x: 0.5rem;
    --bs-card-cap-padding-y: 0.5rem;
}
.card.card-horizontal .card-header {
    border-bottom: 0;
    border-right: var(--bs-card-border-width) solid var(--bs-card-border-color);
}
.card.card-horizontal .card-header:first-child {
    border-radius: var(--bs-card-inner-border-radius) 0 0 var(--bs-card-inner-border-radius);
}
.card.card-horizontal .card-footer {
    border-top: 0;
    border-left: var(--bs-card-border-width) solid var(--bs-card-border-color);
}
.card.card-horizontal .card-footer:last-child {
    border-radius: 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0;
}

details.card-text:last-child:not([open]) > summary {
    margin-bottom: 0;
}
details.card-text:last-child > :last-child {
    margin-bottom: 0;
}