﻿body,
input,
button,
select,
textarea,
h1, h2, h3, h4, h5, h6,
p, span, div, a, li, td, th,
.mud-typography {
  font-family: 'Cairo', sans-serif;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Cairo';
    src: url('/fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background-color: red;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

code {
    color: #c02d76;
}

.handlerCircularProgressor {
    width: 150px !important;
    height: 150px !important;
}

.mud-input-helper-text .me-auto {
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
    text-align: start !important;
}

/* Expanded-Tree Stylings */

#expandedTree ul {
    list-style-type: none;
    position: relative;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

    #expandedTree ul ul {
        margin-left: 20px;
    }

#expandedTree li {
    position: relative;
    padding: 10px 5px 0;
}

    #expandedTree li::before, #expandedTree li::after {
        content: '';
        position: absolute;
        left: -20px;
    }

    #expandedTree li::before {
        border-left: 2px solid #000;
        bottom: 50px;
        height: 100%;
        top: 0;
        width: 1px;
    }

    #expandedTree li::after {
        border-top: 2px solid #000;
        height: 20px;
        top: 25px;
        width: 25px;
    }

    #expandedTree li span {
        cursor: pointer;
        display: inline-block;
        padding: 5px 10px;
        text-decoration: none;
        background-color: #fafafa;
        border: 2px solid #ddd;
        border-radius: 5px;
        transition: background-color 0.3s, color 0.3s;
    }

        #expandedTree li span:hover {
            background-color: #eee;
        }

        #expandedTree li span::before {
            content: '⏬ ';
            color: #888;
            display: inline-block;
            width: 20px;
            text-align: center;
        }

        #expandedTree li span.collapsed::before {
            content: '⏩ ';
        }

        #expandedTree li span.no-children::before {
            content: '';
        }

.hidden {
    display: none;
}

.expanded-tree-container {
    overflow-x: auto;
    border: 1px solid #ccc;
    padding: 10px;
}

.tree-container ul {
    list-style-type: none;
    padding-inline-start: 20px;
}

.tree-container li {
    margin: 5px 0;
}

.tree-container span {
    cursor: pointer;
    margin-right: 5px;
}

.mcq-options {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .mcq-options label {
        display: flex;
        align-items: center;
        gap: 5px;
    }

.mcq-option {
    display: flex;
    align-items: center;
    font-size: 1rem;
    margin-bottom: 10px;
    cursor: pointer;
    margin-left: 144px;
}

    .mcq-option input[type="radio"] {
        width: 25px;
        height: 25px;
        margin-right: 15px;
        cursor: pointer;
    }

.button-behind {
    width: 190px;
    height: 59px;
    border-radius: 12px;
}

.fade-wrapper {
    overflow: hidden;
}

.fade-container {
    transition: all 0.6s ease-in-out;
    opacity: 0;
    transform: scale(0.95);
    max-height: 0;
    visibility: hidden;
}

.fade-in {
    opacity: 1;
    transform: scale(1);
    max-height: 300px;
    visibility: visible;
}

.fade-out {
    opacity: 0;
    transform: scale(0.95);
    max-height: 0;
    visibility: hidden;
}

.full-width-button {
    width: 100%;
}

.full-width-actions {
    width: 100%;
    display: flex;
    justify-content: center;
}

.selected-row {
    background-color: rgba(var(--mud-palette-primary-rgb), 0.4) !important;
}

.mud-table-row:hover .selected-row {
    background-color: rgba(var(--mud-palette-primary-rgb), 0.3) !important;
}

body {
    --keyboard-zindex: 3000;
}

.modal {
    z-index: 21474836478 !important;
    overflow-y: auto;
}

.modal-backdrop {
    display: none !important;
}

body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

/* File Preview Dialog Styles */
.media-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    max-height: 80vh;
    overflow: hidden;
    margin: 10px auto;
}

    .media-container img {
        max-width: 100%;
        max-height: 80vh;
        object-fit: contain;
        border-radius: 8px;
    }

    .media-container video {
        max-width: 100%;
        max-height: 80vh;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }

    .media-container audio {
        width: 100%;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }

    .media-container a {
        display: block;
        padding: 10px 20px;
        background-color: #007bff;
        color: white;
        text-align: center;
        border-radius: 5px;
        text-decoration: none;
        margin-top: 10px;
    }

        .media-container a:hover {
            background-color: #0056b3;
        }

