/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.menu .app-brand.demo {
    height: 64px;
    margin-top: 12px;
}

.app-brand-logo.demo svg {
    width: 22px;
    height: 38px;
}

.app-brand-text.demo {
    font-size: 1.75rem;
    letter-spacing: -0.5px;
}

/* ! For .layout-navbar-fixed added fix padding top to .layout-page */
/* Detached navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
    padding-top: 74px !important;
}

/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
    padding-top: 64px !important;
}

.docs-page .layout-navbar-fixed.layout-wrapper:not(.layout-without-menu) .layout-page,
.docs-page .layout-menu-fixed.layout-wrapper:not(.layout-without-menu) .layout-page {
    padding-top: 62px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
    z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks>* {
    display: block !important;
}

.demo-inline-spacing>* {
    margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing>* {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing.demo-only-element> :first-child {
    margin-top: 0 !important;
}

.demo-vertical-spacing-lg>* {
    margin-top: 1.875rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing-lg.demo-only-element> :first-child {
    margin-top: 0 !important;
}

.demo-vertical-spacing-xl>* {
    margin-top: 5rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing-xl.demo-only-element> :first-child {
    margin-top: 0 !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
    #dropdown-variation-demo .btn-group .text-truncate {
        width: 231px;
        position: relative;
    }

    #dropdown-variation-demo .btn-group .text-truncate::after {
        position: absolute;
        top: 45%;
        right: 0.65rem;
    }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    margin-top: 1rem;
}

.layout-demo-placeholder img {
    width: 900px;
}

.layout-demo-info {
    text-align: center;
    margin-top: 1rem;
}

div.dt-container div.dt-layout-row {
    padding: 0 20px;
}

.dt-layout-cell label {
    margin-left: 10px;
}

.questions-card {
    box-shadow: none;
}

.card-body {
    padding-top: 30px;
}

.question {
    padding: 15px 30px;
    border: 1px solid #ddd;
    border-radius: 15px;
    margin-top: 30px;
}

.question .img-thumbnail {
    max-width: 100px;

    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    height: 100px;
    object-fit: cover;
}

small {
    font-size: 12px;
}

.generated-images .img-thumbnail {
    max-width: 100px;

    border: 2px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    height: 100px;
    object-fit: cover;
}

.generated-images .image {
    position: relative;
}

.generated-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
}

.dropdown.options-dropdown {
    position: absolute;
    top: 7px;
    right: 15px;
}

.question.editable .question-text {
    width: 75%;
}

.question.audio .question-text {
    width: 75%;
}

.question .image-wrapper {
    position: relative;
    width: 100px;
    margin-right: 0;
    margin-bottom: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.question .image-wrapper .edit-options {
    width: 100%;
    margin-top: 5px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.question .image-wrapper .edit-options .btn {
    font-size: 12px;
    padding: 5px 8px;
    margin: 0;
    display: block;
    width: 100%;
    min-height: 32px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive: Stack buttons on very small screens */
