/* POPUP --> */
.mgPopup > div {
    position: relative;
    max-width: 800px;
    border-radius: 40px;
    margin-top: 40px;
    box-shadow: var(--blue) 3px 3px 0px 1px;
}

.mgPopup form { 
    padding: 0 40px 40px 40px; 
    color: var(--white);
}

.mgPopup form.gallery {
    background-image: url(../img/popupbg.png);
    background-size: cover;
    background-position: center;
    border-radius: 40px;
    overflow: hidden;
}

.mgPopup form h3 {
    font-size: 24px;
    text-align: center;
    margin: 20px 0;
}

.mgPopup form input.parent,
.mgPopup form input.child,
.mgPopup form input.email,
.mgPopup form input.birthday,
.mgPopup form input.phone,
.mgPopup form input.select {
    padding-right: 52px;
    background-repeat: no-repeat;
    background-position: center right;
    background-position: center right 10px;
    background-size: 38px 38px;
}

.mgPopup form table {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
    white-space: nowrap;
}

.mgPopup div.mgUpload {
    overflow: hidden;
    white-space: nowrap;
    border-radius: 10px;
    height: 44px;
}

.mgPopup div.mgUpload .uploaded,
.mgPopup div.mgUpload input[type=button] {
    display: inline-block;
    width: 50%;
    height: 44px;
    box-sizing: border-box;
    vertical-align: top;
    text-align: center;
    background-color: var(--input-bg);
    color: var(--white);
}

.mgPopup div.mgUpload .uploaded span {
    display: block;
    padding: 0 20px;
    color: var(--placeholder);
    line-height: 44px;
    font-weight: 400;
    font-size: 16px;
}

