.DISView_window {

}

.tq_interaction_dialog > h1 {
    text-align: center;
}

.tq-header {
    background-color: gray;
    color: white;
}

.tq-quantity-stimulus-editor {
   margin-bottom: 15px;
}

.tq-flex-column {
    display: flex;
    flex-direction: column;
}
.tq-flex-row {
    display: flex;
    flex-direction: row;
}
.tq-flex-row-reverse {
    display: flex;
    flex-direction: row-reverse;
}

.tq-full-width {
    width: 100%;
}

.tq-center-span {
    display:flex;
    justify-content: center;
    flex-direction: row;
}

div.DISView_window > div.DISView_body {
    display: flex;
    flex-direction: row;
}
div.tq-panel-close {
    min-width: 1.6em;
    width: 1.6em;
    height: 100%;
}

div.tq-panel-open {
    width: fit-content;
    height: 100%;
}

div.tq-sheild {
    position: absolute;
    z-index: 5;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.2);
    top: 0px;
    left: 0px;
    border: 2px dashed red;
}

div.tq-side-panel div.Tree_window {
    width: max-content;
}

.tq-input-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #555;
}

.tq-input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

    .tq-input-group input:focus {
        border-color: #007bff;
        outline: none;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
    }

.tq-pattern-display {
    display: grid;
    grid-template-columns: 1fr ffr 1fr;
}

.tq-reorderable-list {
    width: fit-content;
}

    .tq-reorderable-list ul {
        list-style: none;
        background-color: #ffffff;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); /* shadow-2xl */
        border-radius: 0.75rem; /* rounded-xl */
        padding: 1.5rem; /* p-6 */
    }


.tq-reorderable-list-item {
    display: flex; /* flex */
    align-items: center; /* items-center */
    justify-content: space-between; /* justify-between */
    padding: 0.75rem; /* p-3 (Tailwind's spacing scale) */
    background-color: #ffffff; /* bg-white */
    border-width: 1px; /* border */
    border-color: #e5e7eb; /* border-gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    transition-property: box-shadow; /* transition */
    transition-duration: 150ms; /* duration-150 */
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); /* ease-in-out */
}

.tq-picked-up {

}

.tq-simulation-row1 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.tq-simulation-template-dialog {
    min-width: 80%;
}

    .tq-simulation-template-dialog .tq-reorderable-list {
        width: 100%;
        padding-right: 2em;
    }

div.tq-gr-canvas {
    position: absolute;
    z-index: 10;
    width: 100%;
    height: 100% ;
    background-color: rgba(255,255,255,0.2);
    top: 0px;
    left: 0px;
    border: 2px dashed red;
}

div.tq-gr-canvas>div {
    background-color: white;
    width: 100%;
    text-align:center;
}

div.tq-dialog-controls {
    display: grid;
    grid-template-columns: auto auto;
}
dialog.tq-condition,
div.tq-condition {
    width: 100%;
    border: 1px solid black;
    border-radius: .5em;
}

    div.tq-condition div.tq-body {
        width: stretch;
        display: grid;
        grid-template-columns: 1fr;
        margin-left: .5em;
        margin-right: 2px;
        margin-bottom: 2px;
    }

    div.tq-condition div.tq-body.tq-logic {
        grid-template-columns: 5em 1fr;
    }
    div.tq-condition select {
        width: 100%;
        height: fit-content;
    }
div.DISView_window > div.DISView_body div.tq-assertion-panel div.tq-condition div.tq-header {
        width: stretch;
        display: flex;
        flex-direction: row;
        justify-content: left;
        margin-left: .5em;
        margin-right: .5em;
        border: none;
    }

div.DISView_window > div.DISView_body div.tq-numeric-buttons > span.tq-control-span select.Select_window,
div .tq-condition div.tq-header select.Select_window {
    width: auto;
    border: none;
    padding: 2px;
}

div.DISView_window > div.DISView_body div.tq-control-span select.Select_window,
div .tq-condition div.tq-header select.Select_window {
    width: auto;
    border: none;
    padding: 2px;
}

div .tq-condition div.tq-header mrow[inert] {
    margin-left: .5em;
    margin-right: 1em;
}

button:disabled {
    color: lightgray;
}
div .tq-side-panel div.tq-sample-panel button.tq-expandable-button.tq-selected,
button.tq-selected {
    color: purple;
    background-color: azure;
}

.tq-widget-spec-generator div.tq-scroll-box {
    height: 16em;
    width: auto;
    border: 1px solid grey;
    margin-bottom: 1.5em;
}

.tq-widget-spec-generator div.tq-scroll-box .tq-reorderable-list {
    width: 100%;
}
button .tq-test-score-mode {
    background-color: aqua; /* Darker blue to signal 'active' */
    /* Box Shadow for a SUNKEN/CONCAVE look */
    box-shadow:
    /* Inset dark shadow (top-left) */
    inset 8px 8px 16px rgba(0, 0, 0, 0.4),
    /* Inset light highlight (bottom-right) */
    inset -8px -8px 16px rgba(255, 255, 255, 0.1);
    color:  black;
}

div.DISView_window > div.DISView_body div.tq-scoring-display {
    position: relative;
    width: 95%;
    height: 80vh;
    border: 2px solid aqua;
    overflow: auto;
    padding-left: 2em;
    padding-right: 2em;
}
    div.DISView_window > div.DISView_body div.tq-scoring-display.tq-assertions-live {
        height: 50vh;
    }

