* {
    -webkit-tap-highlight-color: transparent;

    transition: 0.3s;
    margin: 0;
    padding: 0;
}

body[selectable=none] {

    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE10+/Edge */
    user-select: none;
    /* Standard */
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

body[selectable=none] * {
    -webkit-user-select: inherit;
    /* Safari */
    -moz-user-select: inherit;
    /* Firefox */
    -ms-user-select: inherit;
    /* IE10+/Edge */
    user-select: inherit;
    /* Standard */
    -webkit-user-drag: inherit;
    user-select: inherit;
    -moz-user-select: inherit;
    -webkit-user-select: inherit;
    -ms-user-select: inherit;
}

#goodle {
    display: none !important;
    margin-top: 0;
    flex-direction: row;
    background-color: var(--clr-gray4);
    border-radius: 0 0 10px 10px;
    padding: 0 10px 0 0;
    cursor: pointer;
}

#goodle:hover {
    background-color: var(--clr-gray5);
}

#goodle:active {
    background-color: var(--clr-gray3);
}

#goodle * {
    flex-direction: row;

}

#goodle img {
    background-color: var(--clr-gray3);
    border-radius: 2px;
    box-shadow: 0 0 0 3px var(--clr-gray3);
}

#goodle div::after {
    margin: 0 3px;
    content: '(آزمایشی)';
    font-size: var(--font-size-smaller);
}

div,
label,
button,
input,
textarea {
    position: relative;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 10px;
}

textarea {
    justify-content: initial;
    align-items: initial;
    text-align: initial;
}

.inner-body {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    background-color: var(--clr-gray1);
    color: var(--clr-gray9);
    justify-content: flex-start;
    position: absolute;
    top: 0;
    left: 0;
}

#top-box {
    height: 40px;
    flex-direction: row;
    margin: 0;
    align-items: flex-start;
}

.type-selector {
    background-color: var(--clr-gray);
    padding: 5px 35px;
    padding-top: 0;
    border-radius: 0 0 10px 10px;
    margin: 0;
    cursor: pointer;
    font-size: large;
    font-weight: bold;
}

.type-selector:first-of-type {
    transform: translateX(-7px);
}

.type-selector:last-of-type {
    transform: translateX(7px);
}

input:checked+.type-selector {
    z-index: 1;
    background-color: var(--clr-blue);
    padding-top: 10px;
}

#content-box {
    height: calc(100dvh - 40px);
    margin: 0;
    width: 100vw;
    overflow: hidden;
    justify-content: flex-start;
}

.box {
    background-color: var(--clr-gray3);
    border-radius: 20px;
    width: 80%;
    max-width: 580px;
}

.tab {
    left: 0;
    margin: 0;
    width: 100vw;
    height: calc(100dvh - 40px);
    position: absolute;
    overflow-y: scroll;
    justify-content: flex-start;


    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab::-webkit-scrollbar {
    display: none;
}

.tab:last-of-type {
    left: -100vw;
}

#file-tab {
    left: 100vw;
    scale: 0;
    opacity: 0;
}

#text-tab {
    left: -100vw;
    scale: 0;
    opacity: 0;
}

.header {
    font-size: large;
}

input,
button,
textarea,
input[type=file]+label {
    width: 200px;
    padding: 8px 0;
    border-radius: 10px;
    outline: none;
    border: none;
    background-color: var(--clr-gray1);
    color: var(--clr-gray7);
}

input[type=radio] {
    display: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--clr-gray8);
}

#free-space {
    direction: ltr;
    position: absolute;
    background-color: var(--clr-green3);
    border-radius: 10px;
    padding: 2px 8px;
    right: 0;
    top: 0;
}

#file-name {
    max-width: 200px;
    direction: ltr;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    margin-bottom: 0;
    position: relative;
    line-height: 25px;
    text-align: left;
}

#file-name::before {
    content: var(--file-icon);
    position: absolute;
    left: 0;
}

