@keyframes show-from-top {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    min-height: 400px;
}

    .login-box .column {
        max-width: 350px;
    }

.ui.table tr td a.button.small:last-child {
    margin-right: 0;
}

.sortable .ui-sortable-helper a:not(.handle) {
    display: none;
}

.quick-toggler {
    padding: 0;
    margin: 0;
    height: 23px;
    background: none;
    border: none;
    outline: none;
    text-align: center;
    cursor: pointer;
}

    .quick-toggler i {
        display: none;
        animation: fade-in 0.3s ease-out;
    }

    .quick-toggler.active i.checkmark,
    .quick-toggler.active i.is-active {
        display: block;
    }
    
    .quick-toggler:not(.active) i.times,
    .quick-toggler:not(.active) i.not-active {
        display: block;
    }    

.is-empty-page {
    display: block;
    padding: 100px 30px;

    text-align: center;
    font-weight: bold;
}

#flash-messages {
    position: fixed;
    left: 0;
    top: 38px;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    
    opacity: 0;
    animation: show-from-top 0.3s ease-out 0.7s;
    animation-fill-mode: forwards;
}

    #flash-messages .message {
        margin-top: 0;
    }

    #flash-messages .close {
        position: absolute;
        top: 18px;
        right: 17px;

        cursor: pointer;
        opacity: 0.5;
        z-index: 1;

        transition: opacity 0.3s ease-out;
    }

    #flash-messages .close:hover {
        opacity: 0.8;
    }

.gallery {
    margin: 0;
    padding: 0;

    list-style: none;
}

    .gallery > li {
        overflow: hidden;
        display: flex;
        padding: 15px 0;

        flex-direction: row;
        justify-content: flex-start;
        align-items: flex-start;

        border-bottom: 1px solid rgba(34,36,38,.1);
    }

        .gallery > li:hover {
            background-color: rgba(0,0,0,.1);
        }

        .gallery > li:last-child {
            border-bottom: none;
        }

        .gallery > li > b {
            align-self: center;
            width: 30px;
            text-align: center;
            cursor: ns-resize
        }

        .gallery > li > div {
            flex: 1;
            display: flex;

            flex-direction: row;
            justify-content: flex-start;
            align-items: center;
        }

            .gallery > li > div .options {
                padding: 0 40px;
            }

                .gallery > li > div .options .checkbox {
                    display: block;
                    margin-bottom: 15px;
                }

                .gallery > li > div .options .checkbox:last-child {
                    margin-bottom: 0;
                }

            .gallery > li > div .pic-i18n {
                flex: 1;
                margin: 0 15px;
            }

                .gallery > li > div .pic-i18n .menu .item {
                    padding: 7px 12px;
                }

                .gallery > li > div .pic-i18n .menu .item.has-value {
                    color: #21ba45;
                }

                .gallery > li > div .pic-i18n .tab.segment {
                    padding: 10px;
                }

                    .gallery > li > div .pic-i18n .tab.segment .field {
                        margin-bottom: 8px;
                    }

                    .gallery > li > div .pic-i18n .tab.segment .field:last-child {
                        margin-bottom: 0;
                    }

            .gallery > li > div ol {
                flex: 1;
                padding: 0 15px 0 0;
                margin: 0;
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                justify-content: center;
                align-items: flex-start;

                list-style: none;
            }

                .gallery > li > div ol li {
                    padding: 0 10px;
                    text-align: center;

                    font-size: 13px;
                }

                    .gallery > li > div ol li img {
                        display: block;
                        max-width: 130px;
                        margin-bottom: 5px;
                    }

        .gallery > li > a {
            align-self: center;
            margin: 0 15px;
        }

            .gallery > li > a img {
                display: block;
            }
            
