:root {
    --login-modal-height: 469px;
    --signup-modal-height: 640px;
    --modal-transition-duration: 100ms;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    background-color: #000;
    opacity: 0;
    z-index: 10;
    transition-duration: var(--modal-transition-duration);
    transition-property: opacity;
}

.modal-backdrop.show {
    opacity: 0.3;
}

.modal {
    position: fixed;
    left: 50%;
    z-index: 20;
    display: none;
    flex-direction: column;
    width: 480px;
    border-radius: 8px;
    background-color: #fff;
    overflow: hidden;
    transform: translateX(-50%);
    transition-duration: var(--modal-transition-duration);
    transition-property: top;
    will-change: top;
}

.login-modal {
    top: calc(var(--login-modal-height) * -1 - 100px);
}

.signup-modal {
    top: calc(var(--signup-modal-height) * -1 - 100px);
}

.login-modal.show {
    top: calc(40vh - (var(--login-modal-height) / 2));
}

.signup-modal.show {
    top: calc(40vh - (var(--signup-modal-height) / 2));
}

.modal .modal-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
}

.modal .modal-body h3 {
    margin: 30px 0 0;
    font-size: 22px;
    font-weight: 600;
    color: rgb(18, 24, 39);
}

.modal .modal-body form {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
}

.modal .modal-body form .form-group {
    display: flex;
    flex-direction: column;
}

.modal .modal-body form .form-group:not(:first-child) {
    margin-top: 24px;
}

.modal .modal-body form .form-group label {
    font-size: 15px;
    color: rgb(18, 24, 39);
}

.modal .modal-body form .form-group input:not([type=file]) {
    width: 384px;
    height: 36px;
    border-radius: 6px;
}


/* 1. not-submit */
.modal .modal-body form .form-group input:not([type=submit]) {
    margin-top: 8px;
    font-size: 15px;
}

/* 2. not-submit--error */
.modal .modal-body form .form-group.error input:not([type=submit]) {
    border-color: red;
}

/* 3. not-submit--focus */
.modal .modal-body form .form-group input:not([type=submit]):focus {
    outline-color: rgb(76, 58, 237);
}


.modal .modal-body form .form-group input:not([type=file], [type=submit]) {
    padding: 6px 12px;
    box-sizing: border-box;
    border: 1px solid rgb(210, 213, 219);
}


.modal .modal-body form .form-group input[type=file] {
    font-size: 14px;
    color: rgb(18, 24, 39);
}

.modal .modal-body form .form-group input[type=file]::file-selector-button {
    font-family: inherit;
    height: 25px;
}


/* 1. submit */
.modal .modal-body form .form-group input[type=submit] {
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    border: none;
    background-color: rgb(76, 58, 237);
    cursor: pointer;
}

/* 2. submit--hover */
.modal .modal-body form .form-group input[type=submit]:hover {
    background-color: rgb(97, 95, 248);
}


.modal .modal-body form .form-group p {
    display: none;
    margin: 8px 0 0;
    font-size: 14px;
    color: red;
}

.modal .modal-body form .form-group.error p {
    display: block;
}

.modal .modal-body .copyright {
    margin: 30px 0 0;
    font-size: 15px;
    color: rgb(107, 114, 129);
}

.modal .modal-body .copyright:hover {
    opacity: 1;
    text-decoration: underline;
}
