.cursor-pointer {
    cursor: pointer !important;
}

.aside .side-content .sidemenu-wrapper .sidemenu-list .sidemenu-item .sidemenu-link:hover {
    background: var(--color-primary-light);
}

.book-menu {
    min-height: calc(100% - 260px) !important;
}

.book-menu .sidebar-body {
    max-height: calc(100dvh - 374px) !important;
}

.flex-1 {
    flex: 1 1 0;
}

.h-16 {
    height: 4rem;
}

.h-20 {
    height: 5rem;
}

.w-16 {
    width: 4rem;
}

.w-20 {
    width: 5rem;
}

.text-justify {
    text-align: justify;
}

.rounded-lg {
    border-radius: 8px !important;
}

.rounded-xl {
    border-radius: 12px !important;
}

.rounded-xxl {
    border-radius: 16px !important;
}

.chapters-container input.form-check-input {
    margin-top: 0 !important;
    height: 1rem !important;
    width: 1rem !important;
}

.chapter .delete-chapter, .chapter .add-chapter, .section .delete-section, .section .add-section {
    display: none;
}

.chapter:hover .delete-chapter, .chapter:hover .add-chapter,
.section:hover .delete-section, .section:hover .add-section {
    display: inline-block !important; /* Display buttons on hover */
}

.section-number {
    margin-right: 8px;
}

.swal-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.swal-processing-text {
    color: white;
    font-size: 18px;
    display: inline-block;
    animation: lightGlow 1.5s infinite forwards;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.loading {
    font-size: 24px;
    display: inline-block;
}

.loading:after {
    display: inline-block;
    content: "";
    animation: dotAnimation 1.5s infinite steps(4, end);
}

@keyframes dotAnimation {
    0% {
        content: "";
    }
    25% {
        content: ".";
    }
    50% {
        content: "..";
    }
    75% {
        content: "...";
    }
    100% {
        content: "";
    }
}

@keyframes lightGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 1);
    }
}

.rounded-circle-text {
    font-size: 18pt;
    width: 6rem;
    height: 6rem;
}

.shadow-md {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important
}

.image-upload-container {
    position: relative;
    text-align: center;
}

.image-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f0f0f0;
    position: relative;
}

#authorImagePreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    font-size: 24px;
}

#uploadButton {
    margin-top: 10px;
    font-size: 14px;
    padding: 5px 15px;
}