.mgPopup div.mgUpload input[type=button] {
    padding: 0 10px;
    background-color: var(--input-bg);

    font-family: NotoIKEALatin, sans-serif;
    color: var(--white);
    font-size: 16px;
    line-height: 34px;
    cursor: pointer;
    text-transform: uppercase;

    transition: background-color .5s ease, color .5s ease;

    border: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.mgPopup div.mgUpload input[type=button]:hover {
    background-color: var(--white);
    color: var(--text);
}

.mgPopup a {
    color: var(--white);
    text-decoration: underline;
}

.mgPopup a:hover { text-decoration: none; }

.mgPopup div.mgClose {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.mgPopup div.mgClose hr {
    position: absolute;
    top: 11px;
    left: 8px;
    border: none;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: background-color .5s ease;
}

.mgPopup div.mgClose hr:first-child { transform: rotate(45deg); }

.mgPopup div.mgClose hr:last-child { transform: rotate(-45deg); }

.mgPopup div.mgClose:hover hr { background-color: var(--blue); }

/* Mobile */
@media (max-width: 979.99px) {
    .mgPopup form > div:first-child { padding-top: 10px; }

    .mgPopup form > div:first-child > div > div { margin-bottom: 20px; }

    .mgPopup form > div.buttons { padding-top: 10px; }

    .mgPopup form > div.buttons > div:last-child {
        padding-top: 10px;
        text-align: right;
    }
}

/* Desktop */
@media (min-width: 980px) {
    .mgPopup form > div:first-child {
        display: flex;
        gap: 60px;
    }

    .mgPopup form > div:first-child > div { flex: 1; }

    .mgPopup form > div:first-child > div > div { margin-bottom: 20px; }

    .mgPopup form > div.buttons {
        display: flex;
        gap: 40px;
        margin-top: 20px;
    }

    .mgPopup form > div.buttons > div:last-child { align-self: flex-end; }
}

/* <-- POPUP */

main .galleryitem { margin: 30px auto; }

/* ITEM --> */
.galleryitem {
    border: none;
    background-color: var(--white);
    color: var(--blue);

    position: relative;

    max-width: 800px;
    border-radius: 40px;
    padding: 60px;
}

.galleryitem > div { text-align: center; }

.galleryitem p {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.galleryitem img.round { border-radius: 20px; }

.galleryitem a { text-decoration: none; }

.galleryitem a.share {
    background-color: var(--blue);
    display: inline-block;
    padding: 15px 40px 15px 40px;
    background-repeat: no-repeat;
    background-position: center right 15px;

    color: var(--white);
    font-size: 16px;
    font-weight: 700;

    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.galleryitem a.share:hover { background-color: var(--blue); }

.galleryitem a.vote {
    display: inline-block;
    position: relative;
    margin: 20px 0;
    padding: 10px 20px 10px 60px;

    font-size: 24px;
    font-weight: 700;
    color: var(--blue);

    cursor: pointer;
    transition: color 0.3s ease;
}

.galleryitem a.vote::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    background-color: var(--blue);
    -webkit-mask: url(../svg/gallery/heart.svg?v2) center / contain no-repeat;
    mask: url(../svg/gallery/heart.svg?v2) center / contain no-repeat;
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
}

.galleryitem a.vote:hover { color: var(--yellow); }

.galleryitem div.votes {
    display: flex;
    gap: 20px;
    max-width: 200px;
    text-align: left;
    margin: 0 auto;
}

.galleryitem div.votes strong {
    font-size: 32px;
    line-height: 32px;
}

.galleryitem div.votes small {
    font-size: 13px;
    line-height: 15px;
}

.galleryitem + .mgClose hr { background-color: var(--blue) !important; }

.galleryitem + .mgClose:hover hr { background-color: var(--blue) !important; }

/* Mobile */
@media (max-width: 799.99px) {
    .galleryitem > div:first-child { padding-bottom: 20px; }
}

/* Desktop */
@media (min-width: 800px) {
    .galleryitem > div {
        display: flex;
        gap: 60px;
    }

    .galleryitem > div > div { flex: 1; }
}
/* <-- ITEM */

/* LIST --> */
form.search {
    white-space: nowrap;
    border: 1px solid var(--border);
    overflow: hidden;
    border-radius: 22px;
    background-color: var(--white);
    box-shadow: var(--blue) 3px 3px 0px 1px;

    max-width: 480px;
    margin: 20px auto;
}

form.search input {
    border: none;
    vertical-align: top;
    width: calc(100% - 64px);
    color: var(--text);
    background-color: transparent;
}

form.search input::placeholder {
    color: var(--blue);
    opacity: 1;
}

form.search button {
    vertical-align: top;
    width: 64px;
    height: 44px;
    background-color: var(--white);
    box-sizing: border-box;
    background-image: url(../svg/search.svg?v3);
    background-repeat: no-repeat;
    background-size: 36px;
    background-position: center center;
    cursor: pointer;

    border: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.gallery .c43 > div {
    background-color: var(--white);
    border-radius: 20px;
    padding: 20px 20px 14px 20px;
    font-size: 14px;
    cursor: pointer;

    box-shadow: var(--blue) 3px 3px 0px 1px;
}

.gallery .c43 > div .thumb {
    position: relative;
    margin-bottom: 10px;
}

.gallery .c43 > div img {
    aspect-ratio: 4 / 3;
    width: 100%;
    object-fit: contain;
}

.gallery .c43 > div .more {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0 22px;
    background-color: var(--blue);
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
    line-height: 40px;
    text-transform: uppercase;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
}

.gallery .c43 > div:hover .more,
.gallery .c43 > div:focus-within .more {
    display: block;
}

.gallery .c43 > div a {
    display: inline-block;
    vertical-align: top;
    box-sizing: border-box;
    width: calc(100% - 60px);
    color: var(--blue);
    text-decoration: none;
    line-height: 24px;
}

.gallery .c43 > div > span {
    position: relative;
    color: var(--blue);
    display: inline-block;
    vertical-align: top;
    box-sizing: border-box;
    width: 60px;
    text-align: right;
    padding-right: 24px;
    line-height: 24px;
}

.gallery .c43 > div > span::after {
    content: "";
    position: absolute;
    right: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--blue);
    -webkit-mask: url(../svg/gallery/heart.svg?v2) center / contain no-repeat;
    mask: url(../svg/gallery/heart.svg?v2) center / contain no-repeat;
}

.paging { text-align: center; }

.paging a.arrow {
    display: inline-block;
    vertical-align: top;
    width: 30px;
    height: 30px;

    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px;

    color: transparent;
}

.paging a.arrow:first-child { background-image: url(../svg/gallery/arrow-left.svg); }

.paging a.arrow:last-child { background-image: url(../svg/gallery/arrow-right.svg); }

.paging a,
.paging strong,
.paging span {
    font-size: 22px;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    padding: 5px;
    line-height: 30px;
    vertical-align: top;
}

.paging strong {
    color: var(--white);
    background-color: var(--blue);
    width: 30px;
    height: 30px;
    box-sizing: border-box;
    border-radius: 15px;
    text-align: center;
    line-height: 20px;
    margin: 5px;
}

.gallery img.elmouse {
    position: absolute;
    top: 50px;
    right: 50px;
    z-index: -1;
}

.gallery img.elrab {
    position: absolute;
    bottom: 50px;
    left: 0;
    z-index: -1;
}


.gallery img.spaceship {
    position: absolute;
    bottom: 50px;
    right: 50px;
    z-index: -1;
}

@media (max-width: 499px) {
    form.search {
        margin: 20px 50px;
    }

    .paging { margin-bottom: 220px; }
}
/* <-- LIST */


/*SUCCESS START*/
svg.success path:first-child {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: success-dash 5s linear forwards;
}

svg.success path:last-child {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: success-dash 5s linear forwards;
    animation-delay: .5s;
}

@keyframes success-dash {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}
/*SUCCESS END*/

/*FAIL START*/
svg.failed path:first-child {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: failed-dash 5s linear forwards;
}

svg.failed path:nth-child(2) {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: failed-dash 5s linear forwards;
    animation-delay: .4s;
}

svg.failed path:last-child {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: failed-dash 5s linear forwards;
    animation-delay: .6s;
}

@keyframes failed-dash {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}
/*FAIL END*/