/* Compact administration table actions. Does not affect student or primary page controls. */
.tablewrap tbody td button[data-act],
.tablewrap tbody td a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    min-width: 52px;
    width: auto;
    max-width: 100%;
    margin: 3px;
    padding: 6px 11px;
    border: 1px solid var(--line,#d6e0ed);
    border-radius: 9px;
    background: var(--soft,#edf2f8);
    color: var(--ink,#18344d);
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    transition: background-color .15s ease,border-color .15s ease,box-shadow .15s ease;
}

.tablewrap tbody td .row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 400px;
}

    .tablewrap tbody td .row-actions button[data-act] {
        margin: 0;
        flex: 0 0 auto
    }

.tablewrap tbody td button[data-act]:hover:not(:disabled),
.tablewrap tbody td a.button:hover {
    background: color-mix(in srgb,var(--primary,#28587e) 12%,var(--surface,#fff));
    border-color: var(--primary,#28587e);
    box-shadow: 0 2px 5px #18344d0c;
    transform: none;
}

.tablewrap tbody td button[data-act]:focus-visible,
.tablewrap tbody td a.button:focus-visible {
    outline: 2px solid var(--primary,#28587e);
    outline-offset: 3px
}

.tablewrap tbody td button[data-act*="delete"],
.tablewrap tbody td button[data-act="user-disable"],
.tablewrap tbody td button[data-act="cancel-attempt"] {
    color: #a3353f;
    background: #fff2f3;
    border-color: #efcdd1;
}

    .tablewrap tbody td button[data-act*="delete"]:hover:not(:disabled),
    .tablewrap tbody td button[data-act="user-disable"]:hover:not(:disabled),
    .tablewrap tbody td button[data-act="cancel-attempt"]:hover:not(:disabled) {
        background: #ffe4e7;
        border-color: #c96771
    }

.tablewrap tbody td button[data-act="publish"] {
    color: #fff;
    background: #236b56;
    border-color: #236b56;
}

    .tablewrap tbody td button[data-act="publish"]:hover:not(:disabled) {
        background: #195642;
        border-color: #195642
    }

.tablewrap tbody td button[data-act="close-exam"],
.tablewrap tbody td button[data-act="finish"] {
    color: #86601c;
    background: #fff6e5;
    border-color: #ebd7ac
}

    .tablewrap tbody td button[data-act="close-exam"]:hover:not(:disabled),
    .tablewrap tbody td button[data-act="finish"]:hover:not(:disabled) {
        background: #ffedc7;
        border-color: #c8a465
    }

.tablewrap tbody td button[data-act]:disabled {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none
}

[data-theme="dark"] .tablewrap tbody td button[data-act*="delete"],
[data-theme="dark"] .tablewrap tbody td button[data-act="user-disable"],
[data-theme="dark"] .tablewrap tbody td button[data-act="cancel-attempt"] {
    background: #36252e;
    color: #f0a9b0;
    border-color: #69404b
}

[data-theme="dark"] .tablewrap tbody td button[data-act="close-exam"],
[data-theme="dark"] .tablewrap tbody td button[data-act="finish"] {
    background: #342e22;
    color: #e5c68a;
    border-color: #655637
}

@media(pointer:coarse) {
    .tablewrap tbody td button[data-act], .tablewrap tbody td a.button {
        min-height: 44px;
        padding: 8px 12px
    }
}

@media(prefers-reduced-motion:reduce) {
    .tablewrap tbody td button[data-act], .tablewrap tbody td a.button {
        transition: none
    }
}