input[type=file]+label,
input[type=submit],
button {
    color: var(--clr-gray9);
    background: var(--clr-blue5);
    cursor: pointer;
}

input[type=file]+label:hover,
input[type=submit]:hover,
button:hover {
    background: var(--clr-blue5-5);
}

input[type=file]+label:active,
input[type=submit]:active,
button:active {
    background: var(--clr-blue5);
}

input[type="file"] {
    display: none;
}

#upload-password {
    margin-top: 0;
}

#progressBox {
    width: 200px;
    height: 25px;
    align-items: flex-start;
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--clr-gray2);
}

#progressBar {
    margin: 0;
    height: 100%;
    width: 0%;
    background: var(--clr-blue);
}

#percent {
    margin: 0;
    width: 100%;
    height: 100%;
    position: absolute;
}

#uploads-container,
#texts-container {
    direction: ltr;
    max-height: calc(100dvh - 500px);
    min-height: 200px;
    justify-content: flex-start;
    align-items: flex-start;
    height: fit-content;
    overflow-y: auto;
    background-color: var(--clr-gray2);
    border-radius: 15px;
    border: 10px solid var(--clr-gray2);
    padding-right: 10px;
}


#texts-container {
    max-height: calc(100dvh - 570px);
    min-height: 80px;
    direction: rtl;
    padding-right: 0;
    padding-left: 10px;
}

#uploads-container *,
#texts-container * {
    margin: 0;
}

*::-webkit-scrollbar {
    width: 8px;
    cursor: pointer !important;
}

*::-webkit-scrollbar-button {
    display: none;
}

*::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: var(--clr-gray4);
    cursor: pointer !important;
}

*::-webkit-scrollbar-track-piece {
    border-radius: 4px;
}

.file-row,
.text-row {
    flex-direction: row;
    line-height: 25px;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.file-row:hover,
.text-row:hover {
    background-color: var(--clr-gray3);
}

.file-row *,
.text-row * {
    margin-right: 5px !important;
}

.file-name,
.text-name {
    width: 200px;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-type {
    display: none;
}

.file-remove,
.text-remove {
    margin-right: 0 !important;
    z-index: 1;
}

.file-remove:hover,
.text-remove:hover,
.file-link:hover,
.text-link:hover {
    scale: 150%;
}

.file-time,
.file-size,
.text-time {
    width: 90px;
    overflow: hidden;
    direction: rtl;
    align-items: flex-start;
    margin-right: 10px !important;
}

.file-size {
    direction: ltr;
    align-items: flex-end !important;
}

#text-send {
    margin-bottom: 15px;
}

#text-name,
#text-text,
#text-password {
    padding: 8px 10px !important;
    width: calc(100% - 50px);
}

#text-text {
    resize: none;
    height: 120px;
}

.text-name {
    text-align: right;
}

#link-view {
    opacity: 0;
    display: none;
    margin: 0;
    top: 0;
    position: absolute;
    width: 100vw;
    height: 100dvh;
    z-index: 10;
    background-color: hsla(0, 0%, 0%, 0.5);
    backdrop-filter: blur(5px);
}

@keyframes link-in {
    0% {
        opacity: 0;
        padding-top: 5vh;
    }

    100% {
        opacity: 1;
        padding-top: 0;
    }
}

@keyframes link-out {
    0% {
        opacity: 1;
        padding-top: 0;
    }

    100% {
        opacity: 0;
        padding-top: 5vh;
    }
}

.link-box {
    padding-top: 50px;
    width: 300px;
    background-color: var(--clr-gray3);
    border-radius: 25px;
}

.link-name-row {
    direction: ltr;
    flex-direction: row;
}

#link-name {
    text-align: left;
    margin-left: 0;
    width: 208px;
    color: var(--clr-gray9);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

#link-icon {
    margin: 0 10px;
}

.link-name-row,
.link-area {
    width: calc(100% - 50px);
}

.link-area {
    padding-top: 40px;
    background-color: var(--clr-gray2);
    border-radius: 15px;
}