.dialog-border {
    border: 3px solid !important;
}

.text-editor-style p {
    margin-bottom: 0px !important
}

button.mud-icon-button[disabled],
button.mud-icon-button.mud-disabled {
    pointer-events: none !important;
    opacity: 1;
}

.bookmark {
    position: fixed;
    top: 230px;
    right: -12px;
    border-radius: 30px 0 0 30px !important;
    padding: 10px;
    z-index: 99;
    width: 60px;
    height: 60px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: .85;
}

.icon-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.icon-container {
    position: absolute;
    display: flex;
    gap: 10px; /* Space between buttons */
}

.expandable-icon {
    transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out;
    opacity: 1;
}

/* Manual Sectioning-Based Questions */
.section-container {
    border: 2px dashed red;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
}

    .section-container:hover {
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
        border-color: var(--mud-palette-primary);
    }

.static-section-container {
    border: 2px solid var(--mud-palette-primary);
    background-color: var(--mud-palette-primary-light);
    border-radius: 12px;
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
}

.drop-zone {
    min-height: 400px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.section-drop-zone {
    background-color: var(--mud-palette-surface);
    border: 2px dashed var(--mud-palette-grey-light);
}

    .section-drop-zone:hover {
        background-color: var(--mud-palette-surface);
        border-color: var(--mud-palette-primary);
    }

.static-drop-zone {
    background-color: var(--mud-palette-primary-light);
}

.section-header {
    background-color: var(--mud-palette-surface);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.question-card {
    cursor: move;
    transition: all 0.3s ease;
    background-color: var(--mud-palette-surface);
}

    .question-card:hover {
        transform: scale(1.02);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

.question-card, .question-text {
    font-size: 0.875rem;
}

.question-text {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Paper Questions Selection */
.selected-questions-list {
    max-height: 700px;
    overflow-y: auto;
}

.truncate-text {
    font-size: 1rem;
    white-space: normal;
    word-break: break-word;
}

.colored-divider {
    background-color: #1976d2;
    height: 2px;
    margin: 5px 0;
    border-radius: 1px;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.border-light {
    border-color: #e0e0e0 !important;
}

.rounded-lg {
    border-radius: 12px !important;
}

/* Blocks Stylings */
.text-divider {
    --text-divider-gap: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

    .text-divider::before,
    .text-divider::after {
        content: '';
        height: 1px;
        background-color: silver;
        flex-grow: 1;
    }

    .text-divider::before {
        margin-right: var(--text-divider-gap);
    }

    .text-divider::after {
        margin-left: var(--text-divider-gap);
    }

.bg-circle-1 {
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    transform: translate(50%, -50%);
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.bg-circle-2 {
    bottom: 0;
    left: 0;
    width: 100px;
    height: 100px;
    transform: translate(-50%, 50%);
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.photo-image {
    border-bottom: 1px solid #e0e0e0;
}

.mud-expansion-panel {
    border-radius: 8px !important;
    margin-bottom: 16px;
}

.mud-expansion-panel-header {
    background-color: #f5f7fa;
    font-weight: 500;
}

.mud-radio .mud-radio-icon {
    transform: scale(0.9);
}

/* Aligning the MCQ and TrueOrFalse radio buttons beside their labels */
label p,
label h6,
label div {
    display: inline !important;
    margin: 0 !important;
}
/* Aligning the MCQ and TrueOrFalse radio buttons beside their labels */

/* Custom styling for correct answer card in EssayLayout */
.correct-answer-card {
    border: 2px solid #4caf50 !important;
    background-color: #e8f5e9 !important;
    padding: 8px;
}

/* Custom Radio Button for ComprehensionLayout */
.custom-radio-item {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    cursor: default;
}

    .custom-radio-item input[type="radio"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.custom-radio-circle {
    position: absolute;
    top: 2px;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #3f51b5;
    border-radius: 50%;
    background-color: white;
}

    .custom-radio-circle.checked {
        border-color: #4caf50;
        background-color: white;
    }

        .custom-radio-circle.checked::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 10px;
            height: 10px;
            background-color: #4caf50;
            border-radius: 50%;
        }

.custom-radio-content {
    margin-left: 30px;
    line-height: 1.4;
    padding-left: 20px;
}

    .custom-radio-content div {
        padding-left: 20px;
    }

.custom-radio-group {
    padding-left: 10px;
}
/* Custom Radio Button for ComprehensionLayout */

/* Custom styling for the schedule loader */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.sync-icon-container {
    position: relative;
}

.sync-overlay {
    backdrop-filter: blur(5px);
}
/* Custom styling for the schedule loader */

.markup-body img,
.markup-body figure {
    max-width: 100% !important;
    max-height: none !important;
}

.empty-state { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.users-container {
    max-height: 150px;
    overflow-y: auto;
    padding: 8px;
    background-color: var(--mud-palette-background-grey);
    border-radius: 8px;
    border: 1px solid var(--mud-palette-divider);
}

.selected-users {
    border-color: var(--mud-palette-success);
    background-color: rgba(var(--mud-palette-success-rgb), 0.04);
}

.unselected-users {
    border-color: var(--mud-palette-info);
    background-color: rgba(var(--mud-palette-info-rgb), 0.04);
}

.users-container::-webkit-scrollbar {
    width: 6px;
}

.users-container::-webkit-scrollbar-track {
    background: transparent;
}

.users-container::-webkit-scrollbar-thumb {
    background: var(--mud-palette-action-disabled);
    border-radius: 3px;
}

    .users-container::-webkit-scrollbar-thumb:hover {
        background: var(--mud-palette-action-hover);
    }

.empty-state {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mud-chip {
    transition: all 0.2s ease-in-out;
}

    .mud-chip:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    }

.ExpandCollapseStyling {
    color: var(--mud-palette-primary) !important;
}

    .ExpandCollapseStyling:hover {
        background-color: rgba(25, 144, 206, 0.1);
    }

.tree-node {
    color: var(--mud-palette-primary) !important;
}

    .tree-node:hover {
        background-color: rgba(25, 144, 206, 0.1) !important;
        cursor: pointer;
    }

.node-description-text {
    color: var(--mud-palette-primary) !important;
}

.mcq-question-container .my-item-padding {
    padding: 2px 0 !important;
}

.mcq-question-container .compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
    width: 100%;
}

.mcq-question-container .compact-item {
    max-width: 320px;
}

.mcq-question-container .video-container video,
.mcq-question-container .video-container img {
    width: 100% !important;
    height: auto !important;
    max-height: 140px !important;
    min-height: 70px !important;
    object-fit: contain;
    border-radius: 6px;
    background: #000;
    display: block;
    margin: 0 auto !important;
    vertical-align: top;
    padding: 0 !important;
}

/* MCQ Video Styles */
.centered-video {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.choice-paper {
    padding: 2px 6px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.choice-stack {
    margin: 0 !important;
    padding: 0 !important;
    gap: 4px !important;
    align-items: flex-start !important;
}

.radio-button {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    margin-top: 2px !important;
}

.video-container {
    text-align: center;
}

    .video-container video,
    .video-container img {
        display: block;
        width: 100% !important;
        height: auto !important;
        max-height: 140px !important;
        min-height: 70px !important;
        margin-inline: auto;
        object-fit: contain;
        border-radius: 6px;
        background: #000;
    }

    .video-container p,
    .video-container div:not(:has(video)):not(:has(img)) {
        font-size: 0.9rem;
        font-weight: 500;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
        color: var(--mud-palette-text-primary);
        word-wrap: break-word;
        overflow-wrap: break-word;
        text-align: center;
        width: 100%;
    }

.custom-radio-style,
.custom-radio-style .mud-radio-content {
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
}

.choice-stack-spacing {
    gap: 1px !important;
}

.video-container > * {
    margin: 0 !important;
    padding: 0 !important;
}

.video-container > p + video,
.video-container > video + p,
.video-container > p + p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

@media (max-width: 599px) {
    .choice-stack {
        grid-template-columns: 1fr;
        gap: 2px !important;
    }

    .radio-button {
        margin-top: 1px !important;
    }

    .compact-grid {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 0 4px;
    }

    .compact-item {
        max-width: 100%;
    }

    .choice-paper {
        padding: 1px 4px;
    }

    .video-container video,
    .video-container img {
        max-height: 90px !important;
        min-height: 50px !important;
    }
}

@media (min-width: 600px) and (max-width: 959px) {
    .compact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .compact-item {
        max-width: 280px;
    }

    .choice-paper {
        padding: 2px 6px;
    }

    .video-container video,
    .video-container img {
        max-height: 100px !important;
    }
}

@media (min-width: 960px) {
    .compact-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
    }

    .compact-item {
        max-width: 300px;
    }

    .choice-paper {
        padding: 2px 8px;
    }

    .video-container video,
    .video-container img {
        max-height: 120px !important;
    }
}

@media (min-width: 1200px) {
    .compact-grid {
        max-width: 1200px;
    }

    .compact-item {
        max-width: 350px;
    }

    .choice-paper {
        padding: 3px 10px;
    }

    .video-container video,
    .video-container img {
        max-height: 140px !important;
    }
}
/* MCQ Video Styles */

/* Comprehension Question Styles */
.custom-radio-item label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

.custom-radio-item input[type="radio"],
.custom-radio-circle {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 0;
}

.responsive-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 60vh;
    overflow: hidden;
}

    .responsive-video.fallback {
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
    }

        .responsive-video.fallback iframe,
        .responsive-video.fallback video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
/* Comprehension Question Styles */

/* Essay Question Styles */
.responsive-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.25rem;
}

.content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.centered-border {
    min-height: 80px;
}
/* Essay Question Styles */

@media (max-width: 600px) {
    /* Comprehension Question Adjustments */
    .markup-body video,
    .markup-body iframe {
        max-height: 220px;
    }

    .custom-radio-item label {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .custom-radio-item input[type="radio"] {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
    }

    /* Essay Question Adjustments */
    .centered-border {
        min-height: 60px;
    }

    .content-center {
        gap: 0.4rem;
    }
}

.custom-paper {
    display: flex !important;
    flex-direction: column !important;
    border-radius: 8px !important;
}

.file-manager-bg {
    background-color: var(--mud-palette-surface, #1e1e28) !important;
    color: var(--mud-palette-text-primary) !important;
}

.adaptive-text {
    background-color: rgba(25, 118, 210, 0.05);
    color: var(--mud-palette-primary);
    border-radius: 4px;
    border: 2px solid #19b8d2;
}

.file-upload-input {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
    opacity: 0;
    margin-top: 10px;
}

.upload-zone {
    border: 2px dashed #1565c0;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    height: 160px;
    margin: 20px auto;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

    .upload-zone:hover {
        background-color: #f0f8ff;
        border-color: #0d47a1;
    }

/* PreLoader */

.loader-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    font-family: Arial, sans-serif;
}

.loader-content {
    width: 25%;
    height: 300%;
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.title-text {
    color: #1e293b;
    font-weight: 600;
    animation: fade-glow 2s ease-in-out infinite alternate;
}

.subtitle-text {
    color: #64748b;
    font-weight: 400;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-inline-start: 8px;
}

.loading-dot {
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    animation: bounce-dots 1.4s ease-in-out infinite both;
}

    .loading-dot:nth-child(1) {
        animation-delay: -0.32s;
    }

    .loading-dot:nth-child(2) {
        animation-delay: -0.16s;
    }

    .loading-dot:nth-child(3) {
        animation-delay: 0s;
    }

.loading-dots-layout {
    display: inline-flex;
    gap: 4px;
    margin-inline-start: 8px;
    padding: 70px;
}

.loading-dot-layout {
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    animation: bounce-dots 1.4s ease-in-out infinite both;
}

    .loading-dot-layout:nth-child(1) {
        animation-delay: -0.32s;
    }

    .loading-dot-layout:nth-child(2) {
        animation-delay: -0.16s;
    }

    .loading-dot-layout:nth-child(3) {
        animation-delay: 0s;
    }

html.dark-theme .loader-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

html.dark-theme .loader-content {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

html.dark-theme .title-text {
    color: #f1f5f9;
}

html.dark-theme .subtitle-text {
    color: #94a3b8;
}

@keyframes fade-glow {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

@keyframes bounce-dots {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .loader-content {
        width: 90%;
        padding: 2rem;
        margin: 1rem;
    }
}

.pa-0 {
    padding: 0;
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.h5 {
    font-size: 1.5rem;
    margin: 0;
}

.body1 {
    font-size: 1rem;
    margin: 0;
}

.loading-progress-text {
    text-align: center;
    font-weight: bold;
    margin-bottom: 12px;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.progress-linear {
    width: 200px;
    height: 3px;
    border-radius: 2px;
    margin-top: 1rem;
    background-color: #e2e8f0;
    overflow: hidden;
    position: relative;
}

    .progress-linear::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 40%;
        background: #3b82f6;
        border-radius: 2px;
        animation: progress-indeterminate 2s ease-in-out infinite;
    }

/* Progress Bar Styles */

.progress-bar-container {
    width: 100%;
    max-width: 250px;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 4px;
    width: var(--blazor-load-percentage, 0%);
    transition: width 0.2s ease-in-out;
}

/* Dark theme styles */

html.dark-theme .progress-bar-container {
    background-color: #334155;
}

html.dark-theme .progress-linear {
    background-color: #334155;
}

/* PreLoader */

.mud-card-content {
    overflow: visible !important;
}

/* Users Classes */

.users-container {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
    background-color: var(--mud-palette-background-grey);
    border-radius: 8px;
    border: 1px solid var(--mud-palette-divider);
}

.selected-users {
    border-color: var(--mud-palette-success);
    background-color: rgba(var(--mud-palette-success-rgb), 0.04);
}

.unselected-users {
    border-color: var(--mud-palette-info);
    background-color: rgba(var(--mud-palette-info-rgb), 0.04);
}

.users-container::-webkit-scrollbar {
    width: 6px;
}

.users-container::-webkit-scrollbar-track {
    background: transparent;
}

.users-container::-webkit-scrollbar-thumb {
    background: var(--mud-palette-action-disabled);
    border-radius: 3px;
}

    .users-container::-webkit-scrollbar-thumb:hover {
        background: var(--mud-palette-action-hover);
    }

/* Sync Status */

.pulsing-text {
    animation: pulse 2s ease-in-out infinite;
}

.pulsing-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.sync-fab-active {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 155, 217, 0.5);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 155, 217, 0.8);
        transform: scale(1.05);
    }
}

.status-chip-success {
    font-weight: 600;
    animation: fadeIn 0.3s ease-in;
}

.status-chip-error {
    font-weight: 600;
    animation: shake 0.5s ease-in-out;
}

.status-in-progress {
    animation: slideIn 0.3s ease-out;
}

.status-pending {
    opacity: 0.7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Sync Status */

/* Paper Forms */

.mud-expansion-panel {
    height: auto !important;
    min-height: unset !important;
}

.mud-expansion-panel-content {
    height: auto !important;
    min-height: unset !important;
}

.drop-zone.static-drop-zone {
    height: auto !important;
    min-height: unset !important;
    padding: 8px;
}

.mud-expansion-panels {
    height: auto !important;
    overflow: visible !important;
}

.question-text img,
.question-text video {
    max-width: 200px !important;
    max-height: 200px !important;
    object-fit: contain !important;
    display: inline-block !important;
    margin: 4px 0 !important;
}

.question-text figure {
    max-width: 200px !important;
    max-height: 200px !important;
    padding: 0 !important;
    margin: 4px 0 !important;
    display: inline-block !important;
    overflow: hidden !important;
}

    .question-text figure video {
        width: 100% !important;
        height: 100% !important;
        max-width: 200px !important;
        max-height: 200px !important;
        object-fit: contain !important;
    }

.bulk-actions-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.section-summary {
    font-size: 0.875rem;
    color: #666;
}

.selection-checkbox {
    margin-right: 8px;
}

/* Paper Forms */

/* Schedule Summary */

.schedule-paper {
    padding: 8px;
    background-color: var(--mud-palette-background-gray);
}

.schedule-paper-start {
    border-left: 3px solid var(--mud-palette-success);
}

.schedule-paper-end {
    border-left: 3px solid var(--mud-palette-error);
}

/* Schedule Summary */

/* Fill-In-The-Blanks Styles */

.selected-answers {
    color: green;
    font-size: 1.3rem;
    font-weight: 600;
    border: 1px solid green;
    border-radius: 5px;
    padding: 0.5rem;
    margin-left: 0.5rem; 
    display: inline-block; 
}

/* Fill-In-The-Blanks Styles */

/* Fix files in MCQ layouts */

.mcq-content-rtl figure,
.mcq-content-rtl .se-image-container figure,
.mcq-content-rtl img {
    float: right !important;
    margin-left: 15px !important;
    margin-right: 0 !important;
}

/* LTR Direction - English */

.mcq-content-ltr figure,
.mcq-content-ltr .se-image-container figure,
.mcq-content-ltr img {
    float: left !important;
    margin-right: 15px !important;
    margin-left: 0 !important;
}

/* General styling for images in MCQ */

.mcq-question-body figure {
    margin-block: 10px;
}

.mcq-question-body img {
    display: block;
}
