body { font-family: sans-serif; margin: 20px; }
input, button { margin: 5px 0; padding: 8px; }
button { background: #1976d2; color: white; border: none; cursor: pointer; }
button:hover { background: #125aa0; }
.newPart {

    gap: 8px;
}
.newPartNameWrap {
    position: relative;

    min-width: 0;      /* verhindert Überlauf */
}

.newPartNameWrap #simplePartName {
    width: 100%;               /* füllt die 60% aus */
    box-sizing: border-box;    /* Padding wird eingerechnet */
    padding-right: 40px;       /* Platz für Mic-Button */
}

.mic-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: #eee;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 16px;
    padding: 4px 8px;
    line-height: 1;
    cursor: pointer;
}

.mic-btn.active {
    background: #ffecb3;
    border-color: #f0c040;
}

.newPart #simpleQty {
    width:100%;
    min-width: 0;
}
@media (max-width: 480px) {
    .newPart {
        gap: 6px;
    }
}

/* Kamera-Steuerungszeilen nebeneinander */
.camera-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Aktionszeile (Foto/Stop) initial ausblenden */
#cameraActionRow {
    display: none;
}
/* Foto-Vorschau mit Schließen-Button */
.photo-preview-wrap {
    position: relative;
    margin-top: 6px;
}
.photo-preview-wrap img#photoPreview {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    background: #000;
}
.photo-dismiss {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
}
.photo-dismiss:hover {
    background: rgba(0,0,0,0.8);
}

/* Kleine Erfolgs-Einblendung oben rechts */
#toastSuccess {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast-badge {
    background: #2e7d32;         /* grün */
    color: #fff;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-6px);
    animation: toast-in 180ms ease-out forwards, toast-out 250ms ease-in 1600ms forwards;
}

.toast-badge .icon {
    font-size: 16px;
}

@keyframes toast-in {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(-6px); }
}