/* Global Styles */
::backdrop {
    background-color: black;
    opacity: 0.75;
}


dialog:modal {
    background-color: rgba(255, 255, 0, 0);
    border: none;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

dialog form button:focus {
    outline: none;
}

/* Dialog Styles */
dialog .modal-card {
    background-color: white;
    color: var(--titan-blue);
    position: absolute;
    height: auto;
    width: 540px;
    max-width: 100%;
    top: 50%;
    left: 50%;
    z-index: 99;
    transform: translate(-50%, -50%);
    transform-origin: center;
    border-radius: 7px;
    border: 1px solid var(--titan-blue);
    padding-bottom: 40px;
    transition: display 0.4s allow-discrete, overlay 0.4s allow-discrete;
    /* Remove animation here */
}

dialog.closing .modal-card {
    animation: shrink 0.8s ease-in-out forwards, close 0.5s ease-out forwards;
}



dialog[open] {
    animation: open 0.5s ease-out forwards;
}

::backdrop {
    transition:
        display 0.5s allow-discrete,
        overlay 0.5s allow-discrete;

    animation: closeB 0.5s ease-out forwards;

}

dialog[open]::backdrop {
    animation: openB 0.5s ease-out forwards;

}

dialog.closing::backdrop {
    animation: closeB 0.4s ease-in-out forwards;
}

@keyframes open {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes close {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes shrink {
    from {

        transform: translate(-50%, -50%) scale(1);
    }

    to {

        transform: translate(calc(100vw - 30px), calc(100vh - 30px)) scale(0.1);
    }
}

@keyframes openB {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.4;
    }
}

@keyframes closeB {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 0;
    }
}

.dialog-title {
    font-size: 2rem;
    color: var(--titan-blue);
    display: block;
    text-align: center;
    margin: 20px auto 0 auto;
}

#ModalDialog {
    padding-top: 2px;
    padding-bottom: 30px;
    max-width: 1050px;
}

/* Form Styles */
form[method='dialog'] {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    margin-right: -14px;
    margin-bottom: 4px;
}

/* Button Styles */
button.close-dialog {
    outline-color: white;
    cursor: pointer;
    color: var(--titan-blue);
    background-color: white;
    border: none;
    font-weight: 500;
    font-size: 30px;
    height: 30px;
    width: 30px;
    padding-bottom: 2px;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    border-radius: 7px;
    text-shadow: 1px 1px 4px white;
}

button.close-dialog:hover {
    color: red;
    text-shadow: 1px 1px 4px var(--titan-blue);
}

/* Modal Hub Styles */
.modal-hub {
    max-width: 100%;
    justify-content: center;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-hub a {
    background-color: var(--titan-blue);
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    border-color: var(--titan-blue);
    border-style: solid;
    border-width: 2px;
    border-radius: 10px;
    margin: 15px;
    padding: 5px;
    min-height: 150px;
    min-width: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.modal-hub a img {
    margin: 0 10px;
}

.modal-hub a span {
    margin-right: 10px;
}

.modal-hub a img.default {
    display: block;
}

.modal-hub a img.active {
    display: none;
}

.modal-hub a:hover img.default {
    display: none;
}

.modal-hub a:hover img.active {
    display: block;
}

.modal-hub a:hover {
    color: var(--titan-blue);
    background-color: var(--titan-orange);
}

/* Responsive Styles */
@media screen and (max-width: 800px) {
    .modal-hub a {
        justify-content: flex-start;
        margin: 15px 10px;
    }

    .modal-hub a span {
        flex: 1;
    }
}

/* Utility Classes */
.spread-30 {
    width: 30px;
}

.spread {
    flex: 1;
}

.spread2 {
    flex: 1;
    display: none;
}