#orders-list {
    
}

    #orders-list.clicked > tbody > tr > td {
        opacity: 0.2;
    }
    
    #orders-list.clicked > tbody > tr.selected > td {
        opacity: 1;
    }
    
    #orders-list.clicked > tbody > tr.selected + tr > td {
        opacity: 1;
    }
    
    #orders-list.clicked > tbody > tr.selected + tr.items {
        display: table-row;
    }
    
    #orders-list .items {
        display: none;
    }
    
    #orders-list .items .table {
        width: 100%;
    }

    #orders-list tr {
        &:hover {
            .mark-orders {
                opacity: 1;
            }
        }

        td:has(.mark-orders) {
            position: relative;
        }

        .mark-orders {
            display: flex;
            justify-content: center;
            align-items: center;
            position: absolute;
            padding: 5px;
            top: 0;
            left: 0;
            cursor: pointer;
            opacity: 0;
            width: 26px;
            height: 26px;
            white-space: nowrap;

            background-color: rgba(0, 0, 0, 0.2);

            &:has(input:checked) {
                opacity: 1;
            }

            input {
                cursor: pointer;
            }
        }
    }

    #orders-list tfoot {
        .mark-orders {
            position: relative;
            background: inherit;
            opacity: 1;
            width: auto;
            font-size: 12px;

            input {
                margin-right: 5px;
            }
        }
    }

#order-items {
    padding: 0 0 0 50px;

    counter-reset: my-badass-counter;
}

    #order-items > .item {
        position: relative;
        margin-bottom: 10px;
        padding: 10px 15px 1px 15px;
        background-color: #f3f3f3;
        
        animation: show-from-bottom 0.3s ease-out;
    }

        #order-items > .item::before {
            position: absolute;
            content: counter(my-badass-counter, decimal);
            counter-increment: my-badass-counter;
            top: 0;
            left: -40px;

            font-size: 22px;
        }

        #order-items .mini {
            position: absolute;
            top: 30px;
            left: -40px;
            margin: 0;
            padding: 10px;
        }

        #order-items .mini.remove {
            top: 70px
        }

            #order-items > .item:only-child .mini.remove {
                display: none;
            }
            
#order-discounts {
    padding: 0 0 0 50px;

    counter-reset: my-badass-counter;
}

    #order-discounts .template {
        display: none;
    }

    #order-discounts .item {
        position: relative;
        margin-bottom: 10px;
        padding: 10px 15px 1px 15px;
        background-color: #f3f3f3;
        
        animation: show-from-bottom 0.3s ease-out;
    }

        #order-discounts .item::before {
            position: absolute;
            content: counter(my-badass-counter, decimal);
            counter-increment: my-badass-counter;
            top: 0;
            left: -40px;

            font-size: 22px;
        }

        #order-discounts .mini {
            position: absolute;
            top: 30px;
            left: -40px;
            margin: 0;
            padding: 10px;
        }
        
#order-messages {
    
}

    #order-messages .message.from-user {
        margin-left: 30px;
    }

        #order-messages .message small i {
            margin-right: 5px;
        }

        #order-messages .message small span {
            margin-right: 15px;
        }
        
.quick-status-update {

}

.quick-status-update .ui.toggle.checkbox input:checked ~ label {
    color: green !important;
}

.set-quick-status-button {
    position: relative;
}

.set-quick-status-button .check {
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
}

.set-quick-status-button.done span {
    visibility: hidden;
}

.set-quick-status-button.done .check {
    display: block;
}

#editor-js {
    max-width: 800px;
    padding: 15px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

#vouchers-product-quantities {
    margin-bottom: 20px;

    > b {
        display: block;
        margin-bottom: 10px;
    }

    ul {
        padding: 0;
        margin: 0;
        list-style: none;
        gap: 20px;
        flex-wrap: wrap;

        li {
            padding: 0;
            max-width: 400px;

            label {
                padding: 0 0 10px 0;
            }
        }
    }
}
/*
 * Waiting for reCAPTCHA or for the server after submit, same effect as the www
 * .button.is-loading. Fomantic's :disabled sets opacity .45 and
 * background-image: none with !important, so these need it too.
 */
.ui.button.is-loading,
.ui.button.is-loading:disabled {
    background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 0 10px, transparent 10px 20px) !important;
    background-size: 28.28px 28.28px;
    animation: stripes-move 0.8s linear infinite;
    opacity: 1 !important;
}

@keyframes stripes-move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 28.28px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui.button.is-loading {
        animation: none;
    }
}

.recaptcha-message {
    margin-top: 8px;
    color: #db2828;
}