.step-item {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-line {
    flex: 1;
    width: 5rem;
    height: 2px;
    background: #ccc;
    margin: 0 auto; /* Center the step lines */
}

.step-btn {
    width: 100%;
    max-width: 200px; /* Limit button width for better design */
    padding: 8px 16px; /* Slightly larger padding for better touch */
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-btn:hover {
    background: #f0f0f0;
}

/* Keep steps fixed at the top with proper alignment */
.steps-wrapper {
    background: var(--card-bg-light);
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

/* Centering Steps and Keeping Inside Layout */
.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Ensure wrapping on smaller screens */
    margin: auto;
    text-align: center;
    max-width: 1200px; /* Prevent stretching on larger screens */
    padding: 20px;
}

@media (min-width: 1199px) {
    .steps-wrapper {
        margin-left: 114px;
    }
}

/* Responsive Fixes */
@media (max-width: 992px) {
    .steps-container {
        width: 100%;
        padding: 15px;
    }

    .step-btn {
        max-width: 180px;
        padding: 7px 14px;
    }
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }

    .step-item {
        margin-bottom: 10px;
        flex-direction: column;
    }

    .step-line {
        display: none; /* Hide step line on smaller screens */
    }

    .step-btn {
        width: auto; /* Let button size adapt naturally */
    }
}

/* Extra Small Screens (Phones) */
@media (max-width: 480px) {
    .steps-container {
        padding: 10px;
    }

    .step-btn {
        width: 100%; /* Make buttons full width for better usability */
    }
}

/* Scrollable Content */
.scrollable-content {
    overflow-y: auto;
    max-height: 70vh; /* Ensures scrolling instead of hiding content */
    padding: 15px;
    border-radius: 10px;
}

.avatar-16 {
    width: 16rem;
    height: 16rem;
}

.rating {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    width: 100%;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    overflow: hidden;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: reverse;
    -ms-flex-direction: row-reverse;
    flex-direction: row-reverse;
    gap: 4px;
}

.rating > input {
    display: none;
}

.rating > label {
    cursor: pointer;
    position: relative;
    width: 28px;
    height: 30px;
}

.rating > label::before {
    position: absolute;
    font-family: bootstrap-icons !important;
    content: "\F586";
    font-size: 28px;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    line-height: 1.2;
    opacity: 0.2;
    -webkit-transition: 0.3s;
    -o-transition: 0.3s;
    transition: 0.3s;
}

.rating > input:checked ~ label::before,
.rating > input:checked ~ label ~ label::before {
    opacity: 1;
    color: #fcd93a;
}

.rating > input:not(:checked) ~ label:hover::before,
.rating > input:not(:checked) ~ label:hover ~ label::before {
    opacity: 1;
    color: #fcd93a;
}


.feedback-file {
    cursor: pointer;
    display: block;
    border: 1px dashed var(--border-two);
    background-color: var(--color-primary-soft);
    border-radius: 16px;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.feedback-file:hover {
    border-color: var(--color-primary);
}

.feedback-file > span {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    line-height: 1.1;
    padding: 30px 20px;
    background-color: rgba(240, 242, 248, 1);
}

.feedback-file > span i {
    font-size: 26px;
    line-height: 26px;
    color: var(--color-primary);
}

.page-content {
    padding: 30px 35px;
    border-radius: 40px;
}

.text-editor-content {
    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0.5rem;
    }

    ul, ol {
        padding-left: 2rem !important;
    }

    ul, ol, li {
        margin: 0;
        list-style-type: disc !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .page-content {
        padding: 25px;
    }
}

@media (max-width: 767px) {
    .page-content {
        padding: 15px;
    }
}

.otp-expired-message {
    color: var(--color-warning);
    font-size: 18px;
}

.pointer {
    cursor: pointer !important;
}

.note-editor .note-toolbar .note-dropdown-menu,
.note-popover .popover-content .note-dropdown-menu {
    top: 115%;
}

.note-modal {
    z-index: 1070 !important;
}

.note-modal .form-group {
    margin-bottom: 15px;
}

.note-dropdown-menu.dropdown-menu {
    border: 1px solid var(--color-primary-light) !important;
    -webkit-box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.note-modal .close {
    width: 25px;
    height: 25px;
    line-height: 25px;
    border-radius: 50%;
    font-size: 20px;
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    -webkit-transition: 0.3s ease;
    -o-transition: 0.3s ease;
    transition: 0.3s ease;
}

.note-editor .note-editable > ul {
    list-style: disc !important;
    list-style-position: inside !important;
}

.note-editor .note-editable > ul > li,
.note-editor .note-editable > ol > li {
    list-style-type: unset !important;
}

.note-editor .note-editable > ol {
    list-style: decimal !important;
    list-style-position: inside !important;
}

.note-modal .btn.note-btn-primary {
    background-color: var(--color-primary) !important;
}

.note-modal .btn:disabled,
.note-modal fieldset:disabled .btn {
    color: var(--color-primary-text) !important;
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    opacity: 1 !important;
}

.note-editor .note-dropdown-menu .dropdown-item:focus,
.note-editor .note-dropdown-menu .dropdown-item:hover {
    color: var(--text-primary) !important;
    background-color: var(--site-bg) !important;
}

.note-editor .note-dropdown-menu .dropdown-item.active,
.note-editor .note-dropdown-menu .dropdown-item:active {
    color: var(--color-primary-text) !important;
    background-color: var(--color-primary) !important;
}

@-webkit-keyframes stretch {
    0% {
        -webkit-transform: scale(0.5);
        transform: scale(0.5);
        background-color: #aaa;
    }

    50% {
        background-color: #ccc;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        background-color: #fff;
    }
}

@keyframes stretch {
    0% {
        -webkit-transform: scale(0.5);
        transform: scale(0.5);
        background-color: #aaa;
    }

    50% {
        background-color: #ccc;
    }

    100% {
        -webkit-transform: scale(1);
        transform: scale(1);
        background-color: #fff;
    }
}

.ai-btn {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    cursor: pointer;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    min-width: 160px !important;
}

.ai-btn.btn__dots--loading .btn__dots {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin-left: 5px;
}

.ai-btn.btn__dots--loading .btn__dots i {
    -webkit-animation-direction: alternate;
    animation-direction: alternate;
    -webkit-animation-duration: 0.5s;
    animation-duration: 0.5s;
    -webkit-animation-fill-mode: none;
    animation-fill-mode: none;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-name: stretch;
    animation-name: stretch;
    -webkit-animation-play-state: running;
    animation-play-state: running;
    -webkit-animation-timing-function: ease-out;
    animation-timing-function: ease-out;
    border-radius: 100%;
    display: block;
    height: 10px;
    margin: 0 1px;
    width: 10px;
    -webkit-animation-delay: 0.1s;
    animation-delay: 0.1s;
    margin: 0 5px;
}

.ai-btn.btn__dots--loading .btn__dots i:first-child {
    -webkit-animation-delay: 0s;
    animation-delay: 0s;
    margin: 0;
}

.ai-btn.btn__dots--loading .btn__dots i:last-child {
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
    margin: 0;
}

.ai-btn i {
    font-weight: normal;
}

.ai-btn .btn__dots {
    display: none;
}

.card-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    isolation: isolate;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.spinner {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

@-webkit-keyframes lds-roller {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes lds-roller {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.lds-roller {
    position: relative;
    display: inline-block;
    height: 64px;
    width: 64px;
}

.lds-roller div {
    -webkit-animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    -webkit-transform-origin: 32px 32px;
    -ms-transform-origin: 32px 32px;
    transform-origin: 32px 32px;
}

.lds-roller div:after {
    position: absolute;
    display: block;
    background: var(--color-primary);
    border-radius: 50%;
    content: " ";
    margin: -3px 0 0 -3px;
    height: 6px;
    width: 6px;
}

.lds-roller div:nth-child(1) {
    -webkit-animation-delay: -0.036s;
    animation-delay: -0.036s;
}

.lds-roller div:nth-child(1):after {
    top: 50px;
    left: 50px;
}

.lds-roller div:nth-child(2) {
    -webkit-animation-delay: -0.072s;
    animation-delay: -0.072s;
}

.lds-roller div:nth-child(2):after {
    top: 54px;
    left: 45px;
}

.lds-roller div:nth-child(3) {
    -webkit-animation-delay: -0.108s;
    animation-delay: -0.108s;
}

.lds-roller div:nth-child(3):after {
    top: 57px;
    left: 39px;
}

.lds-roller div:nth-child(4) {
    -webkit-animation-delay: -0.144s;
    animation-delay: -0.144s;
}

.lds-roller div:nth-child(4):after {
    top: 58px;
    left: 32px;
}

.lds-roller div:nth-child(5) {
    -webkit-animation-delay: -0.18s;
    animation-delay: -0.18s;
}

.lds-roller div:nth-child(5):after {
    top: 57px;
    left: 25px;
}

.lds-roller div:nth-child(6) {
    -webkit-animation-delay: -0.216s;
    animation-delay: -0.216s;
}

.lds-roller div:nth-child(6):after {
    top: 54px;
    left: 19px;
}

.lds-roller div:nth-child(7) {
    -webkit-animation-delay: -0.252s;
    animation-delay: -0.252s;
}

.lds-roller div:nth-child(7):after {
    top: 50px;
    left: 14px;
}

.lds-roller div:nth-child(8) {
    -webkit-animation-delay: -0.288s;
    animation-delay: -0.288s;
}

.lds-roller div:nth-child(8):after {
    top: 45px;
    left: 10px;
}

