#home-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 1rem;
    justify-content: space-around;
    padding: 10vh 5vw;
}

#home-shortcuts .shortcut-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#home-shortcuts .shortcut-card {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    padding: 2rem;
    background-color: var(--color-pastel-turq);
    border: 1px solid var(--color-black);
    border-radius: 8px;
    white-space: nowrap;
    transition: transform 0.2s ease, background-color 0.2s ease;
    
}

#home-shortcuts .shortcut-card:is(:hover, :has(:focus-visible)) {
    background-color: var(--color-pastel-turq-hover);
}

#home-shortcuts .shortcut-card .shortcut-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    font-size: 1.9rem;
}

#home-shortcuts .shortcut-main > :first-child {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#home-shortcuts .shortcut-main > span {
    display: flex;
    flex-shrink: 0;
}

#home-shortcuts .icon {
    width: 40px;
    height: 40px;
    color: var(--color-black);
}

#home-shortcuts .shortcut-card a {
    color: var(--color-black);
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.1s ease, background-color 0.2s ease;
    
}

#home-shortcuts .shortcut-main p {
    margin: 0;
    font-size: inherit;
    color: var(--color-black);
    font-weight: bold;
}

#home-shortcuts .shortcut-card a:hover {
    text-decoration: underline;
}

#home-shortcuts .shortcut-card .shortcut-secondary {
    display: block;
    width: 100%;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    white-space: normal;
    visibility: hidden;
    font-size: 1.3rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#home-shortcuts .shortcut-card:is(:hover, :has(:focus-visible)) .shortcut-secondary {
    max-height: 6rem;
    margin-top: 1rem;
    visibility: visible;
    transition: transform 0.2s ease, opacity 0.2s ease,
        max-height 0.2s ease 0.3s, margin-top 0.2s ease 0.3s, visibility 0s 0.3s;
}

#home-shortcuts .shortcut-description {
    display: block;
    font-weight: normal;
}

#home-shortcuts .shortcut-prefix {
    font-weight: normal;
}

#home-shortcuts .shortcut-toggle,
#home-shortcuts .shortcut-options-title,
#home-shortcuts .shortcut-card .shortcut-secondary--all {
    display: none;
}

@media (width > 45rem) {
    #home-shortcuts .shortcut-options {
        display: contents;
    }
}

@media (max-width: 45rem) {
    #home-shortcuts {
        justify-self: stretch;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
        padding: 1.5rem 5vw;
    }

    #home-shortcuts .shortcut-column {
        gap: 0.75rem;
    }

    #home-shortcuts .shortcut-card {
        position: relative;
        justify-content: center;
        aspect-ratio: 1;
        padding: 0;
        anchor-name: --shortcut-card;
        anchor-scope: --shortcut-card;
    }

    #home-shortcuts .shortcut-card .shortcut-main {
        justify-content: center;
        font-size: 0;
    }

    #home-shortcuts .shortcut-main > :first-child {
        display: none;
    }

    #home-shortcuts .icon {
        width: 11vw;
        height: 11vw;
    }

    #home-shortcuts .shortcut-main > span {
        display: flex;
        justify-content: center;
    }

    #home-shortcuts .shortcut-card:is(:hover, :has(:focus-visible)) {
        background-color: var(--color-pastel-turq);
    }

    #home-shortcuts .shortcut-card:has(.shortcut-options:popover-open) {
        background-color: var(--color-pastel-turq-hover);
    }

    #home-shortcuts .shortcut-toggle {
        display: block;
        position: absolute;
        inset: 0;
        border: 0;
        border-radius: inherit;
        background: transparent;
        cursor: pointer;
    }

    #home-shortcuts .shortcut-options:popover-open {
        position-anchor: --shortcut-card;
        top: anchor(bottom);
        right: 5vw;
        bottom: auto;
        left: 5vw;
        width: auto;
        margin: 0.5rem 0 0;
        padding: 1rem 1.25rem;
        border: 1px solid var(--color-black);
        border-radius: 8px;
        background: var(--color-pastel-turq);
        color: var(--color-black);
        white-space: normal;
        position-try-fallbacks: flip-block;
    }

    #home-shortcuts .shortcut-options-title {
        display: block;
        margin: 0;
        font-size: 1.3rem;
        font-weight: bold;
    }

    #home-shortcuts .shortcut-options .shortcut-secondary,
    #home-shortcuts .shortcut-card:is(:hover, :has(:focus-visible)) .shortcut-options .shortcut-secondary {
        display: block;
        max-height: none;
        margin-top: 0.75rem;
        visibility: visible;
        font-size: 1.1rem;
        transition: none;
    }
}
