@charset "UTF-8";

/* ================================ */
/* CSS Neue Positionen Übung       */
/* ================================ */

* {
    margin: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}



body {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1em;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    display: flex;
    align-items: start;
    justify-content: start;
}





/* ================================ */
/*   Buttonmenü    */
/* ================================ */

button {
    background-color: rgb(65, 12, 114);
    color: white;
    padding: .7em 1.5em;
    border: none;
    border-radius: .3rem;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    anchor-name: --menu-button;
}

#menu {
    width: max-content;
    border: 1px solid #ccc;
    border-radius: .5rem;
    padding: .5em;
    background: white;
    position: absolute;
    position-anchor: --menu-button;
    top: anchor(bottom);
    left: anchor(left);
    position-try-fallbacks: --below-right, --below-left, --up-left, --up-right;
}

#menu:popover-open {
    display: grid;
}

#menu a {
    text-decoration: none;
    padding: .7em 1.5em;
    border-radius: .25em;
    color: black;
}

#menu a:hover {
    background: #eee;
}


@position-try --below-right {
    inset: unset;
    top: anchor(bottom);
    left: anchor(left);
}

@position-try --below-left {
    inset: unset;
    top: anchor(bottom);
    right: anchor(right);
}

@position-try --up-left {
    inset: unset;
    bottom: anchor(top);  /* Unterkante Menü = Oberkante Button */
    left: anchor(left);
}

@position-try --up-right {
    inset: unset;
    bottom: anchor(top);  /* gleiche Korrektur */
    right: anchor(right);
}




@media (max-width: 1400px) {
    body {
    justify-content: end;
}
}

@media (max-width: 950px) {
    body {
        align-items: end;
}
}

@media (max-width: 700px) {
    body {
        align-items: end;
        justify-content: start;
}
}