/* Shared compact workflow utilities, including table-row actions in both apps. */
.btn-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Keep native details keyboard/expanded semantics when its launcher is an icon. */
summary.btn-icon {
    list-style: none;
    cursor: pointer;
}

summary.btn-icon::-webkit-details-marker {
    display: none;
}

details[open] > summary.btn-icon {
    margin-bottom: .75rem;
}

.table-action-column {
    width: 1%;
    min-width: max-content;
    text-align: right;
    white-space: nowrap;
}

.table-row-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    white-space: nowrap;
}

.table-row-actions > *,
.table-row-actions > form {
    flex: 0 0 auto;
    margin: 0;
}

/* Counts are data, not button labels; allow them room beside the shared icon. */
.btn-icon.btn-icon-with-count {
    width: auto;
    min-width: 34px;
    padding-inline: .5rem;
    gap: .4rem;
}

.app-action-count {
    font-size: .75em;
    font-variant-numeric: tabular-nums;
}

/* Application utilities belong to the global navbar. Page actions follow module
   navigation in document order; never visually reorder interactive controls. */
.field-index-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--am-page-action-gap);
    margin-inline-start: 0;
    justify-content: flex-start;
}

[data-page-header] > .page-header-title-row {
    grid-template-columns: minmax(0, 1fr);
}

.page-header-page-actions,
.page-header-actions.page-header-page-actions {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0 0;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
}

.page-header-page-actions > .page-header-utility-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    gap: var(--am-page-action-gap, .5rem);
    overflow: visible;
    padding-bottom: 0;
}

/* Custom learning headers use the same lower action row without duplicating
   page-local positioning. The Back partial remains the only button renderer. */
[data-bs-theme] :not(.page-header-page-actions):not(.page-header-utility-actions):has(> .elearning-back-action),
[data-bs-theme] :has(> .page-header-page-actions > .elearning-back-action) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.elearning-back-action {
    justify-self: end;
    align-self: start;
    flex: 0 0 auto;
}

@media print {
    .page-header-page-actions {
        display: none !important;
    }
}
.am-file-input--dragover {
    border-color: rgba(var(--am-color-sky-500-rgb, 59, 130, 246), 0.7);
    box-shadow: 0 0 0 0.18rem rgba(var(--am-color-sky-500-rgb, 59, 130, 246), 0.14);
    background-color: rgba(var(--am-color-sky-500-rgb, 59, 130, 246), 0.04);
}

