dialog[open] {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    /* Rest deines Stylings, z. B.: */
    border-radius: 12px;
    border-color: beige;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    background: #fff;
    max-width: 90vw;
    width: 21em;
    z-index: 10001;
}

dialog[open] { animation: miraFadeIn 0.2s ease-in-out; }
#change-password-dialog { width: 23em }    /* Password-Dialog breiter machen */
#systemprompt-dialog { width: 30em }       /* System-Prompt-Dialog breiter machen */


.mira-popup-inner {
    padding: 1.5em;

    input { display: block;
            width: 100%;
            margin-bottom: 0.8em;
            padding: 0.5em;
            font-size: 1em;
            border: 1px solid #ccc;
            border-radius: 6px;
          }
    h3    {  margin-bottom: 0.8em;
             font-size: 1.1em;
          }

    textarea {
        width: 100%;
        resize: vertical;
        padding: 0.3em;
        margin: 0.5em 0;
    }

    .popup-buttons {
        display: flex;
        justify-content: center;
        gap: 1em;
    }
    .portrait-button {
        background: #eee;
        border: 1px solid #ccc;
        border-radius: 6px;
        padding: 0.4em 0.8em;
        font-size: 1em;
    }

    .portrait-button:hover {
        background: #ddd;
    }

    .pw-container {
        position: relative;
    }

    .pw-toggle {
        position: absolute;
        right: 0.6em;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        font-size: 1.1em;
        color: #555;
    }

    .dialog-error {
        border-radius: 3px;
        padding: 0.5em;
        background: #f8d7da;
        color: #721c24;
        margin-bottom: 0.5em
    }
}

#user-menu {
    position: absolute;
    top: 4.5em; /* Feinjustierung je nach Layout */
    right: 1.9em;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 10002;
    padding: 0.4em 0;
    font-size: 1em;
    min-width: 12em;
}

#user-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#user-menu li {
    padding: 0.5em 1em;
    cursor: pointer;
    white-space: nowrap;
}

#user-menu li:hover {
    background-color: #f0f0f0;
}

.hidden {
    display: none !important;
}


