/* ---------------------- 
Stylesheet Guide
-------------------------

GENERAL
GRID
SKETCH TO IMG
COLORS
MEDIA QUERIES

*/

/* ================= GENERAL ================== */

.antimena-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 98;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    display: none;
}

#sketch-to-image-wrap {
    position: relative;
    z-index: 9;
    overflow: hidden;
    display: block;
    opacity: 0;
}

.sketch-to-image-buttons {
    padding-top: 5px;
}

.sketch-to-image-buttons button .material-icons {
    font-size: 18px;
}

#oai-variation,
#oai-edit,
#sai-imgtoimg-generate,
#sai-upscale,
#clipdrop-replace-background,
#clipdrop-upscale,
#clipdrop-uncrop {
    margin-top: 15px !important;
}

#antimena-oai-variation .arrow,
#antimena-oai-edit .arrow,
#antimena-sai-regenerator .arrow,
#antimena-sai-upscaler .arrow,
#antimena-clipdrop-remove-background .arrow,
#antimena-clipdrop-replace-background .arrow,
#antimena-clipdrop-remove-text .arrow,
#antimena-clipdrop-upscaler .arrow,
#antimena-clipdrop-inpainting .arrow,
#antimena-clipdrop-reimagine .arrow,
#antimena-clipdrop-uncrop .arrow {
    margin-left: 0;
}

#antimena-clipdrop-remove-background .palleon-control-desc,
#antimena-clipdrop-inpainting .palleon-control-desc,
#antimena-clipdrop-remove-text .palleon-control-desc {
    padding: 0 0 15px 0;
}

.palleon-control-desc.antimena-desc {
    padding-top: 10px
}

#sai-balance-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sai-balance-check {
    color: #fff;
    line-height: 1;
    transition: opacity 0.2s ease-in-out;
    opacity: 0.7;
}

#sai-balance-check .material-icons {
    font-size: 1.4rem;
}

#sai-balance-check:hover {
    opacity: 1;
}

#sai-balance-check.loading {
    -webkit-animation: palleonSpin 1s infinite linear;
    animation: palleonSpin 1s infinite linear;
    pointer-events: none;
    opacity: 0.7;
}

.antimena-user-credits {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    font-weight: 700;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.2;
}

.antimena-user-credits .material-icons {
    font-size: 1.1rem;
    margin-right: 0.25rem;
    color: #FFC107;
}

/* ================= GRID ================== */

.palleon-grid.antimena-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    row-gap: 1rem;
}

#oai-images.palleon-grid.antimena-grid,
#clipdrop-images.palleon-grid.antimena-grid {
    grid-template-columns: 1fr;
}

.antimena-grid.antimena-grid-placeholder,
.palleon-img-wrap.error {
    pointer-events: none;
}

.antimena-grid.antimena-grid-placeholder .palleon-img-wrap:before,
.palleon-img-wrap.error:before {
    font-family: 'Material Icons';
    content: 'landscape';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    font-size: 40px;
}

.palleon-img-wrap.error:before {
    content: 'image_not_supported';
}

.modal-ai-image-wrap {
    display: flex;
}

.modal-ai-image-column-left {
    padding-right: 0px;
    width: 65%;
    position: relative;
}

.modal-ai-image-column-right {
    padding-left: 40px;
    width: 35%;
}

.modal-ai-image-column-right ul.palleon-accordion {
    margin-bottom: 15px;
}

.modal-ai-image-wrap .palleon-form-field {
    margin: 0;
}

.modal-ai-image-wrap textarea {
    min-height: 140px;
    max-width: 100%;
}

.modal-ai-image-wrap .palleon-control-label {
    margin-bottom: 5px;
}

.modal-ai-image-inner-column {
    display: flex;
}

.modal-ai-image-inner-column>div {
    flex: 1;
}

.modal-ai-image-inner-column>div:first-child {
    padding-right: 5px;
}

.modal-ai-image-inner-column>div:last-child {
    padding-left: 5px;
}

.modal-ai-image-wrap .palleon-control-wrap {
    margin: 0 0 1rem 0;
}

.modal-ai-image-wrap .palleon-control-wrap:last-child {
    margin: 0;
}

#modal-ai-image .palleon-control-desc {
    padding: 0 0 15px 0;
    margin-top: -5px;
}

#modal-ai-image .palleon-control-desc:last-of-type {
    padding: 0;
}

.antimena-img-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

.antimena-img-card-inner {
    max-width: 240px;
    width: 100%;
    padding: 1.5rem;
    margin: auto;
}

.antimena-grid .palleon-masonry-item:hover .antimena-img-card {
    opacity: 1;
    visibility: visible;
}