@media (max-width: 480px) {
    .question .image-wrapper .edit-options {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .question .image-wrapper .edit-options .btn {
        font-size: 11px;
        padding: 4px 6px;
        min-height: 30px;
    }
}

.question-input {
    margin-bottom: 15px;
}

.select-questions {
    max-height: 400px;
    overflow-y: auto;
    padding-bottom: 30px;
}

.select-questions .question {
    padding: 15px 15px 15px 45px;
    margin-top: 15px;
    position: relative;
}

.select-questions .question .image-wrapper img {

    padding: 0;
}

.select-questions .question .question-title {
    font-size: 14px;
    margin: 0;
}

.select-questions .question .edit-options .btn {
    color: #fff;
}

.select-questions .question .btn-outline-primary i {
    color: #696cff;
}

.select-questions .question .btn-outline-primary:hover i {
    color: #fff;
}

.select-questions .question .btn-outline-danger i {
    color: #ff3e1d;
}

.select-questions .question .btn-outline-danger:hover i {
    color: #fff;
}

.select-questions .select-question-checkbox {
    position: absolute;
    left: 10px;
    top: 20px;
}

.froala-editor.fr-box.fr-basic.fr-top {
    margin-bottom: 20px;
}

.select-questions .question.selected {
    border: 2px solid #007bff;
    background-color: #f0f8ff;


}

.used-question {
    position: relative;
    background: #f8f8f8;
}

.used-question::before {
    content: 'Question Already Used';
    position: absolute;
    top: -13px;
    right: 8px;
    background: #f44336a1;
    color: #fff;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: bold;
}

.used-question .question-options .btn-group .edit-btn,
.used-question .question-options .btn-group .delete-btn {
    opacity: 0.5;
    pointer-events: none;
}

.question .image-wrapper .correct-answer {
    border: 3px solid #696cff;
}

.ql-container {
    box-sizing: border-box;

    font-size: 13px;
    height: auto;
    margin: 0;
    position: relative;
    min-height: 100px;
    margin-bottom: 20px;
}

#questions-container .question select {
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 22' fill='none'%3e%3cpath d='M10.9999 12.0743L15.5374 7.53676L16.8336 8.83292L10.9999 14.6666L5.16626 8.83292L6.46243 7.53676L10.9999 12.0743Z' fill='%2322303e' fill-opacity='0.9'/%3e%3c/svg%3e") !important;
    display: block;
    width: 100%;
    padding: 0.543rem 2.625rem 0.543rem 0.9375rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.375;
    color: var(--bs-heading-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    background-position: right 0.9375rem center;
    background-size: 22px 24px;
    border: var(--bs-border-width) solid color-mix(in sRGB, var(--bs-base-color) 22%, var(--bs-paper-bg));
    border-radius: var(--bs-border-radius);
    -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
    width: auto;
    display: inline;
    margin: 10px;
}


/* phase 2 css */
.menu .menu-sub>.menu-item.open>.menu-link.menu-toggle::before {

    background-color: #696cff;
}

.question-text {
    width: 70%;
}

::-webkit-scrollbar {
    width: 5px;
}

/* Track */
::-webkit-scrollbar-track {
    background: #444;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #696cff;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.question-text span.underline {
    display: inline-block;
    border-bottom: 2px solid #000;
    width: 100px;
    vertical-align: text-bottom;
}

.editor {
    font-family: 'Public Sans' !important;
    font-size: 14px !important;
}

input.fill_in_blank {
    border: none;
    border-bottom: 1px solid #444;
    display: inline-block;
    vertical-align: super;
    margin: 0 2px;
    background: none;
    width: 100px;
    text-align: center;
}

.question-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.answer-display {
    color: #36c636;
}



.img-radio img {
    width: 100%;
    height: auto;
    display: block;
    border: 3px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.img-radio input[type="radio"]:checked+img {
    border-color: #0d6efd;
    opacity: 0.7;
}

img {
    max-width: 100%;
}

.missing-choices img {
    width: 100px;
}

div#comprehension-container {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    overflow-x: hidden;
}

.comprehension-block {
    padding-right: 20px;
}

.comprehension-choces {
    border-top: 1px solid #ddd;
    padding-top: 15px;
    margin-top: 15px;
}

.comprehension-choces .question-title {
    font-size: 16px;
}

.comprehension-passage {
    font-size: 16px;
    line-height: 24px;
}

.letters,
.slots {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.letter,
.slot {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 18px;
    background: #c8f7c5;
    cursor: grab;
    user-select: none;
}

.slot {
    background: #f8f8f8;
}

.instruction_question h5 {
    font-size: 14px;
    margin: 0;
}

.instruction_question .question-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.instruction_question .question {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 15px;
    margin-top: 0;
    background: #fafafa;
}


/* Image wrapper button grid layout (used in generated content) */
.image-wrapper .d-grid {
    gap: 4px;
}

.image-wrapper .d-grid.gap-1 {
    gap: 4px !important;
}

/* Ensure consistent label/option display styling */
.image-wrapper .option-display {
    font-size: 12px;
    margin: 0;
    padding: 0 4px;
    text-align: center;
    word-break: break-word;
    max-width: 100px;
}

.image-wrapper .label-input {
    font-size: 12px;
    padding: 4px 6px;
    margin: 0;
}

/* Ensure proper spacing between image and buttons */
.image-wrapper .img-thumbnail {
    margin-bottom: 6px;
}

/* Select questions specific adjustments */
.select-questions .image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.select-questions .image-wrapper .edit-options {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 6px;
}

.select-questions .image-wrapper .edit-options .btn {
    font-size: 12px;
    padding: 5px 8px;
    margin: 0;
    width: 100%;
    min-height: 32px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}