.container-section {
    padding: 0 1.5rem;
}

#sidebar {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
}



nav.navbar {
    background-color: #ececec
}


html[data-theme="dark"] nav.navbar {
    background-color: dimgrey;
}


/* Navigation */
.breadcrumbi {
    display: flex;
    overflow: hidden;
    margin: auto;
    text-align: center;
    top: 50%;
    /*width: 100%;*/
    height: 56px;
    z-index: 1;
    background-color: #ececec;
    font-size: 0.8em;
}

html[data-theme="dark"] .breadcrumbi {
    background-color: dimgrey;
}

.breadcrumbi a {
    position: relative;
    display: flex;
    flex-grow: 1;
    text-decoration: none;
    margin: auto;
    height: 100%;
    padding-left: 38px;
    padding-right: 0;
    color: var(--bulma-text);
    transition-duration: unset;

}

.breadcrumbi a:first-child {
    padding-left: 15.2px;
}

.breadcrumbi a:last-child {
    padding-right: 15.2px;
}

.breadcrumbi a:after {
    content: "";
    position: absolute;
    display: inline-block;
    width: 56px;
    height: 56px;
    top: 0;
    right: -28px;
    background-color: #ececec;
    border-top-right-radius: 5px;
    transform: scale(0.707) rotate(45deg);
    box-shadow: 1px -1px rgba(0, 0, 0, 0.25);
    z-index: 1;
}

html[data-theme="dark"] .breadcrumbi a:after {
    background-color: dimgrey;
}

.breadcrumbi a:last-child:after {
    content: none;
}

.breadcrumbi__inner {
    display: flex;
    flex-direction: column;
    margin: auto;
    z-index: 2;
}

.breadcrumbi__title {
    font-weight: bold;
}

.breadcrumbi a.active, .breadcrumbi a:hover {
    background: #e02200;
    color: white;
}


.breadcrumbi a:hover:last-child {
    background-color: #ececec;
    color: #000000;
    cursor: unset;
}


.breadcrumbi a.active:after, .breadcrumbi a:hover:after {
    background: #e02200;
    color: white;
}

.breadcrumbi__desc {
    display: inline-block;
    max-width: 15ch; /* Limits to 10 characters */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


html[data-theme="dark"] .breadcrumbi a.active:after, html[data-theme="dark"] .breadcrumbi a:hover:after {
    background: #e02200;
    color: white;
}

@media all and (max-width: 1000px) {
    .breadcrumbi {
        font-size: 12px;
    }


}

@media all and (max-width: 710px) {
    .breadcrumbi__desc {
        display: none;
    }

    .breadcrumbi {
        height: 38px;
    }

    .breadcrumbi a {
        padding-left: 25.3333333333px;
    }

    .breadcrumbi a:after {
        content: "";
        width: 38px;
        height: 38px;
        right: -19px;
        transform: scale(0.707) rotate(45deg);
    }
}

/* universal */
/* Hide if last element in block */

.hide-last-block {
    display: none;
}

.hide-last-block:last-child {
    display: block;
}


.localized_input .tabs a {
    padding: 0 8px;
}

div.field div.tabs li.has-text {
    opacity: 1;
}

/* li what not have class has-text */
div.field div.tabs li:not(.has-text) {
    opacity: 0.4;
}


table.table-left-sticky td:first-child {
    padding-left: 0px;
}


.magicButton {
    pointer-events: auto !important;
    cursor: pointer !important;
}



.group-row {
    display: flex;
    align-items: stretch; /* Stretching subsidiaries in height */
    flex-wrap: wrap; /* Allows you to transfer the elements */
    gap: 1em; /* Spacing between elements */
    width: 100%;
}

.group-row > div.field {
    flex: 1; /* Stretch internal DIV to the entire available width */
}

div.chat div.message {
    font-size: 1em;
}

div.chat div.message ul {
    padding-left: 1em;
}

div.chat div.message ol {
    padding-left: 1em;
}

.chat .message h3 {
    padding-top: 10px;
    font-size:1.2em;
}

.chat .message h4 {
    padding-top: 10px;
    font-size:1.1em;
}

table#courses-list td,
table#units-list td,
table#lessons-list td,
table#steps-list td,
table#quizzes-list td,
table#cards-list td {
    vertical-align: middle;
}


.table {
    table-layout: auto; /* Автоматическая ширина столбцов */
}