.antimena-grid .palleon-masonry-item {
    cursor: inherit;
}

.antimena-img-seed-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.antimena-img-seed-wrap span {
    padding: 0 7px;
    font-weight: 700;
    font-size: 0.9rem;
}

.antimena-img-seed-wrap .palleon-form-field {
    padding: 7px 10px;
}

.antimena-img-select,
.antimena-img-save {
    margin-top: 0.5rem;
}

.antimena-img-btns .palleon-btn:hover {
    border-color: transparent
}

/* ================= SKETCH TO IMG ================== */

#sai-text-to-text-tab .modal-ai-image-column-left {
    width: 70%;
}

#sai-text-to-text-tab .modal-ai-image-column-right {
    width: 30%;
}

#sketch-to-image-wrap {
    position: relative;
    z-index: 9;
    overflow: hidden;
    display: block;
    opacity: 0;
}

.sketch-to-image-buttons {
    padding-top: 5px;
}

.sketch-to-image-buttons button .material-icons {
    font-size: 18px;
}

#clipdrop-sketch-images {
    grid-template-columns: 1fr;
    margin-bottom: 15px;
}

#clipdrop-sketch-images.antimena-grid-placeholder {
    display: none;
}

#clipdrop-sketch-to-image-tab .palleon-control-desc {
    margin-top: 10px;
}

#sketch-to-image-prompt {
    min-height: 100px;
}

/* ================= COLORS ================== */

/* DARK THEME */

body.dark-theme #sketch-to-image-wrap {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='%23000000'/%3E%3C/svg%3E") left top/contain #333;
    background-size: 15px 15px;
}

body.dark-theme .antimena-loader {
    background: #121212;
}

body.dark-theme .palleon-grid.antimena-grid .palleon-masonry-item-inner {
    border: 1px solid #303030 !important;
}

body.dark-theme .antimena-img-card {
    background: rgba(18, 18, 18, 0.8);
}

body.dark-theme .antimena-img-card-inner {
    background: #121212;
    border: 1px solid #303030;
}

body.dark-theme .antimena-img-seed-wrap {
    background: #303030;
}

body.dark-theme .antimena-img-seed-wrap span {
    color: #fff;
}

body.dark-theme .antimena-img-seed-wrap .palleon-form-field {
    border: 1px solid #303030;
}

body.dark-theme .antimena-user-credits {
    border: 1px solid #303030;
}

body.dark-theme #sketch-to-image-wrap {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='%23000000'/%3E%3C/svg%3E") left top/contain #333;
    background-size: 15px 15px;
}

/* LIGHT THEME */

body.light-theme #sketch-to-image-wrap {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='%23FFFFFF'/%3E%3C/svg%3E") left top/contain #ccc;
    background-size: 15px 15px;
}

body.light-theme .antimena-loader {
    background: #fff;
}

body.light-theme .palleon-grid.antimena-grid .palleon-masonry-item-inner {
    border: 1px solid #bcbcbc !important;
}

body.light-theme .antimena-img-card {
    background: rgba(255, 255, 255, 0.5);
}

body.light-theme .antimena-img-card-inner {
    background: #fff;
    border: 1px solid #bcbcbc;
}

body.light-theme .antimena-img-seed-wrap {
    background: #bcbcbc;
}

body.light-theme .antimena-img-seed-wrap span {
    color: #111;
}

body.light-theme .antimena-img-seed-wrap .palleon-form-field {
    border: 1px solid #bcbcbc;
}

body.light-theme .antimena-user-credits {
    border: 1px solid #bcbcbc;
}

body.light-theme #sketch-to-image-wrap {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='%23FFFFFF'/%3E%3C/svg%3E") left top/contain #ccc;
    background-size: 15px 15px;
}

/* ================= MEDIA QUERIES ================== */

@media only screen and (max-width: 900px) {

    #sai-text-to-text-tab .modal-ai-image-column-left,
    .modal-ai-image-column-left {
        width: 60%;
    }

    #sai-text-to-text-tab .modal-ai-image-column-right,
    .modal-ai-image-column-right {
        width: 40%;
    }

    .palleon-grid.antimena-grid {
        grid-template-columns: 1fr;
    }
}

@media only screen and (max-width: 700px) {
    .modal-ai-image-wrap {
        display: block;
    }

    #sai-text-to-text-tab .modal-ai-image-column-left,
    #sai-text-to-text-tab .modal-ai-image-column-right,
    .modal-ai-image-column-left,
    .modal-ai-image-column-right {
        width: 100%;
        padding: 0;
    }

    .modal-ai-image-column-left {
        padding-bottom: 1rem
    }

    #sketch-to-image-wrap {
        margin-bottom: 30px;
    }
}