body {
    min-width: 320px;
}

#signin, #signup, #verify, #loader {
    position: absolute;
    left: 0px;
    right: 0px;
    top: 0px;
    bottom: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.signin-block, .signup-block, .verify-block {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
}

.menu-item {
    border: 1px solid #dee2e6;
    border-radius: 0.3em;
    padding: 0.3em;
    margin-top: 0.5em;
}

.menu-btn {
    padding: 0.3em;
}

#global-result {
    position: absolute;
    bottom: 30px;
    width: 90vw;
    left: 5vw !important;
    bottom: 30px;
    z-index: 1000000;
}

#to-forgot {
    cursor: pointer;
}

#to-forgot:hover {
    text-decoration: none !important;
}

.user-avatar {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1;
    background: #dee2e6;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    margin-bottom: 1rem;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.shop-img {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1;
    background: white;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    margin-bottom: 1rem;
}

.shop-img img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.shop-item p.title {
    font-size: 1.5em;
    font-weight: bolder;
    text-align: center;
}

.hr {
    width: 100%;
    height: 1px;
    background: #dee2e6;
}

#loader {
    z-index: 10000000;
}

#settings-avatar-file {
    display: none !important;
}

#page-loader {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-text {
    margin-left: 15px;
}

.page {
    min-height: 100vh;
    padding: 1rem;
}

#name-constructor-list, #calendar-constructor-list {
    width: 100%;
    height: 100%;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    overflow: auto;
    order: 1;
    padding: 15px;
    text-align: center;
}

#calendar-constructor-tmp {
    position: absolute;
    left: -1000px;
}

#calendar-constructor-tmp .line-edit {
    background: white !important;
}

.a4 {
    width: 793.70px;
    height: 1122.52px;
    padding: 2rem !important;
    padding-bottom: 4rem !important;
    position: relative;
    overflow: hidden;
    font-size: 20px;
}

.btn {
    white-space: nowrap;
}

.calendar-td {
    position: relative;
}

.calendar-td .num {
    position: absolute;
    left: 0px;
    top: 0px;
    font-size: 12px;
    font-weight: bold;
}

.calendar-table td.enabled:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    cursor: pointer;
}

.calendar-table-ex {
    width: 100%;
    table-layout: fixed;
    margin-top: 30px;
    border-collapse: separate;
    background: black;
}

.calendar-table-ex td, .calendar-table-ex th {
    background: white;
    position: relative;
}

.calendar-table-ex .line-edit {
    position: absolute !important;
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
}

.calendar-table-ex td {
    height: 200px;
    overflow: hidden;
}

.calendar-table th {
    padding: 2px;
    font-weight: bold;
}

.calendar-table-ex td {
    height: 200px;
}

#calendar-constructor-list-content .bg {
    width: 100%;
}

#calendar-title-image {
    margin-right: -20%;
    height: 75px;
}

.calendar-table td, .calendar-table th {
    padding: 2px;
    background: white;
}

.calendar-table {
    table-layout: fixed;
    width: 100%;
    background: black;
    border-collapse: separate;
    text-align: center;
}

.calendar-tr {
    display: flex;
    justify-content: space-between;
}

.calendar-name-image {
    height: 50px;
    margin-left: calc(100% / 7 * 4);
    transform: translateX(-50%);
}

.calendar-table td.day-off-green {
    background: rgb(220, 255, 220) !important;
}

.calendar-table td.day-off-yellow {
    background: rgb(255, 255, 200) !important;
}

.calendar-table td.disabled {
    background: rgb(217, 217, 217) !important;
}

.calendar-table td.week-day {
    text-align: center;
    font-weight: bold;
}

.calendar-table td .cube {
    aspect-ratio: 1 / 1;
}

#name-constructor-list-content, #calendar-constructor-list-content {
    border: 1px solid #dee2e6;
    display: inline-block;
}

#name-constructor-list-content .a4 {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 1fr);
    gap: 1rem;
}

#name-constructor-list-content .item-row {
    display: flex;
    gap: 1rem;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

#name-constructor-list-content .item {
    overflow: hidden;
    height: 100%;
    aspect-ratio: 0.7;
    max-width: 100px;
    position: relative;
    display: flex;
    align-items: center;
}

#name-constructor-list-content .item.line img {
    visibility: hidden;
}

#name-constructor-list-content .item img {
    width: 100%;
}

