:root {
    --c-red: #e673ac;
    --c-white: #fff;
}

input[type="checkbox"] {
    background-color: #2398aa !important;
}

body {
    background-color: #f9f9f9;
}

.root {
    position: relative;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    align-items: center;
    grid-gap: 16px;
    padding: 16px 32px;
    background-color: white;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    margin-bottom: 12px;
}

.header-inner {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1240px;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 20;
    display: flex;
    align-items: center;
    grid-gap: 16px;
    padding: 16px 32px;
    background-color: white;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    margin-bottom: 12px;
}

.layout {
    margin: 0 auto;
    padding: 16px 32px;
    background-color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    justify-content: center;
    align-items: center;
}

.fixed {
    margin: 0 auto;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    height: 100%;
    padding-top: 80px;
    width: 100%;
}

.flex-sidebar {
    padding: 24px;
    border-top-right-radius: 16px;
    background-color: white;
    margin-right: 8px;
}

.flex-content {
    padding: 36px;
    border-top-left-radius: 16px;
    background-color: white;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    height: calc(100vh - 80px);
    overflow: auto;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    background: #eee;
}

.grid-content {
    padding: 24px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    background-color: white;
    overflow: auto;
    box-sizing: border-box;
    overflow-y: scroll;         /* включаем вертикальный скролл */
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE/Edge */
}

.grid-content::-webkit-scrollbar {
    display: none;              /* Chrome, Safari */
}

main {
    flex: 1;
    display: flex;
    width: 100%;
}

a, a:hover, a:focus {
    text-decoration: none;
    color: darkred;
}

h1 {
    font-size: 24px;
    line-height: 1.2;
}

h2 {
    font-size: 20px;
    line-height: 1.2;
    color: #333;
}

.auth-layout {
    min-height: 100vh;
}

.auth-main {
    width: 360px;
}

.auth-main img {
    max-width: 240px;
}

.auth-aside {
    background-color: #333;
    background-image: url("/public/images/cover.jpg");
    background-position: center;
    background-size: cover;
}

/*.flex-sidebar {
    width: 20%;
    height: 100vh;
    background-color: #f6f6f6;
    position: fixed;
}*/

/*.flex-content {
    margin-left: 20%;
    padding: 24px 18rem;
}*/

.flex-menu {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.flex-logo {
    display: flex;
    padding: 24px 12rem 24px 10rem;
    font-weight: bold;
}

.flex-menu a {
    display: flex;
    align-items: center;
    padding: 10px 12rem;
    color: #555;
    text-overflow: ellipsis;
    overflow: hidden;
    font-weight: 300;
    border-left: 6px solid transparent;
}

.flex-menu a:first-child {
    font-weight: bold;
}

.flex-menu a:hover {
    background-color: #ffffff;
}

.flex-menu a.active {
    border-left-color: darkred;
}

.profile {
    display: flex;
    align-items: center;
    margin-top: auto;
    border-radius: 0;
    padding: 24px 36px 24px;
    grid-gap: 12px;
    flex-wrap: nowrap;
    position: sticky;
    bottom: 0;
}

.avatar {
    display: flex;
    flex-shrink: 0;
    background-color: #536d96;
    opacity: .6;
    font-size: 12px;
    color: white;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 18px;
}

.content {
    flex-grow: 1;
    min-width: 0;
    padding-bottom: 48px;
}

.content > *, .card > *, .sidebar > * {
    margin-bottom: 24px;
}

.content > *:last-child, .card > *:last-child {
    margin-bottom: 0;
}

.sidebar {
    padding: 0 32px;
    flex: 0 0 300px;
}

input:focus {
    outline-color: #ddd !important;
}

.card {
    counter-reset: todo;
}

.card.padless {
    padding: 0 !important;
}

input[required] {
    background-image: url('/public/images/as.svg');
    background-repeat: no-repeat;
    background-position: right 0.15em center;
    padding-right: 32px !important;
}

.notify {
    width: 80%;
    min-width: 300px;
    max-width: 350px;
    padding: 10px 30px 10px 20px;
    border-radius: 4px;
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 100501;
    background-color: black;
    color: white;
}

.box, .todo {
    color: #555;
    font-size: 16px;
    background-color: #f6f6f6;
    border-radius: 8px;
    counter-reset: todo;
}

.todo.white {
    background-color: white;
}

.todo > *:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.todo > *:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.todo .active {
    border-radius: 8px;
    color: black !important;
    background-color: #eee;
}

.todo > a, .todo > button {
    display: flex;
    padding: 3rem 8rem;
    border: none;
    background-color: transparent;
    width: 100%;
}

.todo > a:hover, .todo > button:hover {
    background-color: #eaeaea;
}

.todo > * + a, .todo > * + button {
    border-top: 2px solid #fff;
}

.todo.white > * + a, .todo.white > * + button {
    border-top: 2px solid #eee;
}

.count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(53, 63, 82, .1);
    font-size: 14px;
    border-radius: 20px;
    padding: 0 16px;
    height: 28px;
    font-weight: 400;
    min-width: 50px;
    text-align: center;
    line-height: 1.4;
    font-family: Roboto, sans-serif;
}

