html {
    overflow: hidden;
}

body {
    height: 100%;
    width: 100%;
    overflow-y: scroll;
}

input {
    text-align: center;
    padding: 10px;
    border-radius: .5rem;
    width: 100%;
    background-color: var(--gray100);
}

.topbar {
    height: 7vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 10px;
    border-bottom: 1px solid var(--gray300);
    background-color: var(--white);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 0;
}

.topbar a {
    display: flex;
    flex: 1;
    font-size: 1.2rem;
    font-family: IRANSans500;
    gap: 3px;
    align-items: center;
}

.topbar a img {
    width: 1.6em;
}

.loginboxes {
    display: flex;
    gap: 15px;
}

.managerbox, .residentbox, #downloadbox {
    background-color: var(--white);
    border-radius: .5rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.06);
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
}

#downloadbox {
    /*display: none;*/
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    padding: 5px;
}

#downloadbox p {
    color: var(--green);
    font-family: iransans500;
}

#downloadbox span {
    color: var(--purple);
}

.downloadbtns {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.downloadbtns a {
    display: flex;
    flex-direction: row;
    gap: 5px;
    background-color: var(--gray100);
    border-radius: .5rem;
    padding: 5px;
    align-items: center;
    font-size: .9rem;
}

.downloadbtns a img {
    width: 1.3rem;
}

.managerbox img, .residentbox img {
    width: 20%;
}

.managerbox:hover, .residentbox:hover, #downloadbox:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.11);
}

.managerbox:hover, #downloadbox:hover {
    border: 2px solid var(--purple);
}

.residentbox:hover {
    border: 2px solid var(--green);
}

.managerbox button, .residentbox button {
    margin: unset;
    width: 100%;
}

.managerbox button {
    background-color: var(--purple);
}

.residentdialog {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 5px;
}

.residentdialog img {
    width: 20%;
}

.residentdialog section {
    border: 1px solid #eee;
    border-radius: .5rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.residentdialog section:hover {
    border-color: var(--green);
    background: #fbfffc;
}

.loginmethodetitle {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: right;
    gap: 5px;
}

.loginmethodetitle img {
    width: 1.5rem;
}

.loginethodedesc {
    text-align: right;
}

.method {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.method img {
    width: 50px;
    height: 50px;
}

.method div {
    display: flex;
    flex-direction: column;
    align-items: start;
}

.method div p {
    color: var(--green);
    font-family: iransans500;
}

#qrMethod, #urlMethod, #mobileMethod {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#qrMethod.active, #urlMethod.active, #mobileMethod.active {
    display: flex;
}

.camera-container {
    position: relative;
    overflow: hidden;
    background: #111;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#camera {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.scanframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    box-sizing: border-box;
    pointer-events: none;
    border-radius: .5rem;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
}

#urlloginerror, #mobileloginerror {
    width: 100%;
    display: none;
    text-align: center;
    color: var(--red);
    font-size: 14px;
}

button img {
    width: 1.2rem !important;
}

@media (max-width: 481px) {
    .content {
        padding: 15px;
    }

    .loginboxes {
        flex-direction: column;
    }

    .managerbox, .residentbox {
        gap: 10px;
        padding: 10px;
    }

    .residentdialog section {
        padding: 10px;
    }

    .method div {
        gap: 5px;
    }

    .camera-container {
        width: 85vw;
        height: 85vw;
    }

}

@media (min-width: 481px) {
    .content {
        padding: 15px 25%;
    }

    .loginboxes {
        flex-direction: row;
    }

    .managerbox, .residentbox {
        gap: 20px;
        padding: 30px;
    }

    .residentdialog section {
        padding: 15px;
    }

    .method div {
        gap: 10px;
    }

    .camera-container {
        width: 15vw;
        height: 15vw;
    }

}