#name-constructor-list-content .item.line div {
    position: absolute;
    left: 0px;
    right: 0px;
    bottom: 0px;
    height: 0.2rem;
    background: black;
}

.name-constructor-content, .calendar-constructor-content {
    display: flex;
    flex-direction: row;
    position: relative;
    width: 100%;
    overflow: hidden;
}

#name-constructor, #calendar-constructor {
    height: calc(100vh - 2rem);
    overflow: hidden;
}

#name-constructor-photos, #calendar-constructor-elements {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    overflow: auto;
}

#name-constructor-photos .item, #calendar-constructor-elements .item {
    position: relative;
    display: flex;
    gap: 5px;
    margin-top: 15px;
    min-width: 30px;
}

.calendar-element-remove {
    display: none;
    position: absolute;
    right: calc(50% - 10px);
    top: -25px;
    z-index: 100;
    border: 1px solid darkred;
    border-radius: 20px;
    background: darkred;
    color: white !important;
    font-weight: bold;
    padding: 1px;
    line-height: 16px;
    font-size: 16px;
    width: 20px;
    height: 20px;
}

.calendar-element-remove:hover {
    background: red !important;
}

#name-constructor-photos .item, #calendar-constructor-elements .item-image {
    aspect-ratio: 1;
}

#name-constructor-photos .item:first-child, #calendar-constructor-elements .item:first-child {
    margin-top: 0px;
}

#name-constructor-photos .item-image, #calendar-constructor-elements .item-image {
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
}

#name-constructor-photos .item img, #calendar-constructor-elements .item img {
    width: 100%;
    height: 100%;
}

#calendar-constructor-elements .item {
    border: 1px solid #dee2e6;
    box-sizing: border-box;
    padding: 2px;
    border-radius: 5px;
    min-height: 30px;
    user-select: none;
    display: flex;
    justify-content: space-between;
}

#calendar-constructor-edit-text-search {
    max-height: 50vh;
    overflow-y: auto;
}

#calendar-constructor-edit-text-search .text-title {
    color: darkgray;
}

#calendar-constructor-edit-text-search .text-block {
    padding: 0px 15px;
}

#calendar-constructor-edit-text-search .text {
    padding: 2px 15px;
}

#calendar-constructor-edit-text-search .txt:hover {
    cursor: pointer;
    color: #0a58ca;
}

#calendar-constructor-edit-text-search i.added {
    color: green;
}

#calendar-constructor-edit-text-search i:hover {
    color: red;
    cursor: pointer;
}

#name-constructor-photos .item-remove {
    height: 20px;
    flex: 20px 0 0;
    display: flex;
    padding: 0;
    justify-content: center;
    width: 20px;
    align-items: center;
    line-height: 20px;
}

.is-admin #name-constructor-photos {
    top: calc(115px + 0.5rem);
}

.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#calendar-constructor-edit-preview {
    padding: 15px;
    text-align: center;
    white-space: normal;
    word-break: normal;
    overflow: hidden;
}

.calendar-element {
    position: absolute;
    border: 1px solid transparent;
    box-sizing: border-box;
    cursor: pointer;
    width: 100px;
    height: 100px;
    padding: 2px;
}

.calendar-element .text {
    white-space: normal;
    word-wrap: normal;
    word-break: break-all;
    overflow: hidden;
    height: 100%;
    vertical-align: middle;
    text-align: left;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-element.image {
    width: 100px;
    height: 100px;
    min-width: 30px;
    min-height: 30px;
}

.calendar-element .image {
    width: 100%;
    height: 100%;
}

.calendar-element .image img {
    width: 100%;
    height: 100%;
}

#calendar-editor-helper {
    margin-left: 5px;
}

.calendar-element.selected .calendar-element-remove {
    display: block !important;
}

.calendar-element:hover, .calendar-element.selected {
    border-color: red !important;
    border-radius: 5px;
    z-index: 2;
}

body.is-user .is-admin {
    display: none !important;
}

.calendar-table-ex {
    table-layout: fixed;
}

.calendar-table-top {
    table-layout: fixed;
    width: 100%;
    margin-bottom: 30px;
}

.calendar-table-bottom {
    table-layout: fixed;
    width: 100%;
}

.calendar-table-bottom .line {
    border-bottom: 2px solid black;
}

.calendar-table-ex th, .line td, .line th {
    position: relative;
    height: 30px;
    vertical-align: middle;
    text-align: center;
}

