* {
    --card-bg: #fafafa;
    --spacing-0: 0.5rem;
    --spacing-1: 1rem;
    --spacing-2: 1.25rem;
    --spacing-3: 1.5rem;
    --spacing-4: 1.75rem;
    --spacing-5: 2rem;
    --card-border: #e3e3e3;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.card {
    background: var(--card-bg);
    padding: var(--spacing-3)var(--spacing-2)var(--spacing-2)var(--spacing-3);
    border-radius: 1rem;
    border: 1px solid var(--card-border);
    box-shadow: 0px 0px 15px rgb(1 1 1 / 5%);
}

.fill-screen {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-inline: var(--spacing-5);
}

@media (min-width: 768px) {
    .middle-max-width {
        width: calc(768px * 0.75);
        height: min-content;
    }
}

.center-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.full-page {
    height: 100%;
    display: flex;
    flex-flow: column;
}

.full-page-container {
    height: 100%;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-content: center;
    align-items: center;
}

.rest-of-page {
    display: flex;
    flex-flow: column;
    flex: 1;
}

.col {
    display: flex;
    flex-flow: column;
}

.row {
    display: flex;
    flex-flow: row;
}

.my-row {
    display: flex;
    flex-flow: row;
    height: 100%;
    flex: 1;
    width: 100%;
}

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.link {
    margin-top: 0.5em;
}

.fill-height {
    height: 100%;
}

.left-sidebar {
    container-type: inline-size;
    height: 100%;
    flex: 1;
    display: flex;
    flex-flow: column;
    justify-content: start;
    align-items: center;
    padding: var(--spacing-5);
	min-width: 0px;
}

.main-content {
    height: 100%;
    flex: 4;
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-5);
	min-width: 0px;
}

.upload-container {
        height: 100%;
        display: flex;
        flex-flow: column;
        justify-content: start;
        align-items: center;
        padding: var(--spacing-5);
        min-width: 200px;
}

.right-sidebar {
    height: 100%;
    flex: 1;
    display: flex;
    flex-flow: column;
    justify-content: start;
    align-items: center;
    padding: var(--spacing-5);
	min-width: 0px;
}

.list-item {
    height: min-content;
    width: 100%;
}

.full-size {
    height: 100%;
    width: 100%;
}

.fw {
    width: 100%;
}

.gap-1 {
    gap: var(--spacing-1);
}

.flex-1 {
    flex: 1;
}

.content-middle {
    justify-content: center;
    align-content: center;
    align-items: center;
}

.file-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0px;
    min-width: 0px;
}

.file-preview img,
.file-preview video,
.file-preview embed {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0px 0px 16px rgb(220, 220, 220);
    border-radius: var(--spacing-1);
    border: 4px solid #dadada;
}

.main-content,
.left-sidebar,
.right-sidebar {
    min-height: 0;
}

.dashboard-container {
    container-type: inline-size;
    container-name: dashboard;
    height: 100%;
    width: 100%;
    display: flex;
    flex-flow: row;
    gap: var(--spacing-1);
    padding: var(--spacing-1);
    min-height: 0px;
}

@media (width > 1024px) {
    .dashboard-container,
    .upload-container,
    .create-folder-container {
        width: 80%;
        align-self: center;
    }
}

@container dashboard (width < 648px) {
    .left-sidebar,
    .main-content,
    .right-sidebar
    {
        padding: var(--spacing-0);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .file-card {
        width: 96px !important;
    }

    .profile-container {
        flex-direction: column !important;
    }
    
    .btn {
        padding-left: var(--spacing-1) !important;
        padding-right: var(--spacing-1) !important;
        padding-top: var(--spacing-0) !important;
        padding-bottom: var(--spacing-0) !important;
    }
}

.file-viewer {
    height: 100%;
    width: 100%;
    display: flex;
    flex-flow: column;
    min-height: 0;
    justify-content: start;
    align-items: center;
    gap: var(--spacing-5);
}

.text-center {
	text-align: center;
}

.file-grid {
    list-style: none;
    display: flex;
    flex-flow: row;
    flex-wrap: wrap;
    justify-content: start;
    align-items: start;
    gap: var(--spacing-5);
    height: 100%;
    width: 100%;
    min-height: 0px;
    min-width: 0px;
    padding: 0px;
    margin: 0px;
}

.file-card {
    display: flex;
    flex-direction: column;
    width: 156px;
    height: 128px;
    min-width: 96px;
    text-overflow: ellipsis;
    justify-content: center;
    align-items: center;
}

.folder-card {
    display: flex;
    flex-direction: column;
    width: 156px;
    height: 128px;
    min-width: 96px;
    text-overflow: ellipsis;
    justify-content: center;
    align-items: center;
}

.folder-card a {
    text-align: center;
}

.file-card .file-link {
    text-overflow: ellipsis;
    overflow: hidden;
    min-height: var(--spacing-5);
    min-width: var(--spacing-1);
    text-align: center;
    width: 100%;
}

.sidebar-list {
    list-style: none;
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    gap: var(--spacing-5);
    display: flex;
    flex-direction: column;
}

.profile-container {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-1);
    justify-content: start;
    align-items: center;
}

.profile-container .icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    background: gray;
    border-radius: 8px;
    border: solid 1px black;
}

.link {
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.upload-form {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-5);
    gap: var(--spacing-5);
}

.create-folder-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-5);
    gap: var(--spacing-5);
}

.create-folder-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-5);
    gap: var(--spacing-5);
}

.btn {
    width: 100%;
}
