/* -------------- upload css - for the upload page -------------- */

.hello{
    display: grid;
    gap: .75rem;
    justify-items: center;
}

.hello-actions{
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.note{
    max-width: 30rem;
    margin-top: 1.25rem;
    font-size: .9rem;
    font-style: italic;
    color: var(--muted);
}

.credit{
    margin-top: 3rem;
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
}



/* -------------- the upload box -------------- */

.drop{
    display: block;
    width: 100%;
    max-width: 36rem;
    margin-top: 2.5rem;
    padding: clamp(2.5rem, 8vh, 4rem) 1.25rem;
    border: 1px dashed var(--muted);
    border-radius: 18px;
    cursor: pointer;
    transition: background .3s var(--ease), border-color .3s var(--ease);
}

.drop:hover,
.drop.over{
    background: var(--soft);
    border-color: var(--accent);
}

.drop .title{
    font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
}

.drop .eyebrow{
    margin-top: .5rem;
}

.drop input{
    display: none;
}



/* -------------- progress of each file -------------- */

.progress{
    display: grid;
    gap: .9rem;
    width: 100%;
    max-width: 36rem;
    margin-top: 1.5rem;
    text-align: left;
}

.progress:empty{
    display: none;
}

.progress-item{
    font-size: .9rem;
}

.bar{
    height: 2px;
    background: var(--line);
    margin-top: .35rem;
    overflow: hidden;
}

.bar span{
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width .3s var(--ease);
}



/* -------------- your uploads -------------- */

.section-head{
    width: 100%;
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
}

.grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
}

.file{
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rule);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg);
    animation: rise .6s var(--ease) both;
}

.thumb{
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--soft);
    font-size: .75rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
}

.thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info{
    display: grid;
    gap: .15rem;
    min-width: 0;
    padding: .6rem .75rem .75rem;
    font-size: .85rem;
}

.file-name{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info .textlink{
    justify-self: center;
    margin-top: .35rem;
    font-size: .7rem;
}



/* -------------- notification at the bottom -------------- */

.toast{
    position: fixed;
    left: 50%;
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 10;
    width: max-content;
    max-width: calc(100vw - 2rem);
    padding: .8rem 1.4rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--bg);
    font-size: .95rem;
    box-shadow: 0 8px 24px rgba(29, 27, 23, .18);
    animation: toast-in .5s var(--ease) both;
}

.toast strong{
    font-weight: 400;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-right: .35rem;
}

/* some files failed - stays until tapped */
.toast.warn{
    background: var(--bg);
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 18px;
    cursor: pointer;
}

.toast-bar{
    display: block;
    height: 2px;
    margin-top: .5rem;
    background: rgba(248, 245, 239, .25);
    border-radius: 1px;
    overflow: hidden;
}

.toast-bar span{
    display: block;
    width: 0;
    height: 100%;
    background: var(--bg);
    transition: width .4s var(--ease);
}

/* on phones it sits just above the bottom nav bar */
@media (max-width: 640px){
    .toast{
        bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + .75rem);
    }
}

@keyframes toast-in{
    from{ opacity: 0; transform: translate(-50%, 1rem); }
}