.label {
    text-decoration: none !important;
}

.label-rounded {
    padding: 8px 16px !important;
    border-radius: 32px;
}

.label-secondary {
    color: white;
    background-color: #9580ff;
}

a.label-secondary:hover {
    color: white;
    background-color: #7d65f4;
}

.filter {
    grid-gap: 5px;
    display: flex;
    margin-bottom: 6rem;
}

.filter input {
    padding-left: 48px;
    background: #f8f8f8 url(/public/images/q.svg) no-repeat 14px;
    background-size: 20px 20px;
    width: 400px;
    max-width: 400px;
    flex-shrink: 0;
}

th {
    color: #555;
    font-weight: normal !important;
}

tbody > tr:hover {
    background-color: #fafafa;
}

th[hx-post] {
    cursor: pointer !important;
}

th.asc:after {
    content: '↑';
}

th.desc:after {
    content: '↓';
}

.bar {
    font-size: 14px;
    display: flex;
    align-items: center;
}

table {
    border-top: 2px solid #eee;
}

.bar a:first-child {
    padding: 1rem 3rem;
    margin-right: 3rem;
    border-radius: 5px;
    background-color: #EEEEEE;
}

.card-bar {
    display: flex;
    align-items: center;
}

.card-bar a {
    margin-left: auto;
    font-size: 14px;
}

.overflow {
    overflow-x: hidden;
}

.overflow > div {
    overflow-x: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dialog */

#dialog {
    max-width: 100%;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation-name: fadeIn;
    animation-duration: 150ms;
    animation-timing-function: ease;
}

.dialog-underlay {
    position: absolute;
    z-index: 20;
    top: 80px;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(200, 210, 218, 0.4);
    cursor: pointer;
}

.pointer {
    cursor: pointer;
}

.dialog-content {
    height: cal(100vh - 80px);
    max-width: 100%;
    background-color: white;
    animation-name: slideIn;
    animation-duration: 150ms;
    animation-timing-function: ease;
    position: absolute;
    top: 80px;
    bottom: 0;
    right: 0;
    width: min(90%, 1280px);
    border: 1px solid  rgba(0, 0, 0, .25);
    border-top-left-radius: 24px;
    z-index: 45;
    overflow-y: auto;
    padding: 0 48px;
}

.dialog-header {
    display: flex;
    padding: 12rem 0;
    align-items: center;
    background-color: white;
    grid-gap: 16px;
}

.dialog-header img {
    border-radius: 6px;
}


.dialog-header-fixed {
    top: 0;
    position: sticky;
    padding: 12rem 0;
    display: flex;
    justify-content: center;
}

.dialog-enlarge {
    padding: 0 1rem;
    overflow-x: auto;
}

.dialog-close {
    cursor: pointer;
    margin-left: auto;
}

body.sticky, body.open, body.open-sb {
    overflow: hidden;
    /* height: 100vh; */
}

/* dialog ends */

.button.active {
    background-color: #ccc;
}

.trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
}

.trigger-lg {
    width: 36px;
    height: 36px;
    background-color: #fafafa;
}

.trigger:hover {
    background-color: #e1e1e1;
}

.w100 {
    width: 100%;
}

.table td a, .items td a {
    display: block;
    margin: -.75em 0;
    padding: .75em 0;
}