.line.disabled {
    border: none;
}

.no-border {
    background: transparent;
}

#month-images, #letter-images {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

#month-images .item, #letter-images .item {
    width: calc(20% - 8px);
    border: 2px solid black;
    border-radius: 5px;
}

#month-images .item.selected, #letter-images .item.selected {
    border: 2px solid green;
    background: rgb(0, 255, 0, 0.2);
}

#month-images .item:hover, #month-images .item.active, #letter-images .item:hover, #letter-images .item.active {
    border: 2px solid red;
    background: rgba(255, 0, 0, 0.2);
    cursor: pointer;
}

#month-images .item img, #letter-images .item img {
    width: 100%;
    aspect-ratio: 1;
}

#month-images .item-name {
    display: none;
}

#month-images .item-name, #letter-images .item-name {
    width: 100%;
    padding: 2px;
    text-align: center;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    font-size: 16px;
}

.calendar-element .ui-resizable-se {
    width: 9px !important;
    height: 9px !important;
    bottom: -5px !important;
    right: -5px !important;
}

.calendar-element.selected .ui-resizable-ne, .calendar-element.selected .ui-resizable-se, .calendar-element.selected .ui-resizable-sw, .calendar-element.selected .ui-resizable-nw {
    background: red !important;
}

#draft-list .item-control {
    display: flex;
    justify-content: right;
    gap: 10px;
    flex-direction: row;
    flex-wrap: nowrap;
}

.line-edit {
    position: relative !important;
    text-align: left !important;
    vertical-align: top !important;
    padding: 0px 5px !important;
    width: 100%;
}

.line-edit.text-center {
    text-align: center !important;
    vertical-align: middle !important;
}

th.line-edit input, th.line-edit textarea {
    font-weight: bold !important;
}

.line-edit.text-center input, .line-edit.text-center textarea {
    text-align: center !important;
    vertical-align: middle !important;
}

.line-edit:hover {
    background: #ffda6a !important;
    cursor: pointer !important;
}

.line-edit .text {
    height: 100%;
}

.line-edit input, .line-edit textarea {
    outline: none !important;
    border: none !important;
    position: absolute;
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
    background: #51A351;
    padding: 0px 5px !important;
    line-height: 30px;
}

.line-edit textarea {
    resize: none;
    overflow: hidden;
}

.calendar-table-top .line td {
    font-size: 20px;
    line-height: 20px;
    vertical-align: bottom;
    white-space: nowrap;
}

.calendar-table-top .line td.no-border {
    border-bottom: none;
}

.clanedar-table-ex th {
    position: relative;
}

.calendar-table-ex .th-hint {
    position: absolute;
    text-align: center !important;
    margin-top: -32px;
    height: 30px;
    width: 100%;
}

.copyright {
    position: absolute;
    width: 40%;
    bottom: 20px;
    left: 30%;
    height: 25px;
}

.copyright img {
    width: 100%;
}

.calendar-table-ex .underline {
    height: 30px !important;
}

.calendar-table-ex .th-hint input {
    text-align: center !important;
    font-weight: bold !important;
}

.calendar-table-ex .underline {
    height: 30px;
}

.treeview .list-group-item {
    display: flex;
}

.treeview span.node-icon {
    width: 5px !important;
    margin: 0px !important;
}

.treeview .badge {
    position: absolute;
    right: 15px;
    font-size: 20px;
    color: #0d6efd;
    padding: 0px;
    top: calc(50% - 10px);
}

.treeview span.no-icon, .treeview span.no-icon + span {
    margin: 0 !important;
    width: 0px !important;
}

@media (max-width: 991.99px) {
    .page {
        padding-left: 0px;
        padding-right: 0px;
    }

    #signout-btn {
        width: 100%;
    }

    #name-constructor-photos, #calendar-constructor-elements {
        flex-direction: row;
        display: flex;
        padding-bottom: 50px;
    }

    #name-constructor-photos .item, #calendar-constructor-elements .item-image {
        aspect-ratio: 1;
    }

    #calendar-constructor-elements .element-text {
        max-width: 100px;
    }

    #name-constructor-photos .item, #calendar-constructor-elements .item {
        margin-top: 0px;
        margin-left: 15px;
    }

    #name-constructor-photos .item:first-child, #calendar-constructor-elements .item:first-child {
        margin-left: 0px;
    }
}