#link-link {
    -webkit-user-select: all;
    /* Safari */
    -moz-user-select: all;
    /* Firefox */
    -ms-user-select: all;
    /* IE10+/Edge */
    user-select: all;
    /* Standard */
    -webkit-user-drag: all;
    user-select: all;
    -moz-user-select: all;
    -webkit-user-select: all;
    -ms-user-select: all;
    color: var(--clr-gray9);
    width: 100%;
    resize: none;
    font-feature-settings: initial;
}

#link-copy,
#link-share {
    top: 0;
    position: absolute;
    background-color: var(--clr-gray4);
    color: var(--clr-gray9);
    padding: 2px 10px;
    border-radius: 7px;
    cursor: pointer;
    z-index: 10;
}

#link-copy:hover,
#link-share:hover {
    background-color: var(--clr-gray5);
}

#link-copy:active,
#link-share:active {
    background-color: var(--clr-gray4);
}

#link-copy {
    left: 0;
}

#link-share {
    right: 0;
}

#link-close {
    top: 20px;
    right: 20px;
    position: absolute;
    background-color: var(--clr-red4);
    border-radius: 8px;
    padding: 5px;
    width: 15px;
    cursor: pointer;
}

#link-close:hover {
    background-color: var(--clr-red5);
}

#link-close:active {
    background-color: var(--clr-red4);
}

@media screen and (max-width:700px) {
    .box {
        background-color: var(--clr-gray3);
        border-radius: 20px;
        width: 90%;
    }

    #upload-box input,
    label,
    button,
    #progressBox {
        width: calc(100% - 40px) !important;
    }

    input[type=file]+label {
        margin-bottom: 0;
    }

    button {
        margin-bottom: 0;
    }

    #progressBox {
        margin-bottom: 20px;
    }

    #uploads-container {
        max-width: calc(90% - 40px);
        min-height: 100px !important;
        max-height: calc(100dvh - 470px) !important;
        margin-bottom: 20px !important;
    }

    .file-row {
        width: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        flex-wrap: wrap;
        justify-content: flex-start;
        --row-height: 55px;
        height: var(--file-row-height);
        background-color: var(--clr-gray3);
        --file-row-padding: 10px;
        margin: 5px 0 !important;
        border-radius: 7px;
        flex-shrink: 0;
        padding: 2px 0;
    }

    .file-row:active {
        background-color: var(--clr-gray3);
    }

    .file-row:hover {
        background-color: var(--clr-gray4);
    }

    .file-row:first-of-type {
        margin-top: 0 !important;
    }

    .file-row:last-of-type {
        margin-bottom: 0 !important;
    }

    .file-icon {
        margin-left: calc(var(--file-row-padding) + 27px) !important;
    }

    .file-name {
        width: calc(100% - 27px * 3 - var(--file-row-padding) * 2);
        margin: 0 !important;
        padding-right: 27px;
    }

    .file-time {
        margin-left: calc(var(--file-row-padding) + 27px) !important;
        align-items: flex-end;
        width: 70px !important;
    }

    .file-size {
        flex-grow: 1;
        align-items: flex-start;
        padding-right: calc(var(--file-row-padding) + 22px + 5px);
    }

    .file-key,
    .file-remove,
    .file-link {
        margin: 0 !important;
        position: absolute;
    }

    .file-key {
        right: calc(var(--file-row-padding) + 30px);
        top: 2px;
    }

    .file-remove {
        right: calc(var(--file-row-padding) / 2);
        bottom: calc((var(--file-row-height) - 30px) / 2);
        width: 30px;
    }

    .file-link {
        left: calc(var(--file-row-padding) / 2);
        bottom: calc((var(--file-row-height) - 30px) / 2);
    }

    .text-name {
        width: initial;
        flex-grow: 1;
    }

    .text-row {
        width: 100%;
    }

    #texts-container {
        width: calc(90% - 40px);
    }

}