@import url("reset.css");
@import url("pico.css");
@import url("colors.css");
@import url("variables.css");

body {
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
}

body > main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav button {
    background: none;
    border: none;
    font-size: 80%;
}

nav li.logo {
    font-size:100%;
}

nav > ul#user-info, nav > ul#user-info > li {
    padding: 0;
}

nav button:hover {
    background: var(--surface2);
}

nav details.dropdown ul {
    width: auto;
    right: auto!important;
    margin-right: 96px;
    padding: 6px;
    background-color: var(--crust);
}

nav details.dropdown ul li {
    min-width: 164px;
    font-size: 80%;
    padding: 8px 12px;
    
}

nav details.dropdown ul li a {
    border-radius: 6px;
    cursor: pointer;
}
nav details.dropdown ul li:hover a {
    background-color: var(--base);
}
details.dropdown > summary:not([role]):focus {
    box-shadow: 0 0 0 var(--pico-outline-width) var(--surface0);
}
details.dropdown > summary + ul li:first-of-type {
    margin-top: 6px;
}

details.dropdown > summary + ul li:last-of-type {
    margin-bottom: 6px;
}

nav details.dropdown > summary:not([role]) {
    background-color: var(--surface3);
    height: 48px;
    border: none;
}

details.dropdown[open] > summary + ul {
    transform: scaleY(1) translateX(-64px);
}

nav details > summary::after {
    height: 1rem;
}

body.auth-drag-over::after {
    content: '';
    position: fixed;
    top: 6px;
    left: 6px;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0, 0.1);
    border: 3px dashed var(--peach);
    border-radius: var(--radius);   
    pointer-events: none;
    z-index: 999;
}

.drop-zone {
    border: 2px dashed var(--surface0);
    border-radius: var(--radius);
    padding: 8rem 2rem;
    text-align: center;
    background: var(--mantle);
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone:hover {
    background: var(--base);
    border: 2px dashed var(--sky);
}

.drop-zone.drag-over {
    border: 2px dashed var(--flamingo);
    background: var(--base);
}

.drop-zone p {
    margin: 0;
    --pico-color: var(--green);
}

.hidden {
    display: none !important;
}

#auth {
    margin: 48px 0;
}

.auth-message {
    animation: opacityIn 0.3s ease;
}

@keyframes opacityIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#dashboard {
    margin: 1rem 0;
}

#uploads {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.gallery-item {
    background: var(--mantle);
    overflow: hidden;
    display: flex;
    border-radius: var(--radius);
    flex-direction: row;
    padding: 12px;
    margin-bottom: 0;
}

.gallery-item-preview {
    width: auto;
    height: 124px;
    background: var(--base);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 1/1;
}

.gallery-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-preview .file-icon {
    color: var(--subtext0);
}

.gallery-item-info {
    padding: 1rem;
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 8px;
    align-items: center;
}

.gallery-item-name {
    color: var(--sapphire);
}

.gallery-info-container {
    flex-grow: 2;
    display: flex;
    flex-direction: column;
}

.gallery-item-meta {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    color: var(--subtext1);
}

.gallery-item-actions {
    display: flex;
    gap: 0.5rem;
}
.gallery-item-actions button {
    font-size: 80%;
    background: var(--surface0);
    border: none;
    padding: 6px;
}
.copy-btn {
    flex: 1;
    color: var(--green);
}

.delete-btn {
    color: var(--red);
}
