.modal{
    position: fixed;
    padding: 0 0.5rem;
    width: 100%;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s all ease;
    z-index: 999;
    pointer-events: auto;
}
.modal.dash-e{
    padding: 0 1rem;
}
.modal.show{
    opacity: 1;
    visibility: visible;
}
.modal-bg{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-4);
    backdrop-filter: blur(5px);
    transition: 0.3s all ease;
}
.modal-struc{
    position: relative;
    width: min(800px, 100%);
    height: max-content;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    background: var(--body-color);
    border: 1px solid var(--border-color-4);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s all ease;
    transition-delay: 0.2s;
}
.modal.dash-e .modal-struc{
    border: unset;
    border-radius: 0;
}
.modal.show .modal-struc{
    opacity: 1;
    visibility: visible;
}
.modal-struc .m-line{
    position: absolute;
    z-index: 2;
    background:
        linear-gradient(to right, var(--text-color-2) 8px, transparent 8px) top,
        linear-gradient(to right, var(--text-color-2) 8px, transparent 8px) bottom,
        linear-gradient(to bottom, var(--text-color-2) 8px, transparent 8px) left,
        linear-gradient(to bottom, var(--text-color-2) 8px, transparent 8px) right;
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    pointer-events: none;
    transition: 0.4s width ease, 0.4s height ease;
    transition-delay: 0.4s;
    opacity: 0;
    visibility: hidden;
}
.modal.dash-e .modal-struc .m-line{
    opacity: 1;
    visibility: visible;
}
.modal-struc .t-line{
    top: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    background-size: 20px 5px;
}
.modal.show .modal-struc .t-line{
    width: 100dvw;
}
.modal-struc .b-line{
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    background-size: 20px 5px;
}
.modal.show .modal-struc .b-line{
    width: 100dvw;
}
.modal-struc .l-line{
    top: 50%;
    left: -1px;
    width: 2px;
    height: 0;
    transform: translateY(-50%);
    background-size: 5px 20px;
}
.modal.show .modal-struc .l-line{
    height: 100dvh;
}
.modal-struc .r-line{
    top: 50%;
    right: -1px;
    width: 2px;
    height: 0;
    transform: translateY(-50%);
    background-size: 5px 20px;
}
.modal.show .modal-struc .r-line{
    height: 100dvh;
}

.modal .m-node{
    position: absolute;
    border: 1px solid var(--text-color);
    border-radius: 2px;
    background: var(--variant);
    width: 12px;
    height: 12px;
    aspect-ratio: 1/1;
    z-index: 3;
    transform: translate(0, 0);
    transition: 0.3s transform ease;
    transition-delay: 0.2s;
    opacity: 0;
    visibility: hidden;
}
.modal.dash-e .modal .m-node{
    opacity: 1;
    visibility: visible;
}
.modal .tl-node{
    top: 0;
    left: 0;
}
.modal.show .tl-node{
    transform: translate(-50%, -50%);
}
.modal .tr-node{
    top: 0;
    right: 0;
}
.modal.show .tr-node{
    transform: translate(50%, -50%);
}
.modal .bl-node{
    bottom: 0;
    left: 0;
}
.modal.show .bl-node{
    transform: translate(-50%, 50%);
}
.modal .br-node{
    bottom: 0;
    right: 0;
}
.modal.show .br-node{
    transform: translate(50%, 50%);
}


.modal-swiper{
    max-height: 100%;
    overflow: hidden;
}
.modal-swiper .swiper-slide{
    height: max-content;
}
.modal-struc header{
    position: relative;
    padding: 2rem;
    width: 100%;
    height: max-content;
    display: flex;
    align-items: start;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}
.modal-struc header .modal-actions{
    position: absolute;
    top: 2rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}
.modal-struc header .modal-actions .modal-action{
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
    transition: 0.3s all ease;
}
.modal-struc header .modal-actions .modal-action:hover{
    cursor: pointer;
    background: var(--hovered-li);
}
.modal-struc header .modal-actions .modal-action svg{
    width: var(--big-font-size);
}
.modal-struc header .modal-actions-menu{
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 200px;
    display: flex;
    align-items: start;
    justify-content: center;
    flex-direction: column;
    background: var(--input-color);
    border: 1px solid var(--border-color-4);
    border-radius: 4px;
    overflow: hidden;
    transform: translateY(-0.5rem);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s all ease;
}
.modal-struc header .modal-actions-menu.show{
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.modal-struc header .modal-actions-menu .modal-menu-item{
    padding: 1rem 1rem;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: start;
    gap: 1rem;
    transition: 0.3s all ease;
}
.modal-struc header .modal-actions-menu .modal-menu-item:hover{
    cursor: pointer;
    background: var(--hovered-li);
}
.modal-struc header .modal-estado{
    position: relative;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: var(--smaller-font-size);
    background: var(--input-color);
    color: var(--text-color);
    border-radius: 4px;
    line-height: 1.2lh;
}
.modal-struc header .modal-estado i{
    color: var(--variant);
    animation-duration: 2s;
}
.modal-struc header h2{
    display: inline-flex;
    color: var(--variant);
    font-size: var(--normal-font-size);
    font-weight: 600;
}
.modal-struc header .site{
    position: relative;
    width: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.modal-struc header .site a{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
}
.modal-struc header .site svg{
    width: var(--normal-font-size);
}
.modal-struc .modal-banner{
    padding: 2rem;
    width: 100%;
    height: max-content;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--input-color);
    background-image: radial-gradient(var(--border-color-4) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
}
.modal-struc .modal-img{
    position: relative;
    height: 180px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.modal-struc .modal-img img{
    height: 100%;
    width: auto;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color-4);
    overflow: hidden;
}
.modal-struc .modal-extras{
    padding: 2rem 2rem 0 2rem;
    height: max-content;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 1rem;
}
.modal-struc .modal-extras .button{
    width: fit-content;
}
.modal-struc .modal-desc{
    position: relative;
    padding: 2rem;
    display: flex;
    align-items: stretch;
    justify-content: start;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    height: max-content;
}
.modal-struc .modal-desc p{
    width: 100%;
    text-align: left;
    line-height: 1.3lh;
}

.modal-struc .modal-terms{
    position: relative;
    padding: 0.5rem 2rem 0.5rem 2rem;
    display: flex;
    align-items: stretch;
    justify-content: start;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    height: max-content;
    background: var(--input-color);
}

.modal-struc .modal-terms p{
    font-size: var(--smaller-font-size);
    color: var(--text-color-2);
}


@media screen and (max-width: 580px) {
    .modal-struc header{
        padding: 1rem;
    }
    .modal-struc .modal-banner,
    .modal-struc .modal-desc{
        padding: 1rem;
    }
    .modal-struc .modal-extras{
        padding: 1rem 1rem 0 1rem;
    }
    .modal-struc .modal-terms{
        padding: 0 1rem 1rem 1rem;
    }
    .modal-struc header .modal-actions{
        top: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .modal-struc .modal-img{
        height: auto;
        width: 100%;
        align-items: stretch;
        justify-content: stretch;
    }
    .modal-struc .modal-img img{
        width: 100%;
        height: auto;
    }
}