.table .wide-column {
    width: 100%; /* Forces the column to occupy the entire available width */
}

.table td.platform, .table th.platform {
    text-align: center;
}

table td.status, .table th.status {
    text-align: center;
    min-width: 100px;
}

table td.actions, .table th.actions {
    text-align: center;
}

table td.types, .table th.types {
    text-align: center;
}

table td.levels, .table th.levels {
    text-align: center;
}

table td.orders, .table th.orders {
    text-align: center;
}

table td.premiums, .table th.premiums {
    text-align: center;
}

table td.legacy_names, .table th.legacy_names {
    text-align: center;
}

table td.medias, .table th.medias {
    min-width: 80px;
    text-align: center;
}

table td.short-navigation, .table th.short-navigation {
    min-width: 80px;
    text-align: center;
}

button.ask-modal-trigger {
    height: 25px;
    width: 25px;
    font-size: var(--bulma-control-size);
    position: relative;
    vertical-align: top;
    border-radius: 50%; /* Makes the button round */
}

button.ask-modal-trigger:hover {
    background-color: var(--bulma-background-hover);
}

.modal {
    color: var(--bulma-body-color) !important;
    font-size: 1rem !important;
    font-weight: var(--bulma-body-weight) !important;
    line-height: var(--bulma-body-line-height) !important;
}

/* Role Play Blocks Styling */
.roleplay-blocks {
    margin-top: 1rem;
}