.item-grid {
    display: flex;
    flex-wrap: wrap;
    text-align: center;
}

.item-card {
    display: block;
    padding: 0 20px 20px 0;
    width: 266px;
    text-align: left;
}

.item-image {
    height: 360px;
    border-radius: 6px;
    padding: 16px;
    display: flex;
    align-self: center;
}



.card img {
    display: flex;
    border-radius: 6px;
}

.todo.wizard {

}

.todo.wizard > *:before {
    width: 12px;
    height: 12px;
    border-radius: 12px;
    justify-content: center;
    align-items: center;
    counter-increment: todo;
    background-color: #ccc;
    display: inline-flex;
    content: "" /* counter(todo)*/;
    margin-top: 6px;
    margin-right: 12px;
    /*color: white;*/
    font-size: 14px;
}

.todo.wizard > *.active:before {
    background-color: darkred;
}

.drag:before {
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
    font-size: 14px;
    padding: 16px;
    width: 24px;
    opacity: .6;
    text-align: center;
    counter-increment: todo;
    content: counter(todo);
}

.hovered > *:hover {
    background-color: #eee;
}

.button-error {
    background: var(--c-red);
    color: var(--c-white);
}

.button-error:hover {
    background-color: gray;
    color: var(--c-white);
}

.stack > a {
    display: block;
    padding: 8px 0;
    margin: 0;
}

.table th, table th {
    /*padding: 6px 0;*/
    font-size: 14px;
    color: gray;
}

.cta {
    font-size: 18px;
    line-height: 1.5;
}

h1 {
    font-size: 32px;
}

.sortable-ghost {
    background-color: #eee;
}

#sortable {
    counter-reset: todo;
}

.stack-with-border {
    border-top: 2px solid #eee;
    border-bottom: 1px solid #eee;
}

input[type=file] {
    display: none;
}

#cart-amount, .cart-size {
    display: flex;
    align-items: center;
    width: 64px;
    height: 28px;
    line-height: 1.5;
    font-size: 13px;
    background-color: #d90022;
    opacity: .8;
    border-radius: 24px;
    color: #fff;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.cart-size {
    background-color: #777;
}

.cia {
    width: 36px;
    height: 36px;
    background-position: 50% center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    border-radius: 20px;
}

.cia:hover {
    background-color: #f4f4f4 !important;
}

.cia-add {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.464 10V5.536H0V4.464h4.464V0h1.072v4.464H10v1.072H5.536V10z' fill='%23727D38' fill-rule='nonzero'/%3E%3C/svg%3E");
}

.cia-remove {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 1.571V.5h10v1.071z' fill='%23727D38' fill-rule='nonzero'/%3E%3C/svg%3E");
}

.cia-cancel {
    background-image: url("data:image/svg+xml,%3Csvg width='11' height='11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.119 10.35.35 9.581 4.581 5.35.35 1.119 1.119.35 5.35 4.581 9.581.35l.769.769L6.119 5.35l4.231 4.231-.769.769L5.35 6.119z' fill='%23727D38' fill-rule='nonzero'/%3E%3C/svg%3E");
}

.cart-input {
    border: none;
    background-color: transparent !important;
    cursor: default;
    width: 60px !important;
    background-color: #eee !important;
    line-height: 2;
    font-size: 16px;
    flex-shrink: 0;
    height: 36px;
    text-align: center;
    border-radius: 15px;
}

hr {
    height: 0;
    border-bottom: 2px solid #eee;
}

.cart-image {
    width: 60px;
    height: 60px;
    background-color: #eee;
    border-radius: 5px;
    flex-shrink: 0;
}

section {
    padding: 22px 40px 60px;
    width: 400px;
}

footer {
    bottom: 20px;
    font-size: 16px;
    line-height: 16px;
    padding: 16px 0;
    position: relative;
    text-align: center;
}

.button-block {
    width: 100%;
}

footer ul li:not(:first-of-type)::before {
    background-color: rgb(255, 255, 255);
    border-radius: 50%;
    color: rgb(36, 36, 36);
    content: "\2022";
    height: 4px;
    margin-right: 4px;
    vertical-align: middle;
    width: 4px;
}

ul {
    margin: 0;
    padding: 0;
}



footer ul li + li {
    margin-left: 0;
}