div.DISView_window > div.DISView_body div.tq-assertion-panel {
    height: 30vh;
    display:block;
    width: 100%;
}

    div.DISView_window > div.DISView_body div.tq-assertion-panel div.tq-header {
        border: 1px solid black;
        border-radius: .5em;
        width: 100%;
        background: white;
        color: black;
        height: fit-content;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
        div.DISView_window > div.DISView_body div.tq-assertion-panel div.tq-header button {
            background-color: white;
            width: 1.5em;
            height: 1.5em;
            padding: 2px 2px 2px 2px;
        }
        div.DISView_window > div.DISView_body div.tq-assertion-panel div.tq-header textarea {
            width: 25em;
            height: 2em;
            resize: both;
            margin-left: .5em;
            margin-right: .5em;
        }

    div.DISView_window > div.DISView_body div.tq-assertion-panel div.tq-body {
    }



div.DISView_window > div.DISView_body div.tq-scoring-display div.tq-shield {
    height: 100%;
}


div.DISView_window > div.DISView_body div.tq-numeric-buttons{
    background-color: aqua;
    position: relative;
    width: 95%
}

    div.DISView_window > div.DISView_body div.tq-numeric-buttons > span.tq-control-span {
        z-index: 10;
        position: fixed;
        background-color: aqua;
    }

    div.DISView_window > div.DISView_body div.tq-numeric-buttons > span.tq-control-span > button.Button_window {
        background-color: steelblue;
        color: white;
        height: 1.4em;
        padding: .1em 1em;
        height: 100%;
        margin-left: 1em;
        margin-top: .1em;
        margin-bottom: .1em;
    }
    div.DISView_window > div.DISView_body div.tq-numeric-buttons > button:disabled {
        background-color: grey;
    }

    div.DISView_window > div.DISView_body div.tq-numeric-buttons > span.tq-existing-score-span >button.Button_window {
        background-color: transparent;
        border: 2px outset black;
        margin: .1em .1em .1em .1em;
        padding: .1em;
        color: black;
    }
 
div .tq-side-panel div.tq-output-display {
    white-space:nowrap;
    min-height: 2em;
    text-align: center;
    border: 2px solid black;
    display:block;
    overflow-x: auto;
}

div .tq-side-panel div.tq-sample-panel {
    //overflow: auto;
    position: relative;
}
    div .tq-side-panel div.tq-sample-panel button.tq-expandable-button {
    background-color: black;
    color: white;
    width: 100%;
    vertical-align: middle;
    background-image: none;
    height: auto;
}
    div .tq-side-panel div.tq-sample-panel button.tq-expandable-button:disabled {
        color: gray;
    }
    div .tq-side-panel div.tq-sample-panel button.tq-expandable-button:hover {
        background-color: steelblue;
    }

div.tq-sample-panel span.AccBlock_title {
    display: grid;
    grid-template-columns: 2em 1fr;
    text-align: left;
    border-radius: .5em;
    border-bottom: solid 1px white;
}

div .tq-side-panel div.tq-sample-panel.tq-sample-panel-overlay {
    z-index: 20;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 100%;
    background-color: steelblue;
    position: absolute;
}

dialog.tq-dialog.tq-pattern-dialog div.tq-dialog-controls {
    display: block;
}

.tq-dialog.tq-pattern-dialog .tq-dialog-controls ul.CheckboxGroup_window {
    padding-left: 0px;
    display: flex;
}

div.tq-sample-panel > div.tq-control-span {
    width: 100%;
    padding-left: 0px;
    border-radius: 0.75rem;
    border-top: 1px solid grey;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    justify-content: space-evenly;
    display: flex;
    overflow: auto;
}

div.tq-property-widget-title {
    display: flex;
    justify-content: space-between;
    background-color: #314F52;
    color: white;
}

div.tq-property-body {
    position:relative;
}

    .tq-pattern-dislay,
    div.tq-property-body button.tq-constraint-display {
        display: inline-flex;
        justify-content: space-evenly;
        width: 100%;
        padding-left: 0px;
        border-radius: 0.75rem;
        border-top: 1px solid grey;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    div.tq-property-body > div.RadioGroup_div0 > ul.RadioGroup_window {
        display: inline-flex;
        justify-content: space-between;
        width: 100%;
        padding-left: 0px;
        border-radius: 0.75rem;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    div.tq-property-body math.p-qti-editbox {
        min-width: 100%;
    }

div.tq-property-body button:disabled {
    background-color: lightgray;
}
div.tq-property-body input {
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: unset;
}

div.tq-property-widget .tq-disable-sheild {
    background-color: rgba(125, 125, 125, 0.5);
    position: absolute;
    z-index: 5;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
}


div.tq-property-body input.TextInput_window {
    height: 1.5em;
}

.tq-number-property-editor {
    display: inline-flex;
}

.tq-highlight {
    background-color: yellow;
}

.tq-dialog-widgets div.tq-reorderable-list ul {
    max-height: 9em;
    overflow: auto
}


figure {
    display: inline-block;
    margin-top: 0px;
}

div.p-qti-selected {
    outline: 3px solid red;
}

.tq_resizable.p-qti-columns {
    border: 1px dashed darkgrey;
    border-right: 1px dashed darkgrey;
    min-height: 2em;
    width: 100%;
    display: grid;

}

button.tq-draggable-indicator {
    background-image: url(/Images/menu.svg);
    background-repeat: no-repeat;
    background-size: contain;
    border: none;
    height: 1.5em;
    width: 1.5em;
    margin-right: 1rem; /* mr-4 */
    color: #9ca3af; /* text-gray-400 */
    padding: 0.25rem; /* p-1 */
    border-radius: 0.125rem; /* rounded-sm */
    transition: color 150ms ease-in-out, box-shadow 150ms ease-in-out;
    outline: none; /* focus:outline-none */
}
    button.tq-draggable-indicator:hover {
        cursor: grab;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* hover:shadow-md */
    }

button.tq_edit {
    background-image: url('/images/edit.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1em;
    width: 1em;
    margin: .1em .1em.1em.1em;
}

/* WCAG 2.1 SC 2.5.5 requires minimum 44x44px touch targets */
dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button,
.DIView_window div.ql-toolbar.ql-snow button {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
}

dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-qti-interaction,
.DIView_window div.ql-toolbar.ql-snow button.ql-qti-interaction {
    background-image: url('/images/interaction-button.svg');
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: center;
}

dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-qti-markup,
.DIView_window div.ql-toolbar.ql-snow button.ql-qti-markup {
    background-image: url('/images/markup-button.svg');
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: center;
}

dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-suppress-tts,
.DIView_window div.ql-toolbar.ql-snow button.ql-suppress-tts {
    background-image: url('/images/suppress-tts.svg');
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: center;
}

dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-columns,
.DIView_window div.ql-toolbar.ql-snow button.ql-columns {
    background-image: url('/images/columns.svg');
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: center;
}

dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-restore-interaction,
.DIView_window div.ql-toolbar.ql-snow button.ql-restore-interaction {
    background-image: url('/images/restore-trash.svg');
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: center;
}

/* QtiMarkup content styling - blue text and blue borders */
tq-markup {
    color: #1565c0;
}

tq-markup img,
tq-markup figure,
tq-markup iframe {
    border: 2px solid #1565c0;
}

/* SuppressTTS content styling - red underline */
tq-suppress-tts {
    text-decoration: underline;
    text-decoration-color: #c62828;
    text-decoration-thickness: 2px;
}


dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-float,
.DIView_window  div.ql-toolbar.ql-snow button.ql-float {
    background-image: url('/images/floatNone.png');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1em;
    width: 1em;
    margin: .1em .1em.1em.1em;
}
    dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-float[value=left],
    .DIView_window div.ql-toolbar.ql-snow button.ql-float[value=left] {
        background-image: url('/images/floatLeft.png');
        background-repeat: no-repeat;
        background-size: contain;
        height: 1em;
        width: 1em;
        margin: .1em .1em.1em.1em;
    }

    .dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-float[value=right],
    .DIView_window  div.ql-toolbar.ql-snow button.ql-float[value=right] {
        background-image: url('/images/floatRight.png');
        background-repeat: no-repeat;
        background-size: contain;
        height: 1em;
        width: 1em;
        margin: .1em .1em.1em.1em;
    }


span.tq_resizable.tq-stand-in[data-tq-type="figure"] {
    display: inline-block;
    text-align: center;
    margin: 1em 1em 1em 1em;
}
div.tq-stand-in[data-tq-type="p"] {
    display: block;
}

div.tq-stand-in.ql-align-center[data-tq-type="p"] {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: center;
}
div.tq-stand-in.ql-align-right[data-tq-type="p"] {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: end;
}
div.tq-stand-in.ql-align-center[data-tq-type="p"] {
    display: flex;
    width: 100%;
    flex-direction: row;
    align-content: center;
}

div.tq-stand-in[data-tq-type="p"]:has(br:first-child) {
    display: block;
}

span.TreeNode_normal.tq_highlight {
    border:groove;
    background-color: aqua;
}

div.tq-gap-images-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em;
    margin-top: 1em;
    border: 2px dashed #ccc;
    border-radius: 4px;
    background: #f9f9f9;
    min-height: 60px;
}

div.tq-gap-image {
    width: 50px;
    height: auto;
    resize: both;
    display: block;
    overflow: hidden;
    position: relative;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    /* aspect-ratio will be set dynamically via JavaScript */
}

    div.tq-gap-image:hover {
        border-color: #0066cc;
        transform: scale(1.05);
    }

    div.tq-gap-image.p-qti-selected {
        border-color: #0066cc;
        box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
    }

div.tq-gap-image > img {
    width: 100%;
    height: auto;
}

    div.tq-gap-image > button {
        position: absolute;
        top: 0px;
        left: 0px;
        z-index: 10;
    }

button.tq-tool-button {
    width: 36px;
    height: 36px;
    border: 3px groove lightgrey;
    padding: 0px 0px 0px 0px;
}

.tq-missing-required {
    background-color: red;
    border: 2px solid red;
}

.tq_button_span {
    display: inline-flex;
    align-content: end;
    margin-left: 1.5em;
    float: right;
}

.tq_properties {
    background-image: url('/images/settings.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}
.tq_delete {
    background-image: url('/images/trash-2.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}

div.DISView_window > div.DISView_body div.tq-numeric-buttons > button.Button_window.tq_add,
.tq_add {
    background-image: url('/images/plus-square.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
    background-color: transparent;
    padding: 0px 0px 0px 0px;
}

.tq_add {
    background-image: url('/images/plus-square.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
    background-color: revert;
}
.tq_subtract {
    background-image: url('/images/minus-square.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}

.tq_external_link {
    background-image: url('/Images/external-link.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
    border: none;
}
.tq_remove_external_link {
    background-image: url('/Images/trash-2.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
    border: none;
}

.tq_start_point {
    background-image: url('/Images/startPoint.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
    border: none;
}
.tq_intersects {
    background-image: url('/Images/intersects.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
    border: none;
}
.tq_points_towards {
    background-image: url('/Images/pointsTowards.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
    border: none;
}

.tq_save {
    background-image: url('/Images/save.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
    border: none;
}


.tq_close {
    background-image: url('/Images/close.png');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}
.tq_circle-arrow-left {
    background-image: url('/Images/arrow-left-circle.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}
.tq_circle-arrow-right {
    background-image: url('/Images/arrow-right-circle.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}

.tq_layout {
    background-image: url('/images/layout.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}
.tq_image {
    background-image: url('/images/image.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}



.tq_hotspot {
    background-image: url('/images/crosshair.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1.5em;
    width: 1.5em;
    margin: .1em .1em.1em.1em;
}

.tq-big-btn {
    display: block;
    width: 100%;
}

.tq-big-add-btn {
    display: block;
    background-image: url('/images/plus-square.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-color:lightgray;
    width:100%;
    height: 1.5em;
}

.tq-expandable-button {
    display: block;
    background-image: url('/images/plus-square.svg');
    background-repeat: no-repeat;
    background-size: 1.25em;
    background-position: right;
    background-color: white;
    width: 100%;
    height: 1.5em;
}

.tq-assertion-selector {
    display: block;
    width: max-content;
    background-color: lightgray;
}
.tq-assertion-selector div.tq-title {
    font-weight: bold;
    text-align: center;
}

.tq-assertion-selector div.tq-body {
    display: block;
}
.tq-assertion-selector div.tq-body > span{
    display: block;
} 
.tq-assertion-selector div.tq-body input.tq-map {
    width: 5em;
}

span.tq-yes-no-out {
    display: inline-flex;
}

    span.tq-yes-no-out input[type=radio] {
        position: fixed;
        opacity: 0;
        pointer-events: none;
    }

    span.tq-yes-no-out img {
        margin-left: 2px;
        margin-right: 2px;
    }

    span.tq-yes-no-out input[type=radio]:checked + img {
        background-color: white;
    }
    span.tq-yes-no-out input[type=radio]:focus + img {
        border: solid black 2px;
    }


div.tq-calc {
    margin-top: 1em;
}

div.tq-calc button.Button_window {
    width: 100%;
}

.tq_dialog {
    display: flex;
    flex-direction: column;
}
.tq-entity-dialog {
    display: grid;
    background-color: lightgray;
    border: 4px outset;
    border-radius: 5%;
    width: max-content;
}

.tq-side-panel {
    padding-right: 1em;
    max-width: 30%;
}

div.tq-side-panel div.tq-calc {
    overflow-y: auto;
    position: relative;
}

div.tq-side-panel div.tq-calc div.tq-calc-shield {
    z-index: 200;
    top: 0;
    left: 0;
    position: absolute;
    background-color: lightgray;
}

.tq-entity-dialog > div.tq-controls {
    justify-content: space-around;
}
.tq-side-panel > button.Button_window {
    background-color: aqua;
    width: 100%;
}

.tq-controls {
    display: inline-flex;
    flex-direction: row;
}

 div.tq-side-panel div.tq-calc div.tq-controls {
     display: block;
     overflow-y: auto;
     overflow-x: overlay;
 }
 

.tq_interaction_button {
    top: 0px;
    float: right;
    background-image: url('/images/edit.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1em;
    width: 1em;
    margin: .1em .1em .1em .1em;
    position: relative;
    border: none;
    z-index: 50;
}
.tq_reload_button {
    top: 0px;
    float: right;
    background-image: url('/images/refresh-cw.svg');
    background-repeat: no-repeat;
    background-size: contain;
    height: 1em;
    width: 1em;
    margin: .1em .1em.1em.1em;
    position: relative;
    border: none;
    z-index: 50;
}
.property-widget {
    padding-left: 2em;
}

dialog.tq-dialog {
    z-index: 50;
    position: fixed;
    align-self: anchor-center;
}

.tq-entity-dialog > caption {
    font-size:larger;
    font-weight: bold;
    align-self:center;
}

.tq-dialog-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Checkbox grid for row selection - vertical stacking */
.tq-checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tq-checkbox-grid-scrollable {
    max-height: 96px; /* Approximately 4 rows at ~24px each */
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #ccc;
    padding: 4px;
    border-radius: 3px;
    background-color: #fff;
}

.tq-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    cursor: pointer;
}

.tq-checkbox-wrapper:hover {
    background-color: #f0f0f0;
    border-radius: 2px;
}

.tq-row-checkbox {
    cursor: pointer;
    margin: 0;
}

.tq-checkbox-label {
    cursor: pointer;
    margin: 0;
    user-select: none;
}

dialog.tq-assertion-dialog[open] {
    display: flex;
    flex-direction: column;
    width: 75%;
}

dialog.tq-assertion-dialog div.tq-assertion-definition div.tq-condition-holder {
    padding-bottom: 1em;
}

dialog.tq-assertion-dialog div.tq-assertion-definition {
    display: grid;
    grid-template-columns: 5em 1fr;
    padding-top: 1em;
}

.node_container_widgets {
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.tq_interaction_dialog div.tq-p-qti-tool-editor.node_container {
    display: flex;
    flex-direction: row;
    height: fit-content;
    overflow: revert;
}

.tq_interaction_dialog {
    width: 80%;
    margin-left: 10%;
    margin-right: 10%;
    display: flex;
    flex-direction: column;
}
    .tq_interaction_dialog div.node_container  {
        border: 2px solid black;
        margin:1em 1em 1em 1em;
        display: flex;
        flex: 1;
        flex-direction:column;
        overflow: auto;
    }
        .tq_interaction_dialog div.node_container > div:first-child {
            border: 2px solid black;
            background-color: black;
            color: white;
            font-weight: bold;
        }
        .tq_interaction_dialog div.node_container > div:first-child > label {
            width: 90%;
            display: inline-block;
            text-align: center;
            font-weight: bold;
        }
        .tq_interaction_dialog div.node_container > div:first-child > label:nth-child(2) {
            float:right;
            top: 0px;
        }

.tq-dialog-title {
    display: inline-flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    font-weight:bold;
    flex-shrink: 0; /* Prevent dialog title from shrinking */
}

.tq-dialog-title button,
.tq-dialog-title select,
.tq-dialog-title input {
    height: 1.5em;
    padding-top: 1px;
    padding-bottom: 1px;
    margin-left: .5em;
    margin-right: .5em;
}

.tq-drop-target {
    background-color: white;
    /* Basic button styling (adjust as needed) */
    padding: 1rem 2rem;
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: #ffffff; /* text-white */
    border-radius: 0.5rem; /* rounded-lg */
    transition: all 0.2s ease-in-out;
    cursor: pointer; /* Default cursor */
    /* --- Styles to invite dropping --- */
    border: 3px dashed #a5b4fc; /* indigo-200 - a dashed border suggests a drop zone */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    /* Visual feedback when something is dragged over it */
    /* This class would be added via JavaScript on 'dragenter' or 'dragover' */
}

.tq-drop-target-drag-over{
    background-color: #6366f1; /* indigo-500 */
    border-color: #818cf8; /* indigo-300 */
    transform: scale(1.02); /* Slight scale to emphasize */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    cursor: copy; /* Or 'grab', 'grabbing', 'move' depending on desired effect */
}



.tq_select_holder {
    display: inline-flex;
    flex-direction: row;
    justify-content: space-between;
}

.RIV_window .tq_resizable {
    resize: none;
}

iframe.tq_resizable,
qti-span.tq_resizable {
    resize: both;
    overflow: auto;
    height: fit-content;
    width: fit-content;
    display: inline-block;
}
    .tq_resizable > img {
        width: 100%;
        height: calc(100%-2em);
    }
    .tq_resizable > caption {
        width: 100%;
        min-height: 1.1em;
        display: block;
    }

.tq_interaction_iframe {
    border: none;
    width: fit-content;
    height: fit-content;
    display: inline;
}

div.tq-graphic-canvas-editor > div.tq-svg-holder {
    resize: both;
    display: inline-block;
    overflow: hidden;
}
    div.tq-graphic-canvas-editor > div.tq-svg-holder > svg {
        width: 100%;
        height: 100%;
        background-color: aliceblue;
    }
    div.tq-graphic-canvas-editor > div.tq-svg-holder > svg > image {
        width: 100%;
        height: auto;
        box-sizing:border-box;
    }

        div.tq-graphic-canvas-editor > div.tq-svg-holder > svg > image.tq-btn-image {
            width: 15px;
            height: 15px;
        }

div.p-qti-quantity-stimulus {
    display: grid;
    justify-content: center;
    width: fit-content;
    height: fit-content;
    align-self:center;
}

div.tq-response-number {
    background-color: lightgray;
    font-weight: bold;
    border: outset;
    text-align: center;
    height: fit-content;
    min-height: 1.8em;
    min-width: 1.8em;
}

div.tq-attributes {
    justify-content: space-between;
    border: 2px outset grey;
    align-items: baseline;
    background-color: lightgray;
}
div.tq-attributes label {
    font-weight: bold;
    margin-right: 1em;

}

div.tq-attributes  div.attribute-widget{
    display: inline;
    height: min-content;
}
span.tq-element-editor {
    padding: .1em .1em .1em .1em;
}

span.tq-element-editor:focus {
    border:none;
}

span.tq-element-editor-cursor {
    display: inline-block;
    width: 1px;
    height: 1.2em;
    padding-left: 1px;
    padding-right: 1px;
    background-color: black;
    animation: blink 1s linear alternate
}

@keyframes blink {
    50% {
        opacity: 0%;
    }
    100% {
        opacity: 100%;
    }

}


/*span.tq-receive-unknown {
    display:inline-block;
    height: 1em;
    width: .8em;
    background-color: yellow;
}
*/
span.tq-function {
    margin-left: .5em;
}

span.tq-close-paren {
    margin-right: .5em;
}
span.tq-function::after,
span.tq-operator::after {
    content: attr(data-value);
}

input[type="number"].tq-parameter-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"].tq-parameter-value {
    -moz-appearance: textfield;
    field-sizing: content;
}

span.tq-value-reference {
    border: 2px dashed red;
}

div.tq-calculator-result {
    border: none;
    height: 1.5em;
    width: 100%;
    text-align: center;
    font-weight: bold;
}

div.tq-calulation-receiver {
    border: none;
    width: 100%;
    position: relative;
}

/* Dialog message area above submit/cancel buttons */
.tq-dialog-message {
    min-height: 1.5em;
    padding: 0.75em;
    margin-bottom: 1em;
    border-radius: 0.25em;
    flex-shrink: 0; /* Prevent message area from shrinking */
}

.tq-error-message {
    color: #dc2626; /* red-600 */
    background-color: #fee2e2; /* red-100 */
    border: 1px solid #fca5a5; /* red-300 */
}

.tq-info-message {
    color: #2563eb; /* blue-600 */
    background-color: #dbeafe; /* blue-100 */
    border: 1px solid #93c5fd; /* blue-300 */
}

/* Validation error border for list items */
.tq-validation-error {
    border: 2px dashed red !important;
}

/* Validation message area in OutputInstructionGetter */
.tq-validation-message {
    min-height: 1.5em;
    color: #dc2626; /* red-600 */
    padding: 0.5em;
    margin-bottom: 0.5em;
}

/* Checkbox list for container value widgets */
.tq-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.tq-checkbox-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
}

    .tq-checkbox-option input[type="checkbox"] {
        cursor: pointer;
        margin: 0;
    }

    .tq-checkbox-option span {
        display: inline;
        vertical-align: middle;
    }

/* ========== Simulation Template Dialog ========== */
.tq-simulation-template-dialog {
    max-height: 85vh; /* Limit dialog to 85% of viewport height */
    max-width: 95vw; /* Limit dialog to 95% of viewport width */
    height: 85vh; /* Fixed height to ensure proper calculation */
    overflow: hidden; /* Prevent dialog from scrolling */
    padding: 0; /* Remove default padding */
}

/* ========== Simulation Template Content ========== */
.tq-simulation-template-content {
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill the dialog */
    overflow: hidden; /* Prevent dialog content from scrolling */
}

/* ========== Simulation Template Scrollable Content ========== */
.tq-simulation-scrollable-content {
    flex: 1; /* Take remaining space */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    min-height: 0; /* Allow flex child to shrink below content size */
    padding: 0 1rem 1rem 1rem; /* Add padding for content spacing */
}

/* ========== Tab View Styles ========== */
.tq-tab-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0; /* Allow flex child to shrink below content size */
}

.tq-tab-buttons {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #ccc;
    padding: 0;
    margin-bottom: 16px;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

.tq-tab-button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-bottom: none;
    background: #f5f5f5;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
    transition: background 0.2s;
}

.tq-tab-button:hover {
    background: #e8e8e8;
}

.tq-tab-button-active {
    background: white;
    border-bottom: 2px solid white;
    margin-bottom: -2px;
    font-weight: bold;
}

.tq-tab-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Allow flex child to shrink below content size */
}

.tq-tab-panel {
    height: 100%;
}

/* ========== Two-Column Layout ========== */
.tq-simulation-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    flex: 1; /* Take up remaining space in flex container */
    min-height: 0; /* Allow flex child to shrink below content size */
    padding: 16px;
    overflow: hidden; /* Prevent container from scrolling */
}

.tq-simulation-left-column {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ccc;
    padding-right: 16px;
    overflow: hidden; /* Prevent column itself from scrolling */
    min-height: 0; /* Allow grid child to shrink below content size */
    height: 100%; /* Ensure column takes full height of grid cell */
}

.tq-simulation-right-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto; /* Allow right column to scroll */
    min-height: 0; /* Allow grid child to shrink below content size */
    height: 100%; /* Ensure column takes full height of grid cell */
    padding-right: 8px; /* Add padding for scrollbar */
}

/* ========== Title Bar ========== */
.tq-simulation-title-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding: 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #ccc;
    flex-shrink: 0; /* Prevent title bar from shrinking */
}

.tq-simulation-title-bar-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tq-simulation-title-bar-group label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.tq-simulation-title-bar-group input,
.tq-simulation-title-bar-group button {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

.tq-simulation-title-bar-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.tq-simulation-title-bar-group button {
    background: #007bff;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.tq-simulation-title-bar-group button:hover {
    background: #0056b3;
}

/* ========== Preview Sections ========== */
.tq-preview-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px;
    background: white;
}

.tq-preview-section h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* Preview table styling */
.tq-simulation-output-table {
    border-collapse: collapse;
    width: 100%;
}

.tq-simulation-output-table th,
.tq-simulation-output-table td {
    border: 1px dashed #ccc;
    padding: 8px;
    text-align: center;
}

.tq-simulation-output-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.tq-simulation-output-table td {
    color: #999;
    font-style: italic;
}

/* Scene list styling */
.tq-scene-item {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
    background-color: #fafafa;
}

.tq-scene-item:last-child {
    margin-bottom: 0;
}

.tq-scene-item-top-row {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.tq-scene-name-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tq-scene-name-group label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.tq-scene-name-group input {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.tq-scene-duration-group {
    width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tq-scene-duration-group label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.tq-scene-duration-group input {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.tq-scene-description-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.tq-scene-description-row label {
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.tq-scene-description-row textarea {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.tq-delete-scene-button {
    padding: 6px 12px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    align-self: flex-start;
}

.tq-delete-scene-button:hover {
    background-color: #c82333;
}

.tq-add-scene-button {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 12px;
}

.tq-add-scene-button:hover {
    background-color: #0056b3;
}

/* Dialog header buttons */
.tq-dialog-header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tq-submit-button {
    padding: 8px 16px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.tq-submit-button:hover {
    background-color: #218838;
}

.tq-submit-button:focus {
    background-color: #28a745;
    outline: 2px solid #1e7e34;
    outline-offset: 2px;
}

/* Entity description area (always visible space) */
.tq-entity-description-area {
    min-height: 24px;
    padding: 6px 8px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* Clickable mapping style (for identifier containers) */
.tq-clickable-mapping {
    background-color: #f0f8ff;
    border: 1px solid #4a9eff;
    cursor: pointer;
}

.tq-clickable-mapping:hover {
    background-color: #e6f2ff;
    border-color: #3d8eff;
}

.tq-entity-description-text {
    font-size: 0.9em;
    color: #333;
}

.tq-clickable-mapping .tq-entity-description-text {
    color: #0066cc;
    font-weight: 500;
}

/* Mapping dialog */
.tq-mapping-dialog {
    min-width: 400px;
    max-width: 600px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tq-mapping-dialog h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #333;
}

.tq-mapping-dialog .tq-instructions {
    margin: 0 0 15px 0;
    font-size: 0.9em;
    color: #666;
}

.tq-mapping-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.tq-mapping-table th,
.tq-mapping-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.tq-mapping-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    font-size: 0.9em;
}

.tq-mapping-label {
    cursor: help;
    font-size: 0.9em;
}

.tq-mapping-value-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}

.tq-mapping-value-input.error {
    border-color: #d32f2f;
    background-color: #ffebee;
}

.tq-no-values-message {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.tq-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tq-button-primary,
.tq-button-secondary {
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.tq-button-primary {
    background-color: #4a9eff;
    color: white;
    border-color: #4a9eff;
}

.tq-button-primary:hover {
    background-color: #3d8eff;
}

.tq-button-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.tq-button-secondary:hover {
    background-color: #e0e0e0;
}

/* Quill editor containers for widget and outcome labels */
div.tq-widget-label-editor-container,
div.tq-outcome-label-editor {
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    margin-bottom: 8px;
}

    /* Target the actual Quill container div (has both tq-widget-label-editor and ql-container classes) */
    div.tq-widget-label-editor.ql-container,
    div.tq-outcome-label-editor.ql-container {
        max-height: 15em;
        overflow-y: auto;
        height: auto;
    }

        /* Make Quill editor content area grow with content */
        div.tq-widget-label-editor.ql-container .ql-editor,
        div.tq-outcome-label-editor.ql-container .ql-editor {
            min-height: 3em;
            height: auto;
        }

    /* Ensure resizable images work inside label editors */

    div.tq-widget-label-editor iframe.tq_resizable,
    div.tq-widget-label-editor qti-span.tq_resizable,
    div.tq-outcome-label-editor qti-span.tq_resizable {
        resize: both !important;
        overflow: auto !important;
        display: inline-block
    }

/* Option label editor in LabelValuePairGetter dialog */
div.tq-option-label-editor-container {
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    margin-bottom: 8px;
}

div.tq-option-label-editor.ql-container {
    max-height: 15em;
    overflow-y: auto;
    height: auto;
}

div.tq-option-label-editor.ql-container .ql-editor {
    min-height: 3em;
    height: auto;
}

/* Ensure resizable images work inside option label editors */
div.tq-option-label-editor .tq_resizable {
    resize: both !important;
    overflow: auto !important;
    display: inline-block;
}

/* Simulation Prompt Section (Template Editor) */
.tq-simulation-prompt-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tq-simulation-prompt-section .node-widget {
    margin: 0;
}

/* ========== ResizableImage (Embed-based) ========== */

/* Main embed wrapper - must be inline for text flow */
span.tq-image-embed {
    display: inline;
}

/* The contentNode wrapper created by Quill's Embed */
span.tq-image-embed > span[contenteditable="false"] {
    display: inline-block;
    vertical-align: top;
}

/* The figure inside the embed */
span.tq-image-embed figure.tq-image {
    display: inline-block;
    margin: 0.5em;
    padding: 0;
    text-align: center;
    /* Resizable */
    resize: both;
    overflow: hidden;
    /* Minimum size to allow resize handle */
    min-width: 50px;
    min-height: 50px;
}

/* The image inside the figure */
span.tq-image-embed figure.tq-image > img {
    display: block;
    width: 100%;
    height: auto;
    /* Maintain aspect ratio when figure is resized */
    object-fit: contain;
}

/* Selection indicator when image embed is selected */
span.tq-image-embed.p-qti-selected > span[contenteditable="false"],
span.tq-image-embed:focus-within figure.tq-image {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Hover state for better UX */
span.tq-image-embed figure.tq-image:hover {
    outline: 2px dashed #ccc;
    outline-offset: 1px;
    cursor: pointer;
}

/* Float support */
span.tq-image-embed[style*="float: left"] {
    margin-right: 1em;
}

span.tq-image-embed[style*="float: right"] {
    margin-left: 1em;
}

/* Inside label editors - ensure resizable works */
div.tq-widget-label-editor span.tq-image-embed figure.tq-image,
div.tq-outcome-label-editor span.tq-image-embed figure.tq-image,
div.tq-option-label-editor span.tq-image-embed figure.tq-image {
    resize: both !important;
    overflow: auto !important;
}

/* ===============================================
   Markup Editor Styles
   =============================================== */

/* Main view layout */
.MEView_window {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.MEView_body {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
}

/* Toolbar */
.me-toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.5em;
    gap: 0.5em;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.me-toolbar button {
    display: flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.4em 0.8em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    font-size: 0.9em;
}

.me-toolbar button:hover:not(:disabled) {
    background-color: #e8e8e8;
}

.me-toolbar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.me-toolbar button.me-btn-markup {
    border-color: #1565c0;
    background-image: url('/images/markup-button.svg');
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0;
    color: transparent;
}

.me-toolbar button.me-btn-markup:hover:not(:disabled) {
    background-color: rgba(21, 101, 192, 0.1);
}

.me-toolbar button.me-btn-suppress-tts {
    border-color: #c62828;
    background-image: url('/images/suppress-tts.svg');
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0;
    color: transparent;
}

.me-toolbar button.me-btn-suppress-tts:hover:not(:disabled) {
    background-color: rgba(198, 40, 40, 0.1);
}

.me-toolbar button.me-btn-screen-reader {
    border-color: #c62828;
    background-image: url('/images/screen-reader-text.svg');
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0;
    color: transparent;
}

.me-toolbar button.me-btn-screen-reader:hover:not(:disabled) {
    background-color: rgba(198, 40, 40, 0.1);
}

.me-toolbar button.me-btn-remove {
    border-color: #666;
    background-image: url('/images/trash.svg');
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 0;
    color: transparent;
}

.me-toolbar button.me-btn-remove:hover:not(:disabled) {
    background-color: rgba(102, 102, 102, 0.1);
}

.me-toolbar-spacer {
    flex: 1;
}

.me-toolbar button.me-btn-save {
    background-color: #2e7d32;
    color: white;
    border-color: #2e7d32;
}

.me-toolbar button.me-btn-save:hover:not(:disabled) {
    background-color: #1b5e20;
}

.me-toolbar button.me-btn-cancel {
    background-color: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.me-toolbar button.me-btn-cancel:hover:not(:disabled) {
    background-color: #b71c1c;
}

/* Display area */
.me-display-area {
    flex: 1;
    overflow: auto;
    padding: 1em 2em;
    position: relative;
}

/* Disabled interactions - visible but not clickable */
.me-interaction-disabled {
    pointer-events: none;
    position: relative;
}

.me-interaction-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(200, 200, 200, 0.1);
    pointer-events: none;
}

/* Markup tag styling - catalog-idref */
.me-markup-tag,
span[data-catalog-idref]:not([aria-hidden]) {
    color: #1565c0;
    background-color: rgba(21, 101, 192, 0.1);
    border: 1px dashed #1565c0;
    border-radius: 2px;
    padding: 0 2px;
    cursor: pointer;
    display: inline;
}

.me-markup-tag:hover,
span[data-catalog-idref]:not([aria-hidden]):hover {
    background-color: rgba(21, 101, 192, 0.2);
}

/* Suppress TTS tag styling */
.me-suppress-tts-tag,
span[data-qti-suppress-tts] {
    text-decoration: underline wavy #c62828;
    background-color: rgba(198, 40, 40, 0.1);
    border-radius: 2px;
    padding: 0 2px;
    cursor: pointer;
    display: inline;
}

.me-suppress-tts-tag:hover,
span[data-qti-suppress-tts]:hover {
    background-color: rgba(198, 40, 40, 0.2);
}

/* Screen reader only tag styling */
.me-screen-reader-tag,
span[data-catalog-idref][aria-hidden] {
    color: #1565c0;
    background-color: rgba(21, 101, 192, 0.08);
    border: 1px dashed #c62828;
    border-radius: 2px;
    padding: 0 2px;
    cursor: pointer;
    display: inline;
    font-style: italic;
}

.me-screen-reader-tag:hover,
span[data-catalog-idref][aria-hidden]:hover {
    background-color: rgba(21, 101, 192, 0.2);
}

/* Selected tag for removal */
.me-tag-selected {
    outline: 2px solid #000;
    outline-offset: 1px;
}

/* Selection indicator when text is selected */
.me-has-selection .me-toolbar button.me-btn-markup,
.me-has-selection .me-toolbar button.me-btn-suppress-tts,
.me-has-selection .me-toolbar button.me-btn-screen-reader {
    animation: me-pulse 1s ease-in-out infinite;
}

@keyframes me-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Status message */
.me-status {
    padding: 0.3em 0.5em;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

/* Interaction overlay for selection */
.me-interaction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    z-index: 1;
}

/* Expanded inline choice in markup editor */
.me-inline-choice-expanded {
    display: inline-block;
    border: 1px solid #90a4ae;
    border-radius: 4px;
    padding: 4px 8px;
    background-color: #fafafa;
    margin: 2px 0;
}

.me-inline-choice-header {
    font-size: 0.75em;
    color: #607d8b;
    margin-bottom: 2px;
    user-select: none;
}

.me-inline-choice-option {
    padding: 2px 4px;
    border-bottom: 1px dotted #cfd8dc;
    user-select: text;
    cursor: text;
}

.me-inline-choice-option:last-child {
    border-bottom: none;
}

/* Interaction label in markup editor */
.me-interaction-label {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75em;
    padding: 0.2em 0.5em;
    border-radius: 0 0 0 4px;
    z-index: 2;
}

/* ==========================================================================
   Markup Creation System (mc- prefix)
   ========================================================================== */

/* Main layout */
.MCView_window {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mc-header {
    display: flex;
    align-items: baseline;
    gap: 1em;
    padding: 0.5em 1em;
    border-bottom: 1px solid #ddd;
}

.mc-header h1 {
    margin: 0;
    font-size: 1.3em;
}

.mc-item-info {
    font-size: 0.9em;
    color: #666;
}

/* Toolbar */
.mc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5em;
    gap: 0.5em;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

/* Buttons */
.mc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.4em 0.8em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    font-size: 0.9em;
}

.mc-btn:hover:not(:disabled) {
    background-color: #e8e8e8;
}

.mc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mc-btn-primary {
    background-color: #1565c0;
    color: white;
    border-color: #1565c0;
}

.mc-btn-primary:hover:not(:disabled) {
    background-color: #0d47a1;
}

.mc-btn-success {
    background-color: #2e7d32;
    color: white;
    border-color: #2e7d32;
}

.mc-btn-success:hover:not(:disabled) {
    background-color: #1b5e20;
}

.mc-btn-secondary {
    background-color: #757575;
    color: white;
    border-color: #757575;
}

.mc-btn-secondary:hover:not(:disabled) {
    background-color: #616161;
}

/* Tag navigation stepper - now rendered in panel header, see .mc-panel-nav */

/* Content area */
.mc-content.mc-content-full {
    flex: 1;
    overflow: auto;
    position: relative;
}

.mc-display-area {
    padding: 1em 2em;
    min-height: 200px;
}

.mc-no-item-message {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 3em 1em;
}

.mc-no-regions-note {
    color: #888;
    font-style: italic;
    padding: 0.5em;
}

/* Status bar */
.mc-status-bar {
    padding: 0.3em 0.5em;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    border-top: 1px solid #ddd;
    background-color: #fafafa;
}

/* Draggable editor panel */
.mc-draggable-panel {
    position: fixed;
    z-index: 1000;
    width: 400px;
    background-color: #fff;
    border: 2px solid #1565c0;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 60vh;
}

.mc-draggable-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4em 0.6em;
    background-color: #1565c0;
    color: white;
    border-radius: 4px 4px 0 0;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.mc-draggable-panel-header:active {
    cursor: grabbing;
}

.mc-draggable-panel-title {
    font-size: 0.9em;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

.mc-draggable-panel-minimize {
    background: none;
    border: none;
    color: white;
    font-size: 1.3em;
    cursor: pointer;
    padding: 0 0.3em;
    line-height: 1;
    border-radius: 3px;
    flex-shrink: 0;
}

.mc-draggable-panel-minimize:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.mc-draggable-panel-content {
    padding: 0.6em;
    overflow: auto;
    flex: 1;
    min-height: 0;
}

.mc-draggable-panel-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4em;
    padding: 0.4em 0.6em;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.mc-btn-danger {
    background-color: #d32f2f;
    color: #fff;
    border: 1px solid #b71c1c;
}

.mc-btn-danger:hover:not(:disabled) {
    background-color: #b71c1c;
}

.mc-btn-sm {
    padding: 0.2em 0.5em;
    font-size: 0.85em;
}

/* Minimized state: header only, clickable to restore */
.mc-draggable-panel-minimized {
    max-height: none;
}

.mc-draggable-panel-minimized .mc-draggable-panel-header {
    border-radius: 4px;
    cursor: pointer;
}

/* Panel header navigation buttons */
.mc-panel-nav {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    margin-right: 0.4em;
    flex-shrink: 0;
}

.mc-panel-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    position: relative;
    min-width: 24px;
    min-height: 24px;
}

.mc-panel-nav-btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.25);
}

.mc-panel-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.mc-panel-nav-progress {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.9);
    padding: 0 0.3em;
    white-space: nowrap;
    user-select: none;
}

.mc-nav-badge {
    position: absolute;
    bottom: -1px;
    right: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    background-color: white;
    color: #1565c0;
    border: 1px solid #1565c0;
    border-radius: 2px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

/* ───────────────────────── AfA PnP Dialog ───────────────────────── */

dialog.tq-pnp-dialog {
    z-index: 50;
    position: fixed;
    align-self: anchor-center;
    width: 60%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    font-family: inherit;
    font-size: 0.9em;
}

dialog.tq-pnp-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
}

.tq-pnp-dialog-title {
    padding: 12px 16px;
    font-size: 1.1em;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 6px 6px 0 0;
}

.tq-pnp-dialog-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.tq-pnp-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 0 0 6px 6px;
}

/* Collapsible sections */

.tq-pnp-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.tq-pnp-section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    background-color: #f5f6f7;
    user-select: none;
    border-radius: 4px;
}

.tq-pnp-section-header:hover {
    background-color: #e8eaed;
}

.tq-pnp-chevron {
    font-size: 0.7em;
    width: 12px;
    text-align: center;
    color: #555;
}

.tq-pnp-section-title {
    font-weight: 600;
    font-size: 0.95em;
}

.tq-pnp-section-body {
    padding: 12px;
}

/* Form grid — label + control pairs */

.tq-pnp-form-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 12px;
    align-items: center;
}

.tq-pnp-form-grid > label {
    font-weight: 500;
    white-space: nowrap;
}

/* Checkbox grids — 3-column */

.tq-pnp-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 12px;
}

/* Checkbox row — inline flow */

.tq-pnp-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 4px;
}

/* Individual checkbox item */

.tq-pnp-checkbox-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tq-pnp-checkbox-item label {
    cursor: pointer;
}

/* Form row — single label + input */

.tq-pnp-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

/* Sub-labels within sections */

.tq-pnp-sub-label {
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #333;
}

/* Input styling */

.tq-pnp-input {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9em;
    min-width: 120px;
}

.tq-pnp-number-input {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9em;
    width: 80px;
}

.tq-pnp-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9em;
    min-width: 140px;
}

.tq-pnp-color-input {
    width: 50px;
    height: 28px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
}

/* Radio groups */

.tq-pnp-radio-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tq-pnp-radio-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tq-pnp-radio-row label {
    cursor: pointer;
}

/* Enable/disable toggle row */

.tq-pnp-enable-row {
    margin-bottom: 8px;
}

/* Detail controls — disabled state */

.tq-pnp-detail-controls[data-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* Sub-groups within a section */

.tq-pnp-sub-group {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

.tq-pnp-sub-group:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* Timing group */

.tq-pnp-timing-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Font name chips */

.tq-pnp-font-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.tq-pnp-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tq-pnp-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background-color: #e0e7ef;
    border-radius: 12px;
    font-size: 0.85em;
}

.tq-pnp-chip-remove {
    cursor: pointer;
    font-weight: bold;
    color: #666;
    margin-left: 2px;
}

.tq-pnp-chip-remove:hover {
    color: #c00;
}

.tq-pnp-small-btn {
    padding: 3px 10px;
    font-size: 0.85em;
}

/* ── Accommodation Picker ── */

.tq-acc-description {
    font-size: 0.8em;
    color: #777;
    font-style: italic;
    margin-top: 2px;
    line-height: 1.3;
}

.tq-acc-hint {
    font-size: 0.8em;
    color: #0b6fcc;
    background-color: #e8f2fc;
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 8px;
    line-height: 1.4;
}

.tq-acc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tq-acc-combo-detail {
    margin-left: 24px;
    padding: 6px 0;
}

.tq-acc-combo-detail[data-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   Test Item with Accommodations (tq-tia- prefix)
   ========================================================================== */

.TIAView_window {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tq-tia-header {
    display: flex;
    align-items: baseline;
    gap: 1em;
    padding: 0.5em 1em;
    border-bottom: 1px solid #ddd;
}

.tq-tia-header h1 {
    margin: 0;
    font-size: 1.3em;
}

.tq-tia-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.5em;
    gap: 0.5em;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.tq-tia-display {
    padding: 1em 2em;
    min-height: 200px;
}

.tq-tia-profile-panel {
    padding: 0.5em 1em;
    background-color: #f0f4f8;
    border-bottom: 1px solid #ddd;
}

.tq-tia-profile-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

.tq-tia-profile-row label {
    font-weight: 500;
    white-space: nowrap;
}

.tq-tia-profile-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9em;
    min-width: 180px;
}

.tq-tia-profile-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}

.tq-tia-status {
    padding: 0.3em 0.5em;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    border-top: 1px solid #ddd;
    background-color: #fafafa;
}

/* ========== Math Formula Blot (Inline Equation Editor) ========== */

/* Inline blot wrapper */
qti-span.tq-math-formula {
    display: inline-block;
    vertical-align: middle;
}

/* Math element inside the blot */
qti-span.tq-math-formula math {
    cursor: pointer;
    padding: 0 2px;
}

/* Hover indicator for editable equation */
qti-span.tq-math-formula:hover math {
    outline: 2px dashed #1565c0;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Toolbar button icon - sigma symbol via SVG data URI */
dialog.tq_interaction_dialog div.ql-toolbar.ql-snow button.ql-math-formula,
.DIView_window div.ql-toolbar.ql-snow button.ql-math-formula {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3 2h12v2.5H8.5L12 9l-3.5 4.5H15V16H3v-2.5l5-5.5L3 4.5z' fill='%23444'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: center;
}

/* Equation editor dialog */
dialog.tq-equation-dialog {
    z-index: 50;
    position: fixed;
    align-self: anchor-center;
    min-width: 500px;
    max-width: 90vw;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

dialog.tq-equation-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
}

dialog.tq-equation-dialog .tq-dialog-title {
    padding: 10px 16px;
    border-bottom: 1px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 6px 6px 0 0;
}

dialog.tq-equation-dialog .tq-equation-editor-container {
    padding: 16px;
    min-height: 200px;
}

dialog.tq-equation-dialog .tq-dialog-buttons {
    padding: 10px 16px;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
    border-radius: 0 0 6px 6px;
}