.roleplay-block {
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.roleplay-block:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.roleplay-header {
    background: #f5f5f5;
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #dbdbdb;
    transition: background-color 0.2s ease;
    user-select: none;
}

.roleplay-header:hover {
    background: #eeeeee;
}

.roleplay-header.collapsed {
    background: #f9f9f9;
}

.roleplay-header.collapsed:hover {
    background: #f0f0f0;
}

.roleplay-header.expanded {
    background: #e8f4fd;
    border-bottom-color: #3273dc;
}

.roleplay-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.roleplay-number {
    background: #3273dc;
    color: white;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.roleplay-title {
    flex-grow: 1;
    font-weight: 600;
    font-size: 1.1rem;
    color: #363636;
}

.roleplay-image {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dbdbdb;
    flex-shrink: 0;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #3273dc;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.roleplay-header.expanded .toggle-icon {
    transform: rotate(180deg);
}

.roleplay-details {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #f0f0f0;
}

/* Dark theme support */
html[data-theme="dark"] .roleplay-block {
    border-color: #404040;
    background: #2b2b2b;
}

html[data-theme="dark"] .roleplay-header {
    background: #2b2b2b;
    border-bottom-color: #404040;
}

html[data-theme="dark"] .roleplay-header:hover {
    background: #333333;
}

html[data-theme="dark"] .roleplay-header.expanded {
    background: #1e3a5f;
    border-bottom-color: #3273dc;
}

html[data-theme="dark"] .roleplay-details {
    background: #1a1a1a;
    border-top-color: #404040;
}

html[data-theme="dark"] .roleplay-title {
    color: #f5f5f5;
}

html[data-theme="dark"] .roleplay-image {
    border-color: #404040;
}

/* Responsive design */
@media (max-width: 768px) {
    .roleplay-summary {
        gap: 0.5rem;
    }

    .roleplay-number {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .roleplay-title {
        font-size: 1rem;
    }

    .roleplay-image {
        width: 50px;
        height: 35px;
    }

    .roleplay-details {
        padding: 1rem;
    }
}



/* reveal Table */
.reveal > td > .reveal-content {
    height: 28px;
    overflow: hidden;
    transition: all 200ms ease;
}

.reveal > td > .reveal-content .reveal-info {
    display: none;
}

.campaign-info .title,
.campaign-info .reveal-info {
    padding-left: 80px;
}
.reveal:hover {
    /*cursor: pointer;*/
}
.reveal:hover > td > .reveal-content {
    height: 73px;
}

.reveal:hover > td > .reveal-content .reveal-info {
    display: block;
}

.reveal-preview {
    position: relative;
    top: 0px;
}
.reveal-preview .thumb {
    border: 1px solid #d0d8db;
    overflow: hidden;
    height: 22px;
    margin-right: 5px;
    position: absolute;
    top: 0;
    transition: height 200ms ease;
    vertical-align: middle;

    width: 73px;
}

.reveal-preview .thumb img {
    position: absolute;
    width: 100%;
    transition: all 100ms ease;
    transform: scale(1.4);
}


.reveal-preview strong, .reveal-content .reveal-info {
    padding-left: 80px;
}

.reveal:hover > td > .reveal-content .thumb {
    display: flex;
    align-items: center;
    height: 73px;
    vertical-align: middle;

}
.reveal:hover > td > .reveal-content .thumb img {
    transform: scale(1.0);
}


/* Right-side modal styles */
.modal.right {
    padding: 0;
    margin: 0;
}

.modal.right .modal-background {
    background-color: rgba(10, 10, 10, 0.86);
}

/* For modal-content structure */
.modal.right .modal-content {
    margin: 0;
    height: 100vh;
    max-height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    border-radius: 0;
    width: 30%; /* Changed from 400px to 30% for responsive design */
    display: flex;
    flex-direction: column;
    overflow: visible; /* Important - allow box to have its own scrolling */
    background-color: transparent;
}

.modal.right .modal-content .box {
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    border-radius: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* For modal-card structure */
.modal.right .modal-card {
    margin: 0;
    height: 100vh;
    max-height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    border-radius: 0;
    width: 30%; /* Changed from 400px to 30% for responsive design */
    display: flex;
    flex-direction: column;
}

.modal.right .modal-card-body {
    flex-grow: 1;
    overflow-y: auto;
}

/* Animation for sliding in from right */
.modal.right .modal-content,
.modal.right .modal-card {
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.modal.right.is-active .modal-content,
.modal.right.is-active .modal-card {
    transform: translateX(0);
}

/* Position the close button for modal-content structure */
.modal.right .modal-close {
    position: absolute;
    top: 10px;
    right: calc(30% + 10px); /* Position relative to the modal width */
    background-color: rgba(255, 255, 255, 0.7);
}

/* Add responsive adjustments for smaller screens */
@media screen and (max-width: 768px) {
    .modal.right .modal-content,
    .modal.right .modal-card {
        width: 80%; /* Wider on mobile for better readability */
    }

    .modal.right .modal-close {
        right: calc(80% + 10px); /* Adjust close button position */
    }
}

/* Bottom modal styles */
.modal.bottom {
    padding: 0;
    margin: 0;
}

.modal.bottom .modal-background {
    background-color: rgba(10, 10, 10, 0.86);
}

/* For modal-content structure */
.modal.bottom .modal-content {
    margin: 0;
    width: 100%;
    max-width: 100%;
    position: fixed;
    left: 0;
    bottom: 0;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    background-color: transparent;
    max-height: 80vh; /* Take up to 80% of the viewport height */
}

.modal.bottom .modal-content .box {
    border-radius: 12px 12px 0 0;
    margin: 0;
    overflow-y: auto;
    /* Add a subtle handle for better UX */
    background-image: linear-gradient(to right, transparent 42%, #ccc 42%, #ccc 58%, transparent 58%);
    background-size: 40px 5px;
    background-repeat: no-repeat;
    background-position: center 10px;
    /* Add space for the handle */
    padding: 25px 20px 20px;
}

/* For modal-card structure */
.modal.bottom .modal-card {
    margin: 0;
    width: 100%;
    max-width: 100%;
    position: fixed;
    left: 0;
    bottom: 0;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    max-height: 80vh; /* Take up to 80% of the viewport height */
}

.modal.bottom .modal-card-head {
    border-bottom: 1px solid #dbdbdb;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    /* Add a subtle handle for better UX */
    background-image: linear-gradient(to right, transparent 42%, #ccc 42%, #ccc 58%, transparent 58%);
    background-size: 40px 5px;
    background-repeat: no-repeat;
    background-position: center 10px;
}

.modal.bottom .modal-card-body {
    flex-grow: 1;
    overflow-y: auto;
}

.modal.bottom .modal-card-foot {
    border-top: 1px solid #dbdbdb;
    border-radius: 0;
}

/* Animation for sliding up from bottom */
.modal.bottom .modal-content,
.modal.bottom .modal-card {
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.modal.bottom.is-active .modal-content,
.modal.bottom.is-active .modal-card {
    transform: translateY(0);
}

/* Position the close button for modal-content structure */
.modal.bottom .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.7);
}

/* Add responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .modal.bottom .modal-content,
    .modal.bottom .modal-card {
        max-height: 95vh; /* Allow more height on mobile */
    }
}