footer ul li {
    display: inline-block;
    margin: 0 4px;
}

.button {
    border-radius: 48px;
}

.button-primary {
    background-color: #2398aa;
}

.button-primary:hover, .button-primary:focus {
    background-color: #1d7f90;
}

.product {
    background-color: #f0f4f8;
    border-radius: 8px;
    padding: 24px;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.product-header {
    font-size: 16px;
    max-width: 70%;
    line-height: 1.2;
}

.product-content {
    flex-grow: 1;
}

.banner-1 { background-color: #f0f4f8; color: #2398aa; }
.banner-2 { background-color: #e8ecf1; color: #333; }
.banner-3 { background-color: #f3f5f0; color: #1e1e1e; }


.grid-sidebar {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    background: #eee;
    border-top-right-radius: 16px;
    display: flex;
    flex-direction: column;
}

.cart-header,
.cart-footer {
    padding: 16px;
    z-index: 3;
}

.cart-header {
    position: sticky;
    top: 0;
}

.cart-footer {
    position: sticky;
    bottom: 0;
}

.cart-items {
    overflow-y: auto;
    flex-grow: 1;
    padding: 16px;
    overflow-y: scroll;         /* включаем вертикальный скролл */
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE/Edge */

    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

}

.cart-items::-webkit-scrollbar {
    display: none;              /* Chrome, Safari */
}

.page-body > * + * {
    margin-top: 24px;
}

.page-title {
    margin-bottom: 24px;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flex-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.grade {
    display: flex;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: white;
    border-radius: 18px;
    flex-shrink: 0;
}

.grade.score0 {
    background-color: white;
}

.grade.score1, .grade.score2, .grade.score3 {
    background-color: lightpink;
}

.grade.score4, .grade.score5 {
    background-color: darkseagreen;
}

.grade.grade0 {
    background-color: #eee;
}

.grade.grade1 {
    background-color: lightpink;
}

.grade.grade2 {
    background-color: yellow;
}

.grade.grade3 {
    background-color: darkseagreen;
}

.grade.grade4 {
    color: white;
    background-color: #536d96;
}

.grade.grade5 {
    background-color: white;
}

.grade.grade6 {
    background-color: lightgreen;
}

.box {
    color: #555;
    font-size: 16px;
    background-color: #fafafa;
    border-radius: 8px;
}

.box-block {
    font-size: 16px;
    padding: 24px;
}

.question {
    display: flex;
}

.question-prompt {
    flex: 1;
    padding: 28px 28px 28px 0;
}

.question-num {
    padding: 28px 0 28px 28px;
    display: flex;
    width: 116px;
    flex-shrink: 0;
    flex-grow: 0;
    font-weight: bold;
    font-size: 18px;
}

.num-label {
    display: flex;
    flex-grow: 0;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 60px;
    background-color: #626d88;
    color: white;
}

.box + .box {
    margin-top: 2rem;
}

.box-table td {
    padding: 5px 10px;

}

.feature {
    font-size: 16px;
    display: grid;
    grid-template-columns: auto auto;
    color: #333;
}

.feature-flex {
    font-size: 16px;
    display: flex;
    align-items: center;
    color: #333;
    border-top: 1px solid #ddd;
    padding: 2rem 6rem;
}

.feature.w80 {
    grid-template-columns: 80% 20%;
}

.feature > *, .order-item > * {
    padding: 1rem 2rem;
}

.feature > *:nth-child(odd) {
    color: #999;
}

.feature > *:nth-child(even) {
    /*font-weight: bold;*/
    text-align: right;
    word-break: break-all;
}

* + .feature {
    border-top: 1px solid #ddd;
}

.answer {
    background-color: #eee;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
}

.answer-hint {
    font-size: 14px;
    border-radius: 10px;
    padding: 1rem 2rem;
    margin-top: 2rem;
    background-color: white;
}

.answer div + div {
    margin-top: 1rem;
}

.flex-card {
    border-radius: 12px;
    padding: 24px;
    display: flex;
    grid: 12px;
    justify-content: space-between;
    background-color: #fafafa;
}

.htmx-indicator {
    flex-shrink: 0;
    opacity: 0;
    display: none;
    transition: opacity 500ms ease-in